sprockets 2.6.1 → 2.7.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,14 @@ submit a pull request.
361
361
 
362
362
  ## Version History ##
363
363
 
364
+ **2.7.0** (October 10, 2012)
365
+
366
+ * Added --css-compressor and --js-compressor command line flags
367
+ * Added css/js compressor shorthand
368
+ * Change default manifest.json filename to be a randomized manifest-16HEXBYTES.json
369
+ * Allow nil environment to be passed to manifest
370
+ * Allow manifest instance to be set on rake task
371
+
364
372
  **2.6.0** (September 19, 2012)
365
373
 
366
374
  * Added bower component.json require support
@@ -40,6 +40,14 @@ OptionParser.new do |opts|
40
40
  manifest = Sprockets::Manifest.new(environment, directory)
41
41
  end
42
42
 
43
+ opts.on("--css-compressor=COMPRESSOR", "Use CSS compressor") do |compressor|
44
+ environment.css_compressor = compressor.to_sym
45
+ end
46
+
47
+ opts.on("--js-compressor=COMPRESSOR", "Use JavaScript compressor") do |compressor|
48
+ environment.js_compressor = compressor.to_sym
49
+ end
50
+
43
51
  opts.on("--noenv", "Disables .sprocketsrc file") do
44
52
  end
45
53
 
@@ -37,6 +37,24 @@ module Rake
37
37
  end
38
38
  attr_writer :environment
39
39
 
40
+ # Returns cached indexed environment
41
+ def index
42
+ @index ||= environment.index if environment
43
+ end
44
+
45
+ # `Manifest` instance used for already compiled assets.
46
+ #
47
+ # Will be created by default if an environment and output
48
+ # directory are given
49
+ def manifest
50
+ if !@manifest.is_a?(Sprockets::Manifest) && @manifest.respond_to?(:call)
51
+ @manifest = @manifest.call
52
+ else
53
+ @manifest
54
+ end
55
+ end
56
+ attr_writer :manifest
57
+
40
58
  # Directory to write compiled assets too. As well as the manifest file.
41
59
  #
42
60
  # t.output = "./public/assets"
@@ -79,6 +97,7 @@ module Rake
79
97
  def initialize(name = :assets)
80
98
  @name = name
81
99
  @environment = lambda { Sprockets::Environment.new(Dir.pwd) }
100
+ @manifest = lambda { Sprockets::Manifest.new(index, output) }
82
101
  @logger = Logger.new($stderr)
83
102
  @logger.level = Logger::INFO
84
103
  @keep = 2
@@ -117,24 +136,16 @@ module Rake
117
136
  end
118
137
 
119
138
  private
120
- # Returns cached indexed environment
121
- def index
122
- @index ||= environment.index
123
- end
124
-
125
- # Returns manifest for tasks
126
- def manifest
127
- @manifest ||= Sprockets::Manifest.new(index, output)
128
- end
129
-
130
139
  # Sub out environment logger with our rake task logger that
131
140
  # writes to stderr.
132
141
  def with_logger
133
- old_logger = index.logger
134
- index.logger = @logger
142
+ if env = manifest.environment
143
+ old_logger = env.logger
144
+ env.logger = @logger
145
+ end
135
146
  yield
136
147
  ensure
137
- index.logger = old_logger
148
+ env.logger = old_logger if env
138
149
  end
139
150
  end
140
151
  end
@@ -20,7 +20,6 @@ module Sprockets
20
20
  autoload :JstProcessor, "sprockets/jst_processor"
21
21
  autoload :Processor, "sprockets/processor"
22
22
  autoload :SassCacheStore, "sprockets/sass_cache_store"
23
- autoload :SassCompressor, "sprockets/sass_compressor"
24
23
  autoload :SassFunctions, "sprockets/sass_functions"
25
24
  autoload :SassImporter, "sprockets/sass_importer"
26
25
  autoload :SassTemplate, "sprockets/sass_template"
@@ -45,8 +44,9 @@ module Sprockets
45
44
  require 'sprockets/engines'
46
45
  require 'sprockets/mime'
47
46
  require 'sprockets/processing'
47
+ require 'sprockets/compressing'
48
48
  require 'sprockets/paths'
49
- extend Engines, Mime, Processing, Paths
49
+ extend Engines, Mime, Processing, Compressing, Paths
50
50
 
