sprockets 2.8.3 → 2.9.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.

data/README.md CHANGED
@@ -361,6 +361,10 @@ submit a pull request.
361
361
 
362
362
  ## Version History ##
363
363
 
364
+ **2.9.0** (February 25, 2013)
365
+
366
+ * Write out gzipped variants of bundled assets.
367
+
364
368
  **2.8.2** (December 10, 2012)
365
369
 
366
370
  * Fixed top level Sass constant references
@@ -132,6 +132,7 @@ module Sprockets
132
132
  else
133
133
  logger.info "Writing #{target}"
134
134
  asset.write_to target
135
+ asset.write_to "#{target}.gz" if asset.is_a?(BundledAsset)
135
136
  end
136
137
 
137
138
  save
@@ -147,6 +148,7 @@ module Sprockets
147
148
  #
148
149
  def remove(filename)
149
150
  path = File.join(dir, filename)
151
+ gzip = "#{path}.gz"
150
152
  logical_path = files[filename]['logical_path']
151
153
 
152
154
  if assets[logical_path] == filename
@@ -155,6 +157,7 @@ module Sprockets
155
157
 
156
158
  files.delete(filename)
157
159
  FileUtils.rm(path) if File.exist?(path)
160
+ FileUtils.rm(gzip) if File.exist?(gzip)
158
161
 
159
162
  save
160
163
 
@@ -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?("..") || Pathname.new(path).absolute?
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})\.[^.]+\z/, 1]
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
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "2.8.3"
2
+ VERSION = "2.9.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.9.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Sam Stephenson
@@ -9,236 +10,268 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-10-28 00:00:00.000000000 Z
13
+ date: 2013-02-25 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: hike
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - "~>"
20
+ - - ~>
19
21
  - !ruby/object:Gem::Version
20
22
  version: '1.2'
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - "~>"
28
+ - - ~>
26
29
  - !ruby/object:Gem::Version
27
30
  version: '1.2'
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: multi_json
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - "~>"
36
+ - - ~>
33
37
  - !ruby/object:Gem::Version
34
38
  version: '1.0'
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - "~>"
44
+ - - ~>
40
45
  - !ruby/object:Gem::Version
41
46
  version: '1.0'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: rack
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - "~>"
52
+ - - ~>
47
53
  - !ruby/object:Gem::Version
48
54
  version: '1.0'
49
55
  type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - "~>"
60
+ - - ~>
54
61
  - !ruby/object:Gem::Version
55
62
  version: '1.0'
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: tilt
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - "~>"
68
+ - - ~>
61
69
  - !ruby/object:Gem::Version
62
70
  version: '1.1'
63
- - - "!="
71
+ - - ! '!='
64
72
  - !ruby/object:Gem::Version
65
73
  version: 1.3.0
66
74
  type: :runtime
67
75
  prerelease: false
68
76
  version_requirements: !ruby/object:Gem::Requirement
77
+ none: false
69
78
  requirements:
70
- - - "~>"
79
+ - - ~>
71
80
  - !ruby/object:Gem::Version
72
81
  version: '1.1'
73
- - - "!="
82
+ - - ! '!='
74
83
  - !ruby/object:Gem::Version
75
84
  version: 1.3.0
76
85
  - !ruby/object:Gem::Dependency
77
86
  name: closure-compiler
78
87
  requirement: !ruby/object:Gem::Requirement
88
+ none: false
79
89
  requirements:
80
- - - ">="
90
+ - - ! '>='
81
91
  - !ruby/object:Gem::Version
82
92
  version: '0'
83
93
  type: :development
84
94
  prerelease: false
85
95
  version_requirements: !ruby/object:Gem::Requirement
96
+ none: false
86
97
  requirements:
87
- - - ">="
98
+ - - ! '>='
88
99
  - !ruby/object:Gem::Version
89
100
  version: '0'
90
101
  - !ruby/object:Gem::Dependency
91
102
  name: coffee-script
92
103
  requirement: !ruby/object:Gem::Requirement
104
+ none: false
93
105
  requirements:
94
- - - "~>"
106
+ - - ~>
95
107
  - !ruby/object:Gem::Version
96
108
  version: '2.0'
97
109
  type: :development
98
110
  prerelease: false
99
111
  version_requirements: !ruby/object:Gem::Requirement
112
+ none: false
100
113
  requirements:
101
- - - "~>"
114
+ - - ~>
102
115
  - !ruby/object:Gem::Version
103
116
  version: '2.0'
104
117
  - !ruby/object:Gem::Dependency
105
118
  name: coffee-script-source
106
119
  requirement: !ruby/object:Gem::Requirement
120
+ none: false
107
121
  requirements:
108
- - - "~>"
122
+ - - ~>
109
123
  - !ruby/object:Gem::Version
110
124
  version: 1.2.0
111
125
  type: :development
112
126
  prerelease: false
113
127
  version_requirements: !ruby/object:Gem::Requirement
128
+ none: false
114
129
  requirements:
115
- - - "~>"
130
+ - - ~>
116
131
  - !ruby/object:Gem::Version
117
132
  version: 1.2.0
118
133
  - !ruby/object:Gem::Dependency
119
134
  name: eco
120
135
  requirement: !ruby/object:Gem::Requirement
136
+ none: false
121
137
  requirements:
122
- - - "~>"
138
+ - - ~>
123
139
  - !ruby/object:Gem::Version
124
140
  version: '1.0'
125
141
  type: :development
126
142
  prerelease: false
127
143
  version_requirements: !ruby/object:Gem::Requirement
144
+ none: false
128
145
  requirements:
129
- - - "~>"
146
+ - - ~>
130
147
  - !ruby/object:Gem::Version
131
148
  version: '1.0'
132
149
  - !ruby/object:Gem::Dependency
133
150
  name: ejs
134
151
  requirement: !ruby/object:Gem::Requirement
152
+ none: false
135
153
  requirements:
136
- - - "~>"
154
+ - - ~>
137
155
  - !ruby/object:Gem::Version
138
156
  version: '1.0'
139
157
  type: :development
140
158
  prerelease: false
141
159
  version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
142
161
  requirements:
143
- - - "~>"
162
+ - - ~>
144
163
  - !ruby/object:Gem::Version
145
164
  version: '1.0'
146
165
  - !ruby/object:Gem::Dependency
147
166
  name: execjs
148
167
  requirement: !ruby/object:Gem::Requirement
168
+ none: false
149
169
  requirements:
150
- - - "~>"
170
+ - - ~>
151
171
  - !ruby/object:Gem::Version
152
172
  version: '1.0'
153
173
  type: :development
154
174
  prerelease: false
155
175
  version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
156
177
  requirements:
157
- - - "~>"
178
+ - - ~>
158
179
  - !ruby/object:Gem::Version
159
180
  version: '1.0'
160
181
  - !ruby/object:Gem::Dependency
161
182
  name: json
162
183
  requirement: !ruby/object:Gem::Requirement
184
+ none: false
163
185
  requirements:
164
- - - ">="
186
+ - - ! '>='
165
187
  - !ruby/object:Gem::Version
166
188
  version: '0'
167
189
  type: :development
168
190
  prerelease: false
169
191
  version_requirements: !ruby/object:Gem::Requirement
192
+ none: false
170
193
  requirements:
171
- - - ">="
194
+ - - ! '>='
172
195
  - !ruby/object:Gem::Version
173
196
  version: '0'
174
197
  - !ruby/object:Gem::Dependency
175
198
  name: rack-test
176
199
  requirement: !ruby/object:Gem::Requirement
200
+ none: false
177
201
  requirements:
178
- - - ">="
202
+ - - ! '>='
179
203
  - !ruby/object:Gem::Version
180
204
  version: '0'
181
205
  type: :development
182
206
  prerelease: false
183
207
  version_requirements: !ruby/object:Gem::Requirement
208
+ none: false
184
209
  requirements:
185
- - - ">="
210
+ - - ! '>='
186
211
  - !ruby/object:Gem::Version
187
212
  version: '0'
188
213
  - !ruby/object:Gem::Dependency
189
214
  name: rake
190
215
  requirement: !ruby/object:Gem::Requirement
216
+ none: false
191
217
  requirements:
192
- - - ">="
218
+ - - ! '>='
193
219
  - !ruby/object:Gem::Version
194
220
  version: '0'
195
221
  type: :development
196
222
  prerelease: false
197
223
  version_requirements: !ruby/object:Gem::Requirement
224
+ none: false
198
225
  requirements:
199
- - - ">="
226
+ - - ! '>='
200
227
  - !ruby/object:Gem::Version
201
228
  version: '0'
202
229
  - !ruby/object:Gem::Dependency
