sprockets 2.9.4 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprockets might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/sprockets/asset_attributes.rb +3 -1
- data/lib/sprockets/base.rb +5 -5
- data/lib/sprockets/server.rb +7 -7
- data/lib/sprockets/version.rb +1 -1
- metadata +42 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c90e3417598a1b64c0be6d72a414197353e0b788
|
4
|
+
data.tar.gz: 2af70c60e64be9dae58a09a6187eb75eb53f3462
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 306b16c0e46699a7a38027db68081e5a33991961a6da1c95dc0ff25a3b0d3f0716c32a93f4895467588b28fa188da72c1f4ac3b2d314298f0d2b6fe914793dfd
|
7
|
+
data.tar.gz: b05e30570a5ad91f01dff636a5d3ffe00d3c3a5feb752a53e558932b8783a68c565b88da395673acbc3e2fd94274b177e3815a22b3b45359dc4f4090035fe681
|
data/README.md
CHANGED
@@ -19,8 +19,10 @@ module Sprockets
|
|
19
19
|
|
20
20
|
path_without_extensions = extensions.inject(pathname) { |p, ext| p.sub(ext, '') }
|
21
21
|
|
22
|
-
# optimization:
|
22
|
+
# optimization: bower.json can only be nested one level deep
|
23
23
|
if !path_without_extensions.to_s.index('/')
|
24
|
+
paths << path_without_extensions.join("bower.json").to_s
|
25
|
+
# DEPRECATED bower configuration file
|
24
26
|
paths << path_without_extensions.join("component.json").to_s
|
25
27
|
end
|
26
28
|
|
data/lib/sprockets/base.rb
CHANGED
@@ -129,14 +129,14 @@ module Sprockets
|
|
129
129
|
args = attributes_for(logical_path).search_paths + [options]
|
130
130
|
@trail.find(*args) do |path|
|
131
131
|
pathname = Pathname.new(path)
|
132
|
-
if pathname.basename.to_s
|
133
|
-
|
134
|
-
case
|
132
|
+
if %w( bower.json component.json ).include?(pathname.basename.to_s)
|
133
|
+
bower = json_decode(pathname.read)
|
134
|
+
case bower['main']
|
135
135
|
when String
|
136
|
-
yield pathname.dirname.join(
|
136
|
+
yield pathname.dirname.join(bower['main'])
|
137
137
|
when Array
|
138
138
|
extname = File.extname(logical_path)
|
139
|
-
|
139
|
+
bower['main'].each do |fn|
|
140
140
|
if extname == "" || extname == File.extname(fn)
|
141
141
|
yield pathname.dirname.join(fn)
|
142
142
|
end
|
data/lib/sprockets/server.rb
CHANGED
@@ -33,16 +33,16 @@ module Sprockets
|
|
33
33
|
# Extract the path from everything after the leading slash
|
34
34
|
path = unescape(env['PATH_INFO'].to_s.sub(/^\//, ''))
|
35
35
|
|
36
|
-
# Strip fingerprint
|
37
|
-
if fingerprint = path_fingerprint(path)
|
38
|
-
path = path.sub("-#{fingerprint}", '')
|
39
|
-
end
|
40
|
-
|
41
36
|
# URLs containing a `".."` are rejected for security reasons.
|
42
37
|
if forbidden_request?(path)
|
43
38
|
return forbidden_response
|
44
39
|
end
|
45
40
|
|
41
|
+
# Strip fingerprint
|
42
|
+
if fingerprint = path_fingerprint(path)
|
43
|
+
path = path.sub("-#{fingerprint}", '')
|
44
|
+
end
|
45
|
+
|
46
46
|
# Look up the asset.
|
47
47
|
asset = find_asset(path, :bundle => !body_only?(env))
|
48
48
|
|
@@ -90,7 +90,7 @@ module Sprockets
|
|
90
90
|
#
|
91
91
|
# http://example.org/assets/../../../etc/passwd
|
92
92
|
#
|
93
|
-
path.include?("..")
|
93
|
+
path.include?("..")
|
94
94
|
end
|
95
95
|
|
96
96
|
# Returns a 403 Forbidden response tuple
|
@@ -222,7 +222,7 @@ module Sprockets
|
|
222
222
|
# # => "0aa2105d29558f3eb790d411d7d8fb66"
|
223
223
|
#
|
224
224
|
def path_fingerprint(path)
|
225
|
-
path[/-([0-9a-f]{7,40})\.[^.]
|
225
|
+
path[/-([0-9a-f]{7,40})\.[^.]+$/, 1]
|
226
226
|
end
|
227
227
|
|
228
228
|
# URI.unescape is deprecated on 1.9. We need to use URI::Parser
|
data/lib/sprockets/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stephenson
|
@@ -9,236 +9,236 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hike
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.2'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.2'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: multi_json
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rack
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '1.0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: tilt
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '1.1'
|
63
|
-
- -
|
63
|
+
- - '!='
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: 1.3.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- -
|
70
|
+
- - ~>
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '1.1'
|
73
|
-
- -
|
73
|
+
- - '!='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.3.0
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: closure-compiler
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: coffee-script
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.0'
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '2.0'
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: coffee-script-source
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.2'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '1.2'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: eco
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1.0'
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '1.0'
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
133
|
name: ejs
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.0'
|
139
139
|
type: :development
|
140
140
|
prerelease: false
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '1.0'
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: execjs
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '1.0'
|
153
153
|
type: :development
|
154
154
|
prerelease: false
|
155
155
|
version_requirements: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '1.0'
|
160
160
|
- !ruby/object:Gem::Dependency
|
161
161
|
name: json
|
162
162
|
requirement: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - '>='
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
type: :development
|
168
168
|
prerelease: false
|
169
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: rack-test
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - '>='
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
type: :development
|
182
182
|
prerelease: false
|
183
183
|
version_requirements: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - '>='
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
- !ruby/object:Gem::Dependency
|
189
189
|
name: rake
|
190
190
|
requirement: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - '>='
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
type: :development
|
196
196
|
prerelease: false
|
197
197
|
version_requirements: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- -
|
199
|
+
- - '>='
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
- !ruby/object:Gem::Dependency
|
203
203
|
name: sass
|
204
204
|
requirement: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ~>
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '3.1'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
211
|
version_requirements: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - ~>
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '3.1'
|
216
216
|
- !ruby/object:Gem::Dependency
|
217
217
|
name: uglifier
|
218
218
|
requirement: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - '>='
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
type: :development
|
224
224
|
prerelease: false
|
225
225
|
version_requirements: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- -
|
227
|
+
- - '>='
|
228
228
|
- !ruby/object:Gem::Version
|
229
229
|
version: '0'
|
230
230
|
- !ruby/object:Gem::Dependency
|
231
231
|
name: yui-compressor
|
232
232
|
requirement: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- -
|
234
|
+
- - '>='
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
type: :development
|
238
238
|
prerelease: false
|
239
239
|
version_requirements: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- -
|
241
|
+
- - '>='
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
description: Sprockets is a Rack-based asset packaging system that concatenates and
|
@@ -251,11 +251,9 @@ executables:
|
|
251
251
|
extensions: []
|
252
252
|
extra_rdoc_files: []
|
253
253
|
files:
|
254
|
-
- LICENSE
|
255
254
|
- README.md
|
256
|
-
-
|
255
|
+
- LICENSE
|
257
256
|
- lib/rake/sprocketstask.rb
|
258
|
-
- lib/sprockets.rb
|
259
257
|
- lib/sprockets/asset.rb
|
260
258
|
- lib/sprockets/asset_attributes.rb
|
261
259
|
- lib/sprockets/base.rb
|
@@ -293,6 +291,8 @@ files:
|
|
293
291
|
- lib/sprockets/utils.rb
|
294
292
|
- lib/sprockets/version.rb
|
295
293
|
- lib/sprockets/yui_compressor.rb
|
294
|
+
- lib/sprockets.rb
|
295
|
+
- bin/sprockets
|
296
296
|
homepage: http://getsprockets.org/
|
297
297
|
licenses:
|
298
298
|
- MIT
|
@@ -303,17 +303,17 @@ require_paths:
|
|
303
303
|
- lib
|
304
304
|
required_ruby_version: !ruby/object:Gem::Requirement
|
305
305
|
requirements:
|
306
|
-
- -
|
306
|
+
- - '>='
|
307
307
|
- !ruby/object:Gem::Version
|
308
308
|
version: '0'
|
309
309
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
310
310
|
requirements:
|
311
|
-
- -
|
311
|
+
- - '>='
|
312
312
|
- !ruby/object:Gem::Version
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
315
|
rubyforge_project: sprockets
|
316
|
-
rubygems_version: 2.
|
316
|
+
rubygems_version: 2.0.0
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: Rack-based asset packaging system
|