51
51
  @trail = Hike::Trail.new(File.expand_path('..', __FILE__))
52
52
  @mime_types = {}
@@ -54,6 +54,7 @@ module Sprockets
54
54
  @preprocessors = Hash.new { |h, k| h[k] = [] }
55
55
  @postprocessors = Hash.new { |h, k| h[k] = [] }
56
56
  @bundle_processors = Hash.new { |h, k| h[k] = [] }
57
+ @compressors = Hash.new { |h, k| h[k] = {} }
57
58
 
58
59
  register_mime_type 'text/css', '.css'
59
60
  register_mime_type 'application/javascript', '.js'
@@ -68,6 +69,23 @@ module Sprockets
68
69
  require 'sprockets/charset_normalizer'
69
70
  register_bundle_processor 'text/css', CharsetNormalizer
70
71
 
72
+ require 'sprockets/sass_compressor'
73
+ register_compressor 'text/css', :sass, SassCompressor
74
+ register_compressor 'text/css', :scss, SassCompressor
75
+
76
+ require 'sprockets/yui_compressor'
77
+ register_compressor 'text/css', :yui, YUICompressor
78
+
79
+ require 'sprockets/closure_compressor'
80
+ register_compressor 'application/javascript', :closure, ClosureCompressor
81
+
82
+ require 'sprockets/uglifier_compressor'
83
+ register_compressor 'application/javascript', :uglifier, UglifierCompressor
84
+ register_compressor 'application/javascript', :uglify, UglifierCompressor
85
+
86
+ require 'sprockets/yui_compressor'
87
+ register_compressor 'application/javascript', :yui, YUICompressor
88
+
71
89
  # Cherry pick the default Tilt engines that make sense for
72
90
  # Sprockets. We don't need ones that only generate html like HAML.
73
91
 
@@ -11,7 +11,7 @@ require 'pathname'
11
11
  module Sprockets
12
12
  # `Base` class for `Environment` and `Index`.
13
13
  class Base
14
- include Caching, Paths, Mime, Processing, Engines, Server
14
+ include Caching, Paths, Mime, Processing, Compressing, Engines, Server
15
15
 
16
16
  # Returns a `Digest` implementation class.
17
17
  #
@@ -0,0 +1,22 @@
1
+ require 'tilt'
2
+
3
+ module Sprockets
4
+ class ClosureCompressor < Tilt::Template
5
+ self.default_mime_type = 'application/javascript'
6
+
7
+ def self.engine_initialized?
8
+ defined?(::Closure::Compiler)
9
+ end
10
+
11
+ def initialize_engine
12
+ require_template_library 'closure-compiler'
13
+ end
14
+
15
+ def prepare
16
+ end
17
+
18
+ def evaluate(context, locals, &block)
19
+ Closure::Compiler.new.compile(data)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,73 @@
1
+ module Sprockets
2
+ # `Compressing` is an internal mixin whose public methods are exposed on
3
+ # the `Environment` and `Index` classes.
4
+ module Compressing
5
+ def compressors
6
+ deep_copy_hash(@compressors)
7
+ end
8
+
9
+ def register_compressor(mime_type, sym, klass)
10
+ @compressors[mime_type][sym] = klass
11
+ end
12
+
13
+ # Return CSS compressor or nil if none is set
14
+ def css_compressor
15
+ @css_compressor if defined? @css_compressor
16
+ end
17
+
18
+ # Assign a compressor to run on `text/css` assets.
19
+ #
20
+ # The compressor object must respond to `compress`.
21
+ def css_compressor=(compressor)
22
+ unregister_bundle_processor 'text/css', css_compressor if css_compressor
23
+ @css_compressor = nil
24
+ return unless compressor
25
+
26
+ if compressor.is_a?(Symbol)
27
+ compressor = compressors['text/css'][compressor] || raise(Error, "unknown compressor: #{compressor}")
28
+ end
29
+
30
+ if compressor.respond_to?(:compress)
31
+ klass = Class.new(Processor) do
32
+ @name = "css_compressor"
33
+ @processor = proc { |context, data| compressor.compress(data) }
34
+ end
35
+ @css_compressor = :css_compressor
36
+ else
37
+ @css_compressor = klass = compressor
38
+ end
39
+
40
+ register_bundle_processor 'text/css', klass
41
+ end
42
+
43
+ # Return JS compressor or nil if none is set
44
+ def js_compressor
45
+ @js_compressor if defined? @js_compressor
46
+ end
47
+
48
+ # Assign a compressor to run on `application/javascript` assets.
49
+ #
50
+ # The compressor object must respond to `compress`.
51
+ def js_compressor=(compressor)
52
+ unregister_bundle_processor 'application/javascript', js_compressor if js_compressor
53
+ @js_compressor = nil
54
+ return unless compressor
55
+
56
+ if compressor.is_a?(Symbol)
57
+ compressor = compressors['application/javascript'][compressor] || raise(Error, "unknown compressor: #{compressor}")
58
+ end
59
+
60
+ if compressor.respond_to?(:compress)
61
+ klass = Class.new(Processor) do
62
+ @name = "js_compressor"
63
+ @processor = proc { |context, data| compressor.compress(data) }
64
+ end
65
+ @js_compressor = :js_compressor
66
+ else
67
+ @js_compressor = klass = compressor
68
+ end
69
+
70
+ register_bundle_processor 'application/javascript', klass
71
+ end
72
+ end
73
+ end
@@ -37,6 +37,7 @@ module Sprockets
37
37
  @preprocessors = Sprockets.preprocessors
