smart_asset 0.5.3 → 0.5.4

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/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>
File without changes
@@ -6,8 +6,8 @@ unless defined?(SmartAsset::Gems)
6
6
  class Gems
7
7
 
8
8
  VERSIONS = {
9
- :framework_fixture => '0.1.2',
10
- :'rack-test' => '0.5.6',
9
+ :framework_fixture => '0.1.3',
10
+ :'rack-test' => '0.5.7',
11
11
  :rake => '=0.8.7',
12
12
  :rspec => '=1.3.1'
13
13
  }
@@ -1,3 +1,3 @@
1
1
  class SmartAsset
2
- VERSION = "0.5.3" unless defined?(::SmartAsset::VERSION)
2
+ VERSION = "0.5.4" unless defined?(::SmartAsset::VERSION)
3
3
  end
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
- if File.exists?("#{dir}/#{file}.#{ext}")
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}"].sort.last
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
- - 3
9
- version: 0.5.3
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: 2010-12-21 00:00:00 -08:00
17
+ date: 2011-01-20 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency