rack-less 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,14 +31,14 @@ module Rack::Less
31
31
  DEFAULTS = {
32
32
  :cache => false,
33
33
  :compress => false,
34
- :combinations => {}
34
+ :combinations => {},
35
+ :cache_bust => nil
35
36
  }
36
37
 
37
38
  def initialize(settings={})
38
39
  ATTRIBUTES.each do |a|
39
40
  instance_variable_set("@#{a}", settings[a] || DEFAULTS[a])
40
41
  end
41
- @cache_bust = default_cache_bust if @cache_bust.nil?
42
42
  end
43
43
 
44
44
  def cache?
@@ -76,12 +76,12 @@ module Rack::Less
76
76
  def stylesheet_filename(key)
77
77
  filename = key.strip
78
78
  filename += ".css" unless filename.include?('.css')
79
- if !filename.include?('?') && cache_bust
79
+ if !filename.include?('?') && self.cache_bust != false
80
80
  filename += "?"
81
- filename += if cache_bust == true
81
+ filename += if self.cache_bust == true
82
82
  Time.now.to_i
83
83
  else
84
- cache_bust
84
+ self.cache_bust ||= default_cache_bust
85
85
  end.to_s
86
86
  end
87
87
  filename
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Less
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-less
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 13
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ version: 2.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-21 00:00:00 -05:00
19
- default_executable:
18
+ date: 2011-05-09 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: bundler
@@ -193,7 +192,6 @@ files:
193
192
  - test/response_test.rb
194
193
  - test/sinatra_test.rb
195
194
  - test/source_test.rb
196
- has_rdoc: true
197
195
  homepage: http://github.com/kelredd/rack-less
198
196
  licenses: []
199
197
 
@@ -223,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
221
  requirements: []
224
222
 
225
223
  rubyforge_project:
226
- rubygems_version: 1.3.7
224
+ rubygems_version: 1.7.2
227
225
  signing_key:
228
226
  specification_version: 3
229
227
  summary: LESS CSS preprocessing for Rack apps.