smart_asset 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -0
- data/bin/closure_compiler.jar +0 -0
- data/lib/smart_asset/gems.rb +2 -2
- data/lib/smart_asset/version.rb +1 -1
- data/lib/smart_asset.rb +5 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -152,4 +152,21 @@ You may use environment variables with the <code>smart\_asset</code> command to
|
|
152
152
|
|
153
153
|
<pre>
|
154
154
|
WARN=1 smart_asset
|
155
|
+
</pre>
|
156
|
+
|
157
|
+
Running Specs
|
158
|
+
-------------
|
159
|
+
|
160
|
+
Forks and contributions to this project are much appreciated, but please make sure the specs run!
|
161
|
+
|
162
|
+
To run the basic specs:
|
163
|
+
|
164
|
+
<pre>
|
165
|
+
spec spec
|
166
|
+
</pre>
|
167
|
+
|
168
|
+
There are also framework specs to make sure the helpers work in Rails 2, Rails 3, and Sinatra 1:
|
169
|
+
|
170
|
+
<pre>
|
171
|
+
spec/run
|
155
172
|
</pre>
|
data/bin/closure_compiler.jar
CHANGED
File without changes
|
data/lib/smart_asset/gems.rb
CHANGED
data/lib/smart_asset/version.rb
CHANGED
data/lib/smart_asset.rb
CHANGED
@@ -42,7 +42,8 @@ class SmartAsset
|
|
42
42
|
# Retrieve list of Git modified timestamps
|
43
43
|
timestamps = []
|
44
44
|
files.each do |file|
|
45
|
-
|
45
|
+
file_path = "#{dir}/#{file}.#{ext}"
|
46
|
+
if File.exists?(file_path)
|
46
47
|
if time_cache[file]
|
47
48
|
time = time_cache[file]
|
48
49
|
else
|
@@ -57,6 +58,8 @@ class SmartAsset
|
|
57
58
|
time_cache[file] = time
|
58
59
|
end
|
59
60
|
timestamps << time
|
61
|
+
else
|
62
|
+
$stderr.puts "WARNING: '#{file_path}' was not found."
|
60
63
|
end
|
61
64
|
end
|
62
65
|
next if timestamps.empty?
|
@@ -194,7 +197,7 @@ class SmartAsset
|
|
194
197
|
|
195
198
|
if @envs.include?(@env.to_s)
|
196
199
|
@cache[type][match] =
|
197
|
-
if result = Dir["#{dest}/#{"[^_]"*8}_#{match}.#{ext}"].
|
200
|
+
if result = Dir["#{dest}/#{"[^_]"*8}_#{match}.#{ext}"].first
|
198
201
|
[ result.gsub(@pub, '') ]
|
199
202
|
else
|
200
203
|
[]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 4
|
9
|
+
version: 0.5.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Winton Welsh
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-20 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|