203
230
  name: sass
204
231
  requirement: !ruby/object:Gem::Requirement
232
+ none: false
205
233
  requirements:
206
- - - "~>"
234
+ - - ~>
207
235
  - !ruby/object:Gem::Version
208
236
  version: '3.1'
209
237
  type: :development
210
238
  prerelease: false
211
239
  version_requirements: !ruby/object:Gem::Requirement
240
+ none: false
212
241
  requirements:
213
- - - "~>"
242
+ - - ~>
214
243
  - !ruby/object:Gem::Version
215
244
  version: '3.1'
216
245
  - !ruby/object:Gem::Dependency
217
246
  name: uglifier
218
247
  requirement: !ruby/object:Gem::Requirement
248
+ none: false
219
249
  requirements:
220
- - - ">="
250
+ - - ! '>='
221
251
  - !ruby/object:Gem::Version
222
252
  version: '0'
223
253
  type: :development
224
254
  prerelease: false
225
255
  version_requirements: !ruby/object:Gem::Requirement
256
+ none: false
226
257
  requirements:
227
- - - ">="
258
+ - - ! '>='
228
259
  - !ruby/object:Gem::Version
229
260
  version: '0'
230
261
  - !ruby/object:Gem::Dependency
231
262
  name: yui-compressor
232
263
  requirement: !ruby/object:Gem::Requirement
264
+ none: false
233
265
  requirements:
234
- - - ">="
266
+ - - ! '>='
235
267
  - !ruby/object:Gem::Version
236
268
  version: '0'
237
269
  type: :development
238
270
  prerelease: false
239
271
  version_requirements: !ruby/object:Gem::Requirement
272
+ none: false
240
273
  requirements:
241
- - - ">="
274
+ - - ! '>='
242
275
  - !ruby/object:Gem::Version
243
276
  version: '0'
244
277
  description: Sprockets is a Rack-based asset packaging system that concatenates and
@@ -251,11 +284,9 @@ executables:
251
284
  extensions: []
252
285
  extra_rdoc_files: []
253
286
  files:
254
- - LICENSE
255
287
  - README.md
256
- - bin/sprockets
288
+ - LICENSE
257
289
  - lib/rake/sprocketstask.rb
258
- - lib/sprockets.rb
259
290
  - lib/sprockets/asset.rb
260
291
  - lib/sprockets/asset_attributes.rb
261
292
  - lib/sprockets/base.rb
@@ -293,27 +324,32 @@ files:
293
324
  - lib/sprockets/utils.rb
294
325
  - lib/sprockets/version.rb
295
326
  - lib/sprockets/yui_compressor.rb
327
+ - lib/sprockets.rb
328
+ - bin/sprockets
296
329
  homepage: http://getsprockets.org/
297
- licenses: []
298
- metadata: {}
330
+ licenses:
331
+ - MIT
299
332
  post_install_message:
300
333
  rdoc_options: []
301
334
  require_paths:
302
335
  - lib
303
336
  required_ruby_version: !ruby/object:Gem::Requirement
337
+ none: false
304
338
  requirements:
305
- - - ">="
339
+ - - ! '>='
306
340
  - !ruby/object:Gem::Version
307
341
  version: '0'
308
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
+ none: false
309
344
  requirements:
310
- - - ">="
345
+ - - ! '>='
311
346
  - !ruby/object:Gem::Version
312
347
  version: '0'
313
348
  requirements: []
314
349
  rubyforge_project: sprockets
315
- rubygems_version: 2.2.2
350
+ rubygems_version: 1.8.24
316
351
  signing_key:
317
- specification_version: 4
352
+ specification_version: 3
318
353
  summary: Rack-based asset packaging system
319
354
  test_files: []
355
+ has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: e052d0942ee921ab7a9fe73a1632d447e3c95602
4
- data.tar.gz: 18566c457cdfadc3d3d9f51b635f67f4ef6a9aca
5
- SHA512:
6
- metadata.gz: b66b4567190ecfb16bfe96edd289fc2f3f4297b8aa8c3cca0be442dcf2318eca9f9cd31ac720e5346fab06a44d65082b12b7f1b62758eb496c160470782a37a4
7
- data.tar.gz: 409f89e3075434825987e1db7d6b7eb7509c34f433ead60433981acd26013a1c0165bc1001ddeadc6912cbae4e3f8c5fbc1f0825fe41e233b9db88bc35c9f190