38
38
  @postprocessors = Sprockets.postprocessors
39
39
  @bundle_processors = Sprockets.bundle_processors
40
+ @compressors = Sprockets.compressors
40
41
 
41
42
  Sprockets.paths.each do |path|
42
43
  append_path(path)
@@ -31,6 +31,7 @@ module Sprockets
31
31
  @preprocessors = environment.preprocessors
32
32
  @postprocessors = environment.postprocessors
33
33
  @bundle_processors = environment.bundle_processors
34
+ @compressors = environment.compressors
34
35
 
35
36
  # Initialize caches
36
37
  @assets = {}
@@ -1,4 +1,5 @@
1
1
  require 'multi_json'
2
+ require 'securerandom'
2
3
  require 'time'
3
4
 
4
5
  module Sprockets
@@ -18,16 +19,30 @@ module Sprockets
18
19
  # a full path to the manifest json file. The file may or may not
19
20
  # already exist. The dirname of the `path` will be used to write
20
21
  # compiled assets to. Otherwise, if the path is a directory, the
21
- # filename will default to "manifest.json" in that directory.
22
+ # filename will default a random "manifest-123.json" file in that
23
+ # directory.
22
24
  #
23
25
  # Manifest.new(environment, "./public/assets/manifest.json")
24
26
  #
25
- def initialize(environment, path)
26
- @environment = environment
27
+ def initialize(*args)
28
+ if args.first.is_a?(Base) || args.first.nil?
29
+ @environment = args.shift
30
+ end
31
+
32
+ unless path = args.shift
33
+ raise ArgumentError, "manifest requires output path"
34
+ end
27
35
 
28
36
  if File.extname(path) == ""
29
- @dir = File.expand_path(path)
30
- @path = File.join(@dir, 'manifest.json')
37
+ @dir = File.expand_path(path)
38
+
39
+ # Find the first manifest.json in the directory
40
+ paths = Dir[File.join(@dir, "manifest*.json")]
41
+ if paths.any?
42
+ @path = paths.first
43
+ else
44
+ @path = File.join(@dir, "manifest-#{SecureRandom.hex(16)}.json")
45
+ end
31
46
  else
32
47
  @path = File.expand_path(path)
33
48
  @dir = File.dirname(path)
@@ -83,6 +98,10 @@ module Sprockets
83
98
  # compile("application.js")
84
99
  #
85
100
  def compile(*args)
101
+ unless environment
102
+ raise Error, "manifest requires environment for compilation"
103
+ end
104
+
86
105
  paths = environment.each_logical_path(*args).to_a +
87
106
  args.flatten.select { |fn| Pathname.new(fn).absolute? if fn.is_a?(String)}
88
107
 
@@ -192,46 +192,6 @@ module Sprockets
192
192
  @bundle_processors[mime_type].delete(klass)
193
193
  end
194
194
 
