specific_asset_compiler 0.2.2 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cfebc687eca4fb2bfa1b41829d4810e0025181e9
4
- data.tar.gz: 8e2065b15fb2e93dd79438b3672d63a7f306e3c0
3
+ metadata.gz: 9bc27a8ddc0b40304412042936a75f78ea54ea41
4
+ data.tar.gz: b468d67fbfd0365df1e1ba0772bc7d73c83bff84
5
5
  SHA512:
6
- metadata.gz: d47005454ac3960756926cd4d9716da76dc2558f978afc1d5961bb309b17b7f40313b2d5f632ec44d0c5a426c5564759567cfb87b8bdd7b7fd979748cd02049c
7
- data.tar.gz: a59db8f6f79cc0e394fec82992819c2f0bd83ff1d44a61464c149e0082fa4d095dfc641a44b757f9ea9665b6bb8ab33635f536a8607c92954702eefc2e1fed6b
6
+ metadata.gz: 95675885285f619ec6e6e1c746461c9c415b33b346e2fee289e5d0031e3396f9690eb365aa5edbef3149e0c692a111ef5a8603af7017caff4d9d6a163dcb2342
7
+ data.tar.gz: a6c16a021ee149556b65b979157daf51a1913b102022128e9a8c6e7caafb1a3b5d6906b67fcd5355c73903cfbc97fb904bbb0ae1dda9647a32750212f1620726
@@ -65,6 +65,9 @@ namespace :assets do
65
65
  end
66
66
 
67
67
  def find_parent(file_path)
68
+ @all_checked_files = @all_checked_files||[]
69
+ return nil if @all_checked_files.include?(file_path)
70
+ @all_checked_files << file_path
68
71
  result = []
69
72
  file_pure_path = file_path.split(".").first
70
73
  file_pure_name = file_path.split("/").last.split(".").first
@@ -82,13 +85,17 @@ namespace :assets do
82
85
  else
83
86
  result << file_path
84
87
  end
85
- result.flatten.uniq.compact.collect{|l|
86
- if have_more_parent?(l)
87
- find_parent(l)
88
- else
89
- l
90
- end
91
- }.flatten.uniq
88
+ if result.present?
89
+ result.flatten.uniq.compact.collect{|l|
90
+ if have_more_parent?(l)
91
+ find_parent(l)
92
+ else
93
+ l
94
+ end
95
+ }.flatten.uniq
96
+ else
97
+ [file_path]
98
+ end
92
99
  end
93
100
 
94
101
  task :specific do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specific_asset_compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanapat Sainak