sprockets-sass 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Appraisals +15 -0
- data/Rakefile +2 -2
- data/gemfiles/compass-0.11.gemfile +7 -0
- data/gemfiles/compass-0.12.gemfile +7 -0
- data/gemfiles/sprockets-2.0.gemfile +7 -0
- data/gemfiles/sprockets-2.1.gemfile +7 -0
- data/lib/sprockets/sass/functions.rb +3 -0
- data/lib/sprockets/sass/version.rb +1 -1
- data/spec/sprockets-sass_spec.rb +6 -6
- data/spec/support/be_fresh_matcher.rb +17 -0
- data/sprockets-sass.gemspec +2 -1
- metadata +45 -63
data/.gitignore
CHANGED
data/Appraisals
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
appraise "sprockets-2.0" do
|
2
|
+
gem "sprockets", "~> 2.0.0"
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise "sprockets-2.1" do
|
6
|
+
gem "sprockets", "~> 2.1.0"
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "compass-0.11" do
|
10
|
+
gem "compass", "~> 0.11.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "compass-0.12" do
|
14
|
+
gem "compass", ">= 0.12.alpha.1"
|
15
|
+
end
|
data/Rakefile
CHANGED
@@ -70,6 +70,9 @@ module Sass
|
|
70
70
|
Script::String.new "url(#{image_path(source, options)})"
|
71
71
|
end
|
72
72
|
declare :image_url, [:source], :var_kwargs => true
|
73
|
+
declare :image_url, [:path]
|
74
|
+
declare :image_url, [:path, :only_path]
|
75
|
+
declare :image_url, [:path, :only_path, :cache_buster]
|
73
76
|
|
74
77
|
protected
|
75
78
|
|
data/spec/sprockets-sass_spec.rb
CHANGED
@@ -142,13 +142,13 @@ describe Sprockets::Sass do
|
|
142
142
|
dep = @assets.file "dep.css.scss", "$color: blue;"
|
143
143
|
|
144
144
|
asset = @env["main.css"]
|
145
|
-
asset.should be_fresh
|
145
|
+
asset.should be_fresh(@env)
|
146
146
|
|
147
147
|
mtime = Time.now + 1
|
148
148
|
dep.open("w") { |f| f.write "$color: red;" }
|
149
149
|
dep.utime mtime, mtime
|
150
150
|
|
151
|
-
asset.
|
151
|
+
asset.should_not be_fresh(@env)
|
152
152
|
end
|
153
153
|
|
154
154
|
it "adds dependencies from assets when imported" do
|
@@ -157,13 +157,13 @@ describe Sprockets::Sass do
|
|
157
157
|
dep = @assets.file "dep2.css.scss", "$color: blue;"
|
158
158
|
|
159
159
|
asset = @env["main.css"]
|
160
|
-
asset.should be_fresh
|
160
|
+
asset.should be_fresh(@env)
|
161
161
|
|
162
162
|
mtime = Time.now + 1
|
163
163
|
dep.open("w") { |f| f.write "$color: red;" }
|
164
164
|
dep.utime mtime, mtime
|
165
165
|
|
166
|
-
asset.
|
166
|
+
asset.should_not be_fresh(@env)
|
167
167
|
end
|
168
168
|
|
169
169
|
it "adds dependencies when imported from a glob" do
|
@@ -172,13 +172,13 @@ describe Sprockets::Sass do
|
|
172
172
|
dep = @assets.file "folder/_dep2.scss", "$bg-color: red;"
|
173
173
|
|
174
174
|
asset = @env["main.css"]
|
175
|
-
asset.should be_fresh
|
175
|
+
asset.should be_fresh(@env)
|
176
176
|
|
177
177
|
mtime = Time.now + 1
|
178
178
|
dep.open("w") { |f| f.write "$bg-color: white;" }
|
179
179
|
dep.utime mtime, mtime
|
180
180
|
|
181
|
-
asset.
|
181
|
+
asset.should_not be_fresh(@env)
|
182
182
|
end
|
183
183
|
|
184
184
|
it "adds the #asset_path helper" do
|
@@ -0,0 +1,17 @@
|
|
1
|
+
RSpec::Matchers.define :be_fresh do |env|
|
2
|
+
match do |actual|
|
3
|
+
if actual.method(:fresh?).arity == 1
|
4
|
+
actual.fresh?(env)
|
5
|
+
else
|
6
|
+
actual.fresh?
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
failure_message_for_should do |env|
|
11
|
+
"expected asset to be fresh"
|
12
|
+
end
|
13
|
+
|
14
|
+
failure_message_for_should_not do |env|
|
15
|
+
"expected asset to be stale"
|
16
|
+
end
|
17
|
+
end
|
data/sprockets-sass.gemspec
CHANGED
@@ -19,8 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
s.add_dependency "sprockets", "~> 2.0"
|
22
|
-
s.add_dependency "sprockets-helpers", "~> 0.
|
22
|
+
s.add_dependency "sprockets-helpers", "~> 0.2"
|
23
23
|
s.add_dependency "tilt", "~> 1.1"
|
24
|
+
s.add_development_dependency "appraisal", "~> 0.4"
|
24
25
|
s.add_development_dependency "rspec", "~> 2.6"
|
25
26
|
s.add_development_dependency "test-construct", "~> 1.2"
|
26
27
|
s.add_development_dependency "sass", "~> 3.1"
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 11
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
- 2
|
10
|
-
version: 0.4.2
|
5
|
+
version: 0.4.3
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Pete Browne
|
@@ -15,127 +10,107 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-26 00:00:00 Z
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
16
|
+
name: sprockets
|
21
17
|
requirement: &id001 !ruby/object:Gem::Requirement
|
22
18
|
none: false
|
23
19
|
requirements:
|
24
20
|
- - ~>
|
25
21
|
- !ruby/object:Gem::Version
|
26
|
-
hash: 3
|
27
|
-
segments:
|
28
|
-
- 2
|
29
|
-
- 0
|
30
22
|
version: "2.0"
|
31
|
-
|
23
|
+
type: :runtime
|
32
24
|
prerelease: false
|
33
25
|
version_requirements: *id001
|
34
|
-
type: :runtime
|
35
26
|
- !ruby/object:Gem::Dependency
|
27
|
+
name: sprockets-helpers
|
36
28
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
29
|
none: false
|
38
30
|
requirements:
|
39
31
|
- - ~>
|
40
32
|
- !ruby/object:Gem::Version
|
41
|
-
|
42
|
-
|
43
|
-
- 0
|
44
|
-
- 1
|
45
|
-
version: "0.1"
|
46
|
-
name: sprockets-helpers
|
33
|
+
version: "0.2"
|
34
|
+
type: :runtime
|
47
35
|
prerelease: false
|
48
36
|
version_requirements: *id002
|
49
|
-
type: :runtime
|
50
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
name: tilt
|
51
39
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
40
|
none: false
|
53
41
|
requirements:
|
54
42
|
- - ~>
|
55
43
|
- !ruby/object:Gem::Version
|
56
|
-
hash: 13
|
57
|
-
segments:
|
58
|
-
- 1
|
59
|
-
- 1
|
60
44
|
version: "1.1"
|
61
|
-
|
45
|
+
type: :runtime
|
62
46
|
prerelease: false
|
63
47
|
version_requirements: *id003
|
64
|
-
type: :runtime
|
65
48
|
- !ruby/object:Gem::Dependency
|
49
|
+
name: appraisal
|
66
50
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
51
|
none: false
|
68
52
|
requirements:
|
69
53
|
- - ~>
|
70
54
|
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
|
73
|
-
- 2
|
74
|
-
- 6
|
75
|
-
version: "2.6"
|
76
|
-
name: rspec
|
55
|
+
version: "0.4"
|
56
|
+
type: :development
|
77
57
|
prerelease: false
|
78
58
|
version_requirements: *id004
|
79
|
-
type: :development
|
80
59
|
- !ruby/object:Gem::Dependency
|
60
|
+
name: rspec
|
81
61
|
requirement: &id005 !ruby/object:Gem::Requirement
|
82
62
|
none: false
|
83
63
|
requirements:
|
84
64
|
- - ~>
|
85
65
|
- !ruby/object:Gem::Version
|
86
|
-
|
87
|
-
|
88
|
-
- 1
|
89
|
-
- 2
|
90
|
-
version: "1.2"
|
91
|
-
name: test-construct
|
66
|
+
version: "2.6"
|
67
|
+
type: :development
|
92
68
|
prerelease: false
|
93
69
|
version_requirements: *id005
|
94
|
-
type: :development
|
95
70
|
- !ruby/object:Gem::Dependency
|
71
|
+
name: test-construct
|
96
72
|
requirement: &id006 !ruby/object:Gem::Requirement
|
97
73
|
none: false
|
98
74
|
requirements:
|
99
75
|
- - ~>
|
100
76
|
- !ruby/object:Gem::Version
|
101
|
-
|
102
|
-
|
103
|
-
- 3
|
104
|
-
- 1
|
105
|
-
version: "3.1"
|
106
|
-
name: sass
|
77
|
+
version: "1.2"
|
78
|
+
type: :development
|
107
79
|
prerelease: false
|
108
80
|
version_requirements: *id006
|
109
|
-
type: :development
|
110
81
|
- !ruby/object:Gem::Dependency
|
82
|
+
name: sass
|
111
83
|
requirement: &id007 !ruby/object:Gem::Requirement
|
112
84
|
none: false
|
113
85
|
requirements:
|
114
86
|
- - ~>
|
115
87
|
- !ruby/object:Gem::Version
|
116
|
-
|
117
|
-
|
118
|
-
- 0
|
119
|
-
- 11
|
120
|
-
version: "0.11"
|
121
|
-
name: compass
|
88
|
+
version: "3.1"
|
89
|
+
type: :development
|
122
90
|
prerelease: false
|
123
91
|
version_requirements: *id007
|
124
|
-
type: :development
|
125
92
|
- !ruby/object:Gem::Dependency
|
93
|
+
name: compass
|
126
94
|
requirement: &id008 !ruby/object:Gem::Requirement
|
127
95
|
none: false
|
128
96
|
requirements:
|
129
|
-
- -
|
97
|
+
- - ~>
|
130
98
|
- !ruby/object:Gem::Version
|
131
|
-
|
132
|
-
|
133
|
-
- 0
|
134
|
-
version: "0"
|
135
|
-
name: rake
|
99
|
+
version: "0.11"
|
100
|
+
type: :development
|
136
101
|
prerelease: false
|
137
102
|
version_requirements: *id008
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rake
|
105
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: "0"
|
138
111
|
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: *id009
|
139
114
|
description: When using Sprockets 2.0 with Sass you will eventually run into a pretty big issue. `//= require` directives will not allow Sass mixins, variables, etc. to be shared between files. So you'll try to use `@import`, and that'll also blow up in your face. `sprockets-sass` fixes all of this by creating a Sass::Importer that is Sprockets aware.
|
140
115
|
email:
|
141
116
|
- me@petebrowne.com
|
@@ -147,10 +122,15 @@ extra_rdoc_files: []
|
|
147
122
|
|
148
123
|
files:
|
149
124
|
- .gitignore
|
125
|
+
- Appraisals
|
150
126
|
- Gemfile
|
151
127
|
- LICENSE
|
152
128
|
- README.md
|
153
129
|
- Rakefile
|
130
|
+
- gemfiles/compass-0.11.gemfile
|
131
|
+
- gemfiles/compass-0.12.gemfile
|
132
|
+
- gemfiles/sprockets-2.0.gemfile
|
133
|
+
- gemfiles/sprockets-2.1.gemfile
|
154
134
|
- lib/sprockets-sass.rb
|
155
135
|
- lib/sprockets/sass.rb
|
156
136
|
- lib/sprockets/sass/functions.rb
|
@@ -160,6 +140,7 @@ files:
|
|
160
140
|
- lib/sprockets/sass/version.rb
|
161
141
|
- spec/spec_helper.rb
|
162
142
|
- spec/sprockets-sass_spec.rb
|
143
|
+
- spec/support/be_fresh_matcher.rb
|
163
144
|
- sprockets-sass.gemspec
|
164
145
|
homepage: http://github.com/petebrowne/sprockets-sass
|
165
146
|
licenses: []
|
@@ -174,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
155
|
requirements:
|
175
156
|
- - ">="
|
176
157
|
- !ruby/object:Gem::Version
|
177
|
-
hash:
|
158
|
+
hash: 1064993997988452043
|
178
159
|
segments:
|
179
160
|
- 0
|
180
161
|
version: "0"
|
@@ -183,17 +164,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
164
|
requirements:
|
184
165
|
- - ">="
|
185
166
|
- !ruby/object:Gem::Version
|
186
|
-
hash:
|
167
|
+
hash: 1064993997988452043
|
187
168
|
segments:
|
188
169
|
- 0
|
189
170
|
version: "0"
|
190
171
|
requirements: []
|
191
172
|
|
192
173
|
rubyforge_project: sprockets-sass
|
193
|
-
rubygems_version: 1.8.
|
174
|
+
rubygems_version: 1.8.8
|
194
175
|
signing_key:
|
195
176
|
specification_version: 3
|
196
177
|
summary: Better Sass integration with Sprockets 2.0
|
197
178
|
test_files:
|
198
179
|
- spec/spec_helper.rb
|
199
180
|
- spec/sprockets-sass_spec.rb
|
181
|
+
- spec/support/be_fresh_matcher.rb
|