195
- # Return CSS compressor or nil if none is set
196
- def css_compressor
197
- bundle_processors('text/css').detect { |klass|
198
- klass.respond_to?(:name) &&
199
- klass.name == 'Sprockets::Processor (css_compressor)'
200
- }
201
- end
202
-
203
- # Assign a compressor to run on `text/css` assets.
204
- #
205
- # The compressor object must respond to `compress` or `compile`.
206
- def css_compressor=(compressor)
207
- unregister_bundle_processor 'text/css', :css_compressor
208
- return unless compressor
209
-
210
- register_bundle_processor 'text/css', :css_compressor do |context, data|
211
- compressor.compress(data)
212
- end
213
- end
214
-
215
- # Return JS compressor or nil if none is set
216
- def js_compressor
217
- bundle_processors('application/javascript').detect { |klass|
218
- klass.respond_to?(:name) &&
219
- klass.name == 'Sprockets::Processor (js_compressor)'
220
- }
221
- end
222
-
223
- # Assign a compressor to run on `application/javascript` assets.
224
- #
225
- # The compressor object must respond to `compress` or `compile`.
226
- def js_compressor=(compressor)
227
- unregister_bundle_processor 'application/javascript', :js_compressor
228
- return unless compressor
229
-
230
- register_bundle_processor 'application/javascript', :js_compressor do |context, data|
231
- compressor.compress(data)
232
- end
233
- end
234
-
235
195
  private
236
196
  def add_engine_to_trail(ext, klass)
237
197
  @trail.append_extension(ext.to_s)
@@ -21,5 +21,9 @@ module Sprockets
21
21
  nil
22
22
  end
23
23
  end
24
+
25
+ def path_to(key)
26
+ key
27
+ end
24
28
  end
25
29
  end
@@ -1,13 +1,22 @@
1
- require 'sass'
1
+ require 'tilt'
2
2
 
3
3
  module Sprockets
4
- class SassCompressor
5
- def self.compress(css)
6
- new.compress(css)
4
+ class SassCompressor < Tilt::Template
5
+ self.default_mime_type = 'text/css'
6
+
7
+ def self.engine_initialized?
8
+ defined?(::Sass::Engine)
9
+ end
10
+
11
+ def initialize_engine
12
+ require_template_library 'sass'
13
+ end
14
+
15
+ def prepare
7
16
  end
8
17
 
