lux_assets 0.2.21 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/lux_assets/base.rb +9 -8
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5a80b7e415bc8508b25b9547bd665a20bccbdd815eb58d8bf972687b279d580
4
- data.tar.gz: cef5346c906005e2503e83bfbcd013e2950bf3496d53e204cab81372e93dc174
3
+ metadata.gz: 6324612191dc1470e710515aec0af628411277d4a80d59c0fe7d0d1058c3ec9a
4
+ data.tar.gz: 252f1a34d0a3646e85c0cc27bb3dfbd51ff9c4849162f7e4f0ad66a6a9459360
5
5
  SHA512:
6
- metadata.gz: 713f339065e96c071fa0e99e2608f0d0964839e56002fc8c17ce87bc63426f6a7f7141ac50be31be772db0f4a1d969f92cc9eabdd215f30ae063bc4c69b7a579
7
- data.tar.gz: 4511d80cdfa74612abe652541e844726834cb04e8cdf5af38a8b1bb373cced1f8cfc2c3b09ba9a7ea4a6f9f64918c43bc1bb4f0912842c49aca3fb7085d5ea58
6
+ metadata.gz: 6ce56efba7aacdfe63b5dc498f883a124f707266334c9505249355bd220aa825586ea2b37725c0a9281d1abd7805f3e3f441860d659e2eccddbeb5b8e9b4c61a
7
+ data.tar.gz: 6dd3f1c4d6d83edbc34bacd637688c8d9b77b05a27ed13bd52e1ef984bb7a8a789f84f6ff9c574ee3406a3a49306662876b93478794c4511bb57f324b106ca45
data/.version CHANGED
@@ -1 +1 @@
1
- 0.2.21
1
+ 0.2.23
@@ -19,7 +19,9 @@ module LuxAssets
19
19
  end
20
20
 
21
21
  def asset name
22
- @name = name.to_s
22
+ @name = name.to_s
23
+ @in_bulk = true
24
+ @bulk = []
23
25
  yield
24
26
  end
25
27
 
@@ -27,11 +29,6 @@ module LuxAssets
27
29
  class_eval &block
28
30
  end
29
31
 
30
- def bulk name=nil, &block
31
- add_files :js, name, &block
32
- add_files :css, name, &block
33
- end
34
-
35
32
  def js name=nil, &block
36
33
  add_files :js, name, &block
37
34
  end
@@ -46,6 +43,8 @@ module LuxAssets
46
43
  # add 'index.coffee'
47
44
  # add proc { ... }
48
45
  def add added
46
+ return @bulk.push added if @in_bulk
47
+
49
48
  case added
50
49
  when Array
51
50
  add_local_files added
@@ -167,9 +166,11 @@ module LuxAssets
167
166
 
168
167
  def add_files ext, name=nil, &block
169
168
  if block_given?
170
- @files = []
171
- @ext = ext
169
+ @in_bulk = false
170
+ @files = []
171
+ @ext = ext
172
172
  class_eval &block
173
+ @bulk.map { |it| add it }
173
174
  @files.reject! { |it| it.include?('/!') }
174
175
  @assets[ext][@name] = @files.reject { || }
175
176
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lux_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Reic