sprockets-sass 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -84,12 +84,12 @@ module Sprockets
84
84
  path = Pathname.new(path) unless path.is_a?(Pathname)
85
85
 
86
86
  # First look for the normal path
87
- context.resolve(path) { |found| return found }
87
+ context.resolve(path) { |found| return found if context.asset_requirable?(found) }
88
88
 
89
89
  # Then look for the partial-style version
90
90
  unless path.basename.to_s =~ /^_/
91
91
  partial = path.dirname.join "_#{path.basename}"
92
- context.resolve(partial) { |found| return found }
92
+ context.resolve(partial) { |found| return found if context.asset_requirable?(found) }
93
93
  end
94
94
 
95
95
  nil
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Sass
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -47,6 +47,14 @@ describe Sprockets::Sass do
47
47
  asset.to_s.should == "html {\n height: 100%; }\n\nbody {\n color: blue; }\n"
48
48
  end
49
49
 
50
+ it "imports files with the correct content type" do
51
+ @assets.file "main.css.scss", %(@import "dep";\nbody { color: $color; })
52
+ @assets.file "dep.js", "var app = {};"
53
+ @assets.file "_dep.css.scss", "$color: blue;"
54
+ asset = @env["main.css"]
55
+ asset.to_s.should == "body {\n color: blue; }\n"
56
+ end
57
+
50
58
  it "imports files with directives" do
51
59
  @assets.file "main.css.scss", %(@import "dep";)
52
60
  @assets.file "dep.css", "/*\n *= require subdep\n */"
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-sass
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 13
4
5
  prerelease:
5
- version: 0.4.0
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 1
10
+ version: 0.4.1
6
11
  platform: ruby
7
12
  authors:
8
13
  - Pete Browne
@@ -13,93 +18,124 @@ cert_chain: []
13
18
  date: 2011-11-02 00:00:00 Z
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
- name: sprockets
17
21
  requirement: &id001 !ruby/object:Gem::Requirement
18
22
  none: false
19
23
  requirements:
20
24
  - - ~>
21
25
  - !ruby/object:Gem::Version
26
+ hash: 3
27
+ segments:
28
+ - 2
29
+ - 0
22
30
  version: "2.0"
23
- type: :runtime
24
- prerelease: false
31
+ name: sprockets
25
32
  version_requirements: *id001
33
+ prerelease: false
34
+ type: :runtime
26
35
  - !ruby/object:Gem::Dependency
27
- name: sprockets-helpers
28
36
  requirement: &id002 !ruby/object:Gem::Requirement
29
37
  none: false
30
38
  requirements:
31
39
  - - ~>
32
40
  - !ruby/object:Gem::Version
41
+ hash: 9
42
+ segments:
43
+ - 0
44
+ - 1
33
45
  version: "0.1"
34
- type: :runtime
35
- prerelease: false
46
+ name: sprockets-helpers
36
47
  version_requirements: *id002
48
+ prerelease: false
49
+ type: :runtime
37
50
  - !ruby/object:Gem::Dependency
38
- name: tilt
39
51
  requirement: &id003 !ruby/object:Gem::Requirement
40
52
  none: false
41
53
  requirements:
42
54
  - - ~>
43
55
  - !ruby/object:Gem::Version
56
+ hash: 13
57
+ segments:
58
+ - 1
59
+ - 1
44
60
  version: "1.1"
45
- type: :runtime
46
- prerelease: false
61
+ name: tilt
47
62
  version_requirements: *id003
63
+ prerelease: false
64
+ type: :runtime
48
65
  - !ruby/object:Gem::Dependency
49
- name: rspec
50
66
  requirement: &id004 !ruby/object:Gem::Requirement
51
67
  none: false
52
68
  requirements:
53
69
  - - ~>
54
70
  - !ruby/object:Gem::Version
71
+ hash: 15
72
+ segments:
73
+ - 2
74
+ - 6
55
75
  version: "2.6"
56
- type: :development
57
- prerelease: false
76
+ name: rspec
58
77
  version_requirements: *id004
78
+ prerelease: false
79
+ type: :development
59
80
  - !ruby/object:Gem::Dependency
60
- name: test-construct
61
81
  requirement: &id005 !ruby/object:Gem::Requirement
62
82
  none: false
63
83
  requirements:
64
84
  - - ~>
65
85
  - !ruby/object:Gem::Version
86
+ hash: 11
87
+ segments:
88
+ - 1
89
+ - 2
66
90
  version: "1.2"
67
- type: :development
68
- prerelease: false
91
+ name: test-construct
69
92
  version_requirements: *id005
93
+ prerelease: false
94
+ type: :development
70
95
  - !ruby/object:Gem::Dependency
71
- name: sass
72
96
  requirement: &id006 !ruby/object:Gem::Requirement
73
97
  none: false
74
98
  requirements:
75
99
  - - ~>
76
100
  - !ruby/object:Gem::Version
101
+ hash: 5
102
+ segments:
103
+ - 3
104
+ - 1
77
105
  version: "3.1"
78
- type: :development
79
- prerelease: false
106
+ name: sass
80
107
  version_requirements: *id006
108
+ prerelease: false
109
+ type: :development
81
110
  - !ruby/object:Gem::Dependency
82
- name: compass
83
111
  requirement: &id007 !ruby/object:Gem::Requirement
84
112
  none: false
85
113
  requirements:
86
114
  - - ~>
87
115
  - !ruby/object:Gem::Version
116
+ hash: 29
117
+ segments:
118
+ - 0
119
+ - 11
88
120
  version: "0.11"
89
- type: :development
90
- prerelease: false
121
+ name: compass
91
122
  version_requirements: *id007
123
+ prerelease: false
124
+ type: :development
92
125
  - !ruby/object:Gem::Dependency
93
- name: rake
94
126
  requirement: &id008 !ruby/object:Gem::Requirement
95
127
  none: false
96
128
  requirements:
97
129
  - - ">="
98
130
  - !ruby/object:Gem::Version
131
+ hash: 3
132
+ segments:
133
+ - 0
99
134
  version: "0"
100
- type: :development
101
- prerelease: false
135
+ name: rake
102
136
  version_requirements: *id008
137
+ prerelease: false
138
+ type: :development
103
139
  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.
104
140
  email:
105
141
  - me@petebrowne.com
@@ -138,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
174
  requirements:
139
175
  - - ">="
140
176
  - !ruby/object:Gem::Version
141
- hash: 2155872013882302780
177
+ hash: 3
142
178
  segments:
143
179
  - 0
144
180
  version: "0"
@@ -147,14 +183,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
183
  requirements:
148
184
  - - ">="
149
185
  - !ruby/object:Gem::Version
150
- hash: 2155872013882302780
186
+ hash: 3
151
187
  segments:
152
188
  - 0
153
189
  version: "0"
154
190
  requirements: []
155
191
 
156
192
  rubyforge_project: sprockets-sass
157
- rubygems_version: 1.8.8
193
+ rubygems_version: 1.8.5
158
194
  signing_key:
159
195
  specification_version: 3
160
196
  summary: Better Sass integration with Sprockets 2.0