9
- def compress(css)
10
- Sass::Engine.new(css, {
18
+ def evaluate(context, locals, &block)
19
+ Sass::Engine.new(data, {
11
20
  :syntax => :scss,
12
21
  :cache => false,
13
22
  :read_cache => false,
@@ -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
@@ -0,0 +1,22 @@
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
+ Uglifier.new(:copyright => false).compile(data)
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "2.6.1"
2
+ VERSION = "2.7.0"
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,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.7.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Sam Stephenson
@@ -9,196 +10,270 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-10-28 00:00:00.000000000 Z
13
+ date: 2012-10-11 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
85
+ - !ruby/object:Gem::Dependency
86
+ name: closure-compiler
87
+ requirement: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
76
101
  - !ruby/object:Gem::Dependency
77
102
  name: coffee-script
78
103
  requirement: !ruby/object:Gem::Requirement
104
+ none: false
79
105
  requirements:
80
- - - "~>"
106
+ - - ~>
81
107
  - !ruby/object:Gem::Version
82
108
  version: '2.0'
83
109
  type: :development
84
110
  prerelease: false
85
111
  version_requirements: !ruby/object:Gem::Requirement
112
+ none: false
86
113
  requirements:
87
- - - "~>"
114
+ - - ~>
88
115
  - !ruby/object:Gem::Version
89
116
  version: '2.0'
90
117
  - !ruby/object:Gem::Dependency
91
118
  name: coffee-script-source
92
119
  requirement: !ruby/object:Gem::Requirement
120
+ none: false
93
121
  requirements:
94
- - - "~>"
122
+ - - ~>
95
123
  - !ruby/object:Gem::Version
96
124
  version: 1.2.0
97
125
  type: :development
98
126
  prerelease: false
99
127
  version_requirements: !ruby/object:Gem::Requirement
128
+ none: false
100
129
  requirements:
101
- - - "~>"
130
+ - - ~>
102
131
  - !ruby/object:Gem::Version
103
132
  version: 1.2.0
104
133
  - !ruby/object:Gem::Dependency
105
134
  name: eco
106
135
  requirement: !ruby/object:Gem::Requirement
136
+ none: false
107
137
  requirements:
108
- - - "~>"
138
+ - - ~>
109
139
  - !ruby/object:Gem::Version
110
140
  version: '1.0'
111
141
  type: :development
112
142
  prerelease: false
113
143
  version_requirements: !ruby/object:Gem::Requirement
144
+ none: false
114
145
  requirements:
115
- - - "~>"
146
+ - - ~>
116
147
  - !ruby/object:Gem::Version
117
148
  version: '1.0'
118
149
  - !ruby/object:Gem::Dependency
119
150
  name: ejs
120
151
  requirement: !ruby/object:Gem::Requirement
152
+ none: false
121
153
  requirements:
122
- - - "~>"
154
+ - - ~>
123
155
  - !ruby/object:Gem::Version
124
156
  version: '1.0'
125
157
  type: :development
126
158
  prerelease: false
127
159
  version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
128
161
  requirements:
129
- - - "~>"
162
+ - - ~>
130
163
  - !ruby/object:Gem::Version
131
164
  version: '1.0'
132
165
  - !ruby/object:Gem::Dependency
133
166
  name: execjs
134
167
  requirement: !ruby/object:Gem::Requirement
168
+ none: false
135
169
  requirements:
136
- - - "~>"
170
+ - - ~>
137
171
  - !ruby/object:Gem::Version
138
172
  version: '1.0'
139
173
  type: :development
140
174
  prerelease: false
141
175
  version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
142
177
  requirements:
143
- - - "~>"
178
+ - - ~>
144
179
  - !ruby/object:Gem::Version
145
180
  version: '1.0'
146
181
  - !ruby/object:Gem::Dependency
147
182
  name: json
148
183
  requirement: !ruby/object:Gem::Requirement
184
+ none: false
149
185
  requirements:
150
- - - ">="
186
+ - - ! '>='
151
187
  - !ruby/object:Gem::Version
152
188
  version: '0'
153
189
  type: :development
154
190
  prerelease: false
155
191
  version_requirements: !ruby/object:Gem::Requirement
192
+ none: false
156
193
  requirements:
157
- - - ">="
194
+ - - ! '>='
158
195
  - !ruby/object:Gem::Version
159
196
  version: '0'
160
197
  - !ruby/object:Gem::Dependency
161
198
  name: rack-test
162
199
  requirement: !ruby/object:Gem::Requirement
200
+ none: false
163
201
  requirements:
164
- - - ">="
202
+ - - ! '>='
165
203
  - !ruby/object:Gem::Version
166
204
  version: '0'
167
205
  type: :development
168
206
  prerelease: false
169
207
  version_requirements: !ruby/object:Gem::Requirement
208
+ none: false
170
209
  requirements:
171
- - - ">="
210
+ - - ! '>='
172
211
  - !ruby/object:Gem::Version
173
212
  version: '0'
174
213
  - !ruby/object:Gem::Dependency
175
214
  name: rake
176
215
  requirement: !ruby/object:Gem::Requirement
216
+ none: false
177
217
  requirements:
178
- - - ">="
218
+ - - ! '>='
179
219
  - !ruby/object:Gem::Version
180
220
  version: '0'
181
221
  type: :development
182
222
  prerelease: false
183
223
  version_requirements: !ruby/object:Gem::Requirement
224
+ none: false
184
225
  requirements:
185
- - - ">="
226
+ - - ! '>='
186
227
  - !ruby/object:Gem::Version
187
228
  version: '0'
188
229
  - !ruby/object:Gem::Dependency
189
230
  name: sass
190
231
  requirement: !ruby/object:Gem::Requirement
232
+ none: false
191
233
  requirements:
192
- - - "~>"
234
+ - - ~>
193
235
  - !ruby/object:Gem::Version
194
236
  version: '3.1'
195
237
  type: :development
196
238
  prerelease: false
197
239
  version_requirements: !ruby/object:Gem::Requirement
240
+ none: false
198
241
  requirements:
199
- - - "~>"
242
+ - - ~>
200
243
  - !ruby/object:Gem::Version
201
244
  version: '3.1'
245
+ - !ruby/object:Gem::Dependency
246
+ name: uglifier
247
+ requirement: !ruby/object:Gem::Requirement
248
+ none: false
249
+ requirements:
250
+ - - ! '>='
251
+ - !ruby/object:Gem::Version
252
+ version: '0'
253
+ type: :development
254
+ prerelease: false
255
+ version_requirements: !ruby/object:Gem::Requirement
256
+ none: false
257
+ requirements:
258
+ - - ! '>='
259
+ - !ruby/object:Gem::Version
260
+ version: '0'
261
+ - !ruby/object:Gem::Dependency
262
+ name: yui-compressor
263
+ requirement: !ruby/object:Gem::Requirement
264
+ none: false
265
+ requirements:
266
+ - - ! '>='
267
+ - !ruby/object:Gem::Version
268
+ version: '0'
269
+ type: :development
270
+ prerelease: false
271
+ version_requirements: !ruby/object:Gem::Requirement
272
+ none: false
273
+ requirements:
274
+ - - ! '>='
275
+ - !ruby/object:Gem::Version
276
+ version: '0'
202
277
  description: Sprockets is a Rack-based asset packaging system that concatenates and
203
278
  serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.
204
279
  email:
@@ -209,11 +284,9 @@ executables:
209
284
  extensions: []
210
285
  extra_rdoc_files: []
211
286
  files:
212
- - LICENSE
213
287
  - README.md
214
- - bin/sprockets
288
+ - LICENSE
215
289
  - lib/rake/sprocketstask.rb
216
- - lib/sprockets.rb
217
290
  - lib/sprockets/asset.rb
218
291
  - lib/sprockets/asset_attributes.rb
219
292
  - lib/sprockets/base.rb
@@ -221,6 +294,8 @@ files:
221
294
  - lib/sprockets/cache/file_store.rb
222
295
  - lib/sprockets/caching.rb
223
296
  - lib/sprockets/charset_normalizer.rb
297
+ - lib/sprockets/closure_compressor.rb
298
+ - lib/sprockets/compressing.rb
224
299
  - lib/sprockets/context.rb
225
300
  - lib/sprockets/directive_processor.rb
226
301
  - lib/sprockets/eco_template.rb
@@ -245,29 +320,34 @@ files:
245
320
  - lib/sprockets/scss_template.rb
246
321
  - lib/sprockets/server.rb
247
322
  - lib/sprockets/static_asset.rb
323
+ - lib/sprockets/uglifier_compressor.rb
248
324
  - lib/sprockets/utils.rb
249
325
  - lib/sprockets/version.rb
326
+ - lib/sprockets/yui_compressor.rb
327
+ - lib/sprockets.rb
328
+ - bin/sprockets
250
329
  homepage: http://getsprockets.org/
251
330
  licenses: []
252
- metadata: {}
253
331
  post_install_message:
254
332
  rdoc_options: []
255
333
  require_paths:
256
334
  - lib
257
335
  required_ruby_version: !ruby/object:Gem::Requirement
336
+ none: false
258
337
  requirements:
259
- - - ">="
338
+ - - ! '>='
260
339
  - !ruby/object:Gem::Version
261
340
  version: '0'
262
341
  required_rubygems_version: !ruby/object:Gem::Requirement
342
+ none: false
263
343
  requirements:
264
- - - ">="
344
+ - - ! '>='
265
345
  - !ruby/object:Gem::Version
266
346
  version: '0'
267
347
  requirements: []
268
348
  rubyforge_project: sprockets
269
- rubygems_version: 2.2.2
349
+ rubygems_version: 1.8.23
270
350
  signing_key:
271
- specification_version: 4
351
+ specification_version: 3
272
352
  summary: Rack-based asset packaging system
273
353
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 697e90bb30a89fcf847118fe728edda106deddb1
4
- data.tar.gz: 97996010140fcd1427895bfe256f998eb21a9b7e
5
- SHA512:
6
- metadata.gz: 7c73c9296b1149ae8d408f0eaa35b8802c0765195a062e47e7639e513d444cb798ecfd221c9f55120ccd1f27d97cb88e61dae93be5faa2792095482e60c39891
7
- data.tar.gz: 88427cccb71aa636ada0d667ccd9487ee60ee53a8032cfc50755a58e3f927d63ab04eb5f1bb3de46b1a60ece4869dbce8f44cb7cd33b28b7d06b99f9289d219c