sprockets 2.2.3 → 2.12.3

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.

@@ -0,0 +1,13 @@
1
+ require 'sprockets/sass_template'
2
+
3
+ module Sprockets
4
+ # Scss handler to replace Tilt's builtin one. See `SassTemplate` and
5
+ # `SassImporter` for more infomation.
6
+ class ScssTemplate < SassTemplate
7
+ self.default_mime_type = 'text/css'
8
+
9
+ def syntax
10
+ :scss
11
+ end
12
+ end
13
+ end
@@ -30,6 +30,7 @@ module Sprockets
30
30
  pathname.open('rb') do |rd|
31
31
  File.open("#{filename}+", 'wb') do |wr|
32
32
  gz = Zlib::GzipWriter.new(wr, Zlib::BEST_COMPRESSION)
33
+ gz.mtime = mtime.to_i
33
34
  buf = ""
34
35
  while rd.read(16384, buf)
35
36
  gz.write(buf)
@@ -0,0 +1,29 @@
1
+ require 'tilt'
2
+
3
+ module Sprockets
4
+ class UglifierCompressor < Tilt::Template
5
+ self.default_mime_type = 'application/javascript'
6
+
7
+ def self.engine_initialized?
8
+ defined?(::Uglifier)
9
+ end
10
+
11
+ def initialize_engine
12
+ require_template_library 'uglifier'
13
+ end
14
+
15
+ def prepare
16
+ end
17
+
18
+ def evaluate(context, locals, &block)
19
+ # Feature detect Uglifier 2.0 option support
20
+ if Uglifier::DEFAULTS[:copyright]
21
+ # Uglifier < 2.x
22
+ Uglifier.new(:copyright => false).compile(data)
23
+ else
24
+ # Uglifier >= 2.x
25
+ Uglifier.new(:comments => :none).compile(data)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "2.2.3"
2
+ VERSION = "2.12.3"
3
3
  end
@@ -0,0 +1,27 @@
1
+ require 'tilt'
2
+
3
+ module Sprockets
4
+ class YUICompressor < Tilt::Template
5
+ def self.engine_initialized?
6
+ defined?(::YUI)
7
+ end
8
+
9
+ def initialize_engine
10
+ require_template_library 'yui/compressor'
11
+ end
12
+
13
+ def prepare
14
+ end
15
+
16
+ def evaluate(context, locals, &block)
17
+ case context.content_type
18
+ when 'application/javascript'
19
+ YUI::JavaScriptCompressor.new.compress(data)
20
+ when 'text/css'
21
+ YUI::CssCompressor.new.compress(data)
22
+ else
23
+ data
24
+ end
25
+ end
26
+ end
27
+ end
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.2.3
4
+ version: 2.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -73,6 +73,20 @@ dependencies:
73
73
  - - "!="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.3.0
76
+ - !ruby/object:Gem::Dependency
77
+ name: closure-compiler
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
76
90
  - !ruby/object:Gem::Dependency
77
91
  name: coffee-script
78
92
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +107,14 @@ dependencies:
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 1.2.0
110
+ version: '1.2'
97
111
  type: :development
98
112
  prerelease: false
99
113
  version_requirements: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: 1.2.0
117
+ version: '1.2'
104
118
  - !ruby/object:Gem::Dependency
105
119
  name: eco
106
120
  requirement: !ruby/object:Gem::Requirement
@@ -185,6 +199,48 @@ dependencies:
185
199
  - - ">="
186
200
  - !ruby/object:Gem::Version
187
201
  version: '0'
202
+ - !ruby/object:Gem::Dependency
203
+ name: sass
204
+ requirement: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '3.1'
209
+ type: :development
210
+ prerelease: false
211
+ version_requirements: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '3.1'
216
+ - !ruby/object:Gem::Dependency
217
+ name: uglifier
218
+ requirement: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ type: :development
224
+ prerelease: false
225
+ version_requirements: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ - !ruby/object:Gem::Dependency
231
+ name: yui-compressor
232
+ requirement: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ type: :development
238
+ prerelease: false
239
+ version_requirements: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
188
244
  description: Sprockets is a Rack-based asset packaging system that concatenates and
189
245
  serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.
190
246
  email:
@@ -207,6 +263,8 @@ files:
207
263
  - lib/sprockets/cache/file_store.rb
208
264
  - lib/sprockets/caching.rb
209
265
  - lib/sprockets/charset_normalizer.rb
266
+ - lib/sprockets/closure_compressor.rb
267
+ - lib/sprockets/compressing.rb
210
268
  - lib/sprockets/context.rb
211
269
  - lib/sprockets/directive_processor.rb
212
270
  - lib/sprockets/eco_template.rb
@@ -218,17 +276,26 @@ files:
218
276
  - lib/sprockets/jst_processor.rb
219
277
  - lib/sprockets/manifest.rb
220
278
  - lib/sprockets/mime.rb
279
+ - lib/sprockets/paths.rb
221
280
  - lib/sprockets/processed_asset.rb
222
281
  - lib/sprockets/processing.rb
223
282
  - lib/sprockets/processor.rb
224
283
  - lib/sprockets/safety_colons.rb
284
+ - lib/sprockets/sass_cache_store.rb
285
+ - lib/sprockets/sass_compressor.rb
286
+ - lib/sprockets/sass_functions.rb
287
+ - lib/sprockets/sass_importer.rb
288
+ - lib/sprockets/sass_template.rb
289
+ - lib/sprockets/scss_template.rb
225
290
  - lib/sprockets/server.rb
226
291
  - lib/sprockets/static_asset.rb
227
- - lib/sprockets/trail.rb
292
+ - lib/sprockets/uglifier_compressor.rb
228
293
  - lib/sprockets/utils.rb
229
294
  - lib/sprockets/version.rb
295
+ - lib/sprockets/yui_compressor.rb
230
296
  homepage: http://getsprockets.org/
231
- licenses: []
297
+ licenses:
298
+ - MIT
232
299
  metadata: {}
233
300
  post_install_message:
234
301
  rdoc_options: []