smart_asset 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
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 does not exist
72
- unless File.exists?(package)
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 yml files
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
@@ -1,3 +1,3 @@
1
1
  class SmartAsset
2
- VERSION = "0.5.0" unless defined?(::SmartAsset::VERSION)
2
+ VERSION = "0.5.1" unless defined?(::SmartAsset::VERSION)
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Winton Welsh