Class: Lotus::Assets::Bundler Private
- Inherits:
-
Object
- Object
- Lotus::Assets::Bundler
- Defined in:
- lib/lotus/assets/bundler.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Bundle assets from a single application.
Constant Summary collapse
- DEFAULT_PERMISSIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
0644
- JAVASCRIPT_EXT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'.js'.freeze
- STYLESHEET_EXT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'.css'.freeze
- WILDCARD_EXT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'.*'.freeze
- URL_SEPARATOR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'/'.freeze
- URL_REPLACEMENT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
''.freeze
Instance Method Summary collapse
-
#initialize(configuration, duplicates) ⇒ Lotus::Assets::Bundler
constructor
private
Return a new instance.
-
#run ⇒ Object
private
Start the process.
Constructor Details
#initialize(configuration, duplicates) ⇒ Lotus::Assets::Bundler
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a new instance
47 48 49 50 51 52 53 54 55 |
# File 'lib/lotus/assets/bundler.rb', line 47 def initialize(configuration, duplicates) @manifest = Hash.new @configuration = configuration @configurations = if duplicates.empty? [@configuration] else duplicates.map(&:configuration) end end |
Instance Method Details
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Start the process.
For each asset contained in the sources and third party gems, it will:
* Compress
* Create a checksum version
At the end it will generate a digest manifest
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/lotus/assets/bundler.rb', line 69 def run assets.each do |asset| next if ::File.directory?(asset) compress(asset) checksum(asset) end generate_manifest end |