smart_asset 0.5.0 → 0.5.1
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.
- data/lib/smart_asset.rb +9 -4
- data/lib/smart_asset/version.rb +1 -1
- metadata +2 -2
data/lib/smart_asset.rb
CHANGED
@@ -68,8 +68,10 @@ class SmartAsset
|
|
68
68
|
package = "#{dest}/#{hash}_#{package}.#{ext}"
|
69
69
|
packages << package
|
70
70
|
|
71
|
-
# If package file
|
72
|
-
|
71
|
+
# If package file exists
|
72
|
+
if File.exists?(package)
|
73
|
+
packages << package
|
74
|
+
else
|
73
75
|
data = []
|
74
76
|
|
75
77
|
# Join files in package
|
@@ -106,6 +108,9 @@ class SmartAsset
|
|
106
108
|
`sed -i 's/ and(/ and (/g' #{package}`
|
107
109
|
end
|
108
110
|
end
|
111
|
+
|
112
|
+
# Package created
|
113
|
+
packages << package
|
109
114
|
end
|
110
115
|
end
|
111
116
|
end
|
@@ -115,8 +120,8 @@ class SmartAsset
|
|
115
120
|
FileUtils.rm path
|
116
121
|
end
|
117
122
|
|
118
|
-
# Delete legacy
|
119
|
-
Dir["#{dest}/*.yml"].each do |path|
|
123
|
+
# Delete legacy files
|
124
|
+
Dir["#{dest}/*.yml", "#{dest}/??????????????_*.{css,js}"].each do |path|
|
120
125
|
FileUtils.rm path
|
121
126
|
end
|
122
127
|
end
|
data/lib/smart_asset/version.rb
CHANGED