rails2_asset_pipeline 0.1.19 → 0.1.20
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/Gemfile.lock
CHANGED
@@ -16,7 +16,7 @@ module Rails2AssetPipeline
|
|
16
16
|
)
|
17
17
|
|
18
18
|
if source_is_relative
|
19
|
-
source = "#{source}.#{args[2]}"
|
19
|
+
source = "#{source}.#{args[2]}" if args[2] and File.extname(source) != ".#{args[2]}"
|
20
20
|
super(asset_path(source), *args[1..-1])
|
21
21
|
else
|
22
22
|
super
|
@@ -140,24 +140,24 @@ describe Rails2AssetPipeline::ViewHelpers do
|
|
140
140
|
|
141
141
|
describe "#compute_public_path" do
|
142
142
|
it "does nothing for symbols" do
|
143
|
-
compute_public_path(:xxx, "a", "
|
144
|
-
@compute_public_path.should == [:xxx, "a", "
|
143
|
+
compute_public_path(:xxx, "a", "js").should == :super
|
144
|
+
@compute_public_path.should == [:xxx, "a", "js"]
|
145
145
|
end
|
146
146
|
|
147
147
|
it "does nothing for paths starting with /" do
|
148
|
-
compute_public_path("/xxx", "a", "
|
149
|
-
@compute_public_path.should == ["/xxx", "a", "
|
148
|
+
compute_public_path("/xxx", "a", "js").should == :super
|
149
|
+
@compute_public_path.should == ["/xxx", "a", "js"]
|
150
150
|
end
|
151
151
|
|
152
152
|
it "does nothing for urls" do
|
153
|
-
compute_public_path("http://xxx", "a", "
|
154
|
-
@compute_public_path.should == ["http://xxx", "a", "
|
153
|
+
compute_public_path("http://xxx", "a", "js").should == :super
|
154
|
+
@compute_public_path.should == ["http://xxx", "a", "js"]
|
155
155
|
end
|
156
156
|
|
157
157
|
it "does nothing for ignored folders" do
|
158
158
|
Rails2AssetPipeline::ViewHelpers.ignored_folders = ["a"]
|
159
|
-
compute_public_path("xxx", "a", "
|
160
|
-
@compute_public_path.should == ["xxx", "a", "
|
159
|
+
compute_public_path("xxx", "a", "js").should == :super
|
160
|
+
@compute_public_path.should == ["xxx", "a", "js"]
|
161
161
|
end
|
162
162
|
|
163
163
|
it "converts relative, nested paths without extension" do
|
@@ -167,8 +167,8 @@ describe Rails2AssetPipeline::ViewHelpers do
|
|
167
167
|
end
|
168
168
|
|
169
169
|
it "converts relative paths with extension" do
|
170
|
-
compute_public_path("xxx.js", "a", "
|
171
|
-
@compute_public_path.should == ["/assets/xxx.js?123456", "a", "
|
170
|
+
compute_public_path("xxx.js", "a", "js").should == :super
|
171
|
+
@compute_public_path.should == ["/assets/xxx.js?123456", "a", "js"]
|
172
172
|
end
|
173
173
|
|
174
174
|
it "converts relative paths with ." do
|
@@ -179,13 +179,24 @@ describe Rails2AssetPipeline::ViewHelpers do
|
|
179
179
|
|
180
180
|
it "converts relative paths with extension and non-word characters" do
|
181
181
|
env["xx_-x.js"] = env["xxx.js"]
|
182
|
-
compute_public_path("xx_-x.js", "a", "
|
183
|
-
@compute_public_path.should == ["/assets/xx_-x.js?123456", "a", "
|
182
|
+
compute_public_path("xx_-x.js", "a", "js").should == :super
|
183
|
+
@compute_public_path.should == ["/assets/xx_-x.js?123456", "a", "js"]
|
184
184
|
end
|
185
185
|
|
186
186
|
it "converts relative paths without extension" do
|
187
187
|
compute_public_path("xxx", "a", "js").should == :super
|
188
188
|
@compute_public_path.should == ["/assets/xxx.js?123456", "a", "js"]
|
189
189
|
end
|
190
|
+
|
191
|
+
it "converts relative paths without extension and . filenames" do
|
192
|
+
env["xx.x.js"] = env["xxx.js"]
|
193
|
+
compute_public_path("xx.x", "a", "js").should == :super
|
194
|
+
@compute_public_path.should == ["/assets/xx.x.js?123456", "a", "js"]
|
195
|
+
end
|
196
|
+
|
197
|
+
it "converts relative paths with extensions and no default extension" do
|
198
|
+
compute_public_path("xxx.js", "a").should == :super
|
199
|
+
@compute_public_path.should == ["/assets/xxx.js?123456", "a"]
|
200
|
+
end
|
190
201
|
end
|
191
202
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails2_asset_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
segments:
|
69
69
|
- 0
|
70
|
-
hash:
|
70
|
+
hash: -3628641569286209555
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
segments:
|
78
78
|
- 0
|
79
|
-
hash:
|
79
|
+
hash: -3628641569286209555
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
82
|
rubygems_version: 1.8.24
|