Skip to content

Instantly share code, notes, and snippets.

@myabc myabc/gist:9526121
Created Mar 13, 2014

Embed
What would you like to do?
Files sprockets-2.2.2.backport1/LICENSE and sprockets-2.2.2.backport2/LICENSE are identical
diff -rcsr sprockets-2.2.2.backport1/README.md sprockets-2.2.2.backport2/README.md
*** sprockets-2.2.2.backport1/README.md 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/README.md 2014-03-13 11:27:11.000000000 +0100
***************
*** 361,366 ****
--- 361,383 ----
## Version History ##
+ **2.10.0** (May 24, 2013)
+
+ * Support for `bower.json`
+
+ **2.9.3** (April 20, 2013)
+
+ * Fixed sass caching bug
+
+ **2.9.2** (April 8, 2013)
+
+ * Improve file freshness check performance
+ * Directive processor encoding fixes
+
+ **2.9.1** (April 6, 2013)
+
+ * Support for Uglifier 2.x
+
**2.9.0** (February 25, 2013)
* Write out gzipped variants of bundled assets.
Files sprockets-2.2.2.backport1/bin/sprockets and sprockets-2.2.2.backport2/bin/sprockets are identical
Files sprockets-2.2.2.backport1/lib/rake/sprocketstask.rb and sprockets-2.2.2.backport2/lib/rake/sprocketstask.rb are identical
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/asset.rb sprockets-2.2.2.backport2/lib/sprockets/asset.rb
*** sprockets-2.2.2.backport1/lib/sprockets/asset.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/asset.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 39,45 ****
@logical_path = logical_path.to_s
@pathname = Pathname.new(pathname)
@content_type = environment.content_type_of(pathname)
! @mtime = environment.stat(pathname).mtime
@length = environment.stat(pathname).size
@digest = environment.file_digest(pathname).hexdigest
end
--- 39,46 ----
@logical_path = logical_path.to_s
@pathname = Pathname.new(pathname)
@content_type = environment.content_type_of(pathname)
! # drop precision to 1 second, same pattern followed elsewhere
! @mtime = Time.at(environment.stat(pathname).mtime.to_i)
@length = environment.stat(pathname).size
@digest = environment.file_digest(pathname).hexdigest
end
***************
*** 58,65 ****
end
if mtime = coder['mtime']
! # Parse time string
! @mtime = Time.parse(mtime)
end
if length = coder['length']
--- 59,65 ----
end
if mtime = coder['mtime']
! @mtime = Time.at(mtime)
end
if length = coder['length']
***************
*** 74,80 ****
coder['logical_path'] = logical_path
coder['pathname'] = relativize_root_path(pathname).to_s
coder['content_type'] = content_type
! coder['mtime'] = mtime.iso8601
coder['length'] = length
coder['digest'] = digest
end
--- 74,80 ----
coder['logical_path'] = logical_path
coder['pathname'] = relativize_root_path(pathname).to_s
coder['content_type'] = content_type
! coder['mtime'] = mtime.to_i
coder['length'] = length
coder['digest'] = digest
end
***************
*** 244,250 ****
# stale. Many deployment environments may recopy or recheckout
# assets on each deploy. In this case the mtime would be the
# time of deploy rather than modified time.
! if mtime >= stat.mtime
return true
end
--- 244,254 ----
# stale. Many deployment environments may recopy or recheckout
# assets on each deploy. In this case the mtime would be the
# time of deploy rather than modified time.
! #
! # Note: to_i is used in eql? and write_to we assume fidelity of 1 second
! # if people save files more frequently than 1 second sprockets may
! # not pick it up, by design
! if mtime.to_i >= stat.mtime.to_i
return true
end
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/asset_attributes.rb sprockets-2.2.2.backport2/lib/sprockets/asset_attributes.rb
*** sprockets-2.2.2.backport1/lib/sprockets/asset_attributes.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/asset_attributes.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 19,26 ****
path_without_extensions = extensions.inject(pathname) { |p, ext| p.sub(ext, '') }
! # optimization: component.json can only be nested one level deep
if !path_without_extensions.to_s.index('/')
paths << path_without_extensions.join("component.json").to_s
end
--- 19,28 ----
path_without_extensions = extensions.inject(pathname) { |p, ext| p.sub(ext, '') }
! # optimization: bower.json can only be nested one level deep
if !path_without_extensions.to_s.index('/')
+ paths << path_without_extensions.join("bower.json").to_s
+ # DEPRECATED bower configuration file
paths << path_without_extensions.join("component.json").to_s
end
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/base.rb sprockets-2.2.2.backport2/lib/sprockets/base.rb
*** sprockets-2.2.2.backport1/lib/sprockets/base.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/base.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 129,142 ****
args = attributes_for(logical_path).search_paths + [options]
@trail.find(*args) do |path|
pathname = Pathname.new(path)
! if pathname.basename.to_s == 'component.json'
! component = json_decode(pathname.read)
! case component['main']
when String
! yield pathname.dirname.join(component['main'])
when Array
extname = File.extname(logical_path)
! component['main'].each do |fn|
if extname == "" || extname == File.extname(fn)
yield pathname.dirname.join(fn)
end
--- 129,142 ----
args = attributes_for(logical_path).search_paths + [options]
@trail.find(*args) do |path|
pathname = Pathname.new(path)
! if %w( bower.json component.json ).include?(pathname.basename.to_s)
! bower = json_decode(pathname.read)
! case bower['main']
when String
! yield pathname.dirname.join(bower['main'])
when Array
extname = File.extname(logical_path)
! bower['main'].each do |fn|
if extname == "" || extname == File.extname(fn)
yield pathname.dirname.join(fn)
end
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/bundled_asset.rb sprockets-2.2.2.backport2/lib/sprockets/bundled_asset.rb
*** sprockets-2.2.2.backport1/lib/sprockets/bundled_asset.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/bundled_asset.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 17,26 ****
@required_assets = @processed_asset.required_assets
@dependency_paths = @processed_asset.dependency_paths
- @source = ""
-
# Explode Asset into parts and gather the dependency bodies
! to_a.each { |dependency| @source << dependency.to_s }
# Run bundle processors on concatenated source
context = environment.context_class.new(environment, logical_path, pathname)
--- 17,24 ----
@required_assets = @processed_asset.required_assets
@dependency_paths = @processed_asset.dependency_paths
# Explode Asset into parts and gather the dependency bodies
! @source = to_a.map { |dependency| dependency.to_s }.join
# Run bundle processors on concatenated source
context = environment.context_class.new(environment, logical_path, pathname)
Files sprockets-2.2.2.backport1/lib/sprockets/cache/file_store.rb and sprockets-2.2.2.backport2/lib/sprockets/cache/file_store.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/caching.rb and sprockets-2.2.2.backport2/lib/sprockets/caching.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/charset_normalizer.rb and sprockets-2.2.2.backport2/lib/sprockets/charset_normalizer.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/closure_compressor.rb and sprockets-2.2.2.backport2/lib/sprockets/closure_compressor.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/compressing.rb and sprockets-2.2.2.backport2/lib/sprockets/compressing.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/context.rb and sprockets-2.2.2.backport2/lib/sprockets/context.rb are identical
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/directive_processor.rb sprockets-2.2.2.backport2/lib/sprockets/directive_processor.rb
*** sprockets-2.2.2.backport1/lib/sprockets/directive_processor.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/directive_processor.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 92,97 ****
--- 92,99 ----
@context = context
@result = ""
+ @result.force_encoding(body.encoding) if body.respond_to?(:encoding)
+
@has_written_body = false
process_directives
Files sprockets-2.2.2.backport1/lib/sprockets/eco_template.rb and sprockets-2.2.2.backport2/lib/sprockets/eco_template.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/ejs_template.rb and sprockets-2.2.2.backport2/lib/sprockets/ejs_template.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/engines.rb and sprockets-2.2.2.backport2/lib/sprockets/engines.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/environment.rb and sprockets-2.2.2.backport2/lib/sprockets/environment.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/errors.rb and sprockets-2.2.2.backport2/lib/sprockets/errors.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/index.rb and sprockets-2.2.2.backport2/lib/sprockets/index.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/jst_processor.rb and sprockets-2.2.2.backport2/lib/sprockets/jst_processor.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/manifest.rb and sprockets-2.2.2.backport2/lib/sprockets/manifest.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/mime.rb and sprockets-2.2.2.backport2/lib/sprockets/mime.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/paths.rb and sprockets-2.2.2.backport2/lib/sprockets/paths.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/processed_asset.rb and sprockets-2.2.2.backport2/lib/sprockets/processed_asset.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/processing.rb and sprockets-2.2.2.backport2/lib/sprockets/processing.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/processor.rb and sprockets-2.2.2.backport2/lib/sprockets/processor.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/safety_colons.rb and sprockets-2.2.2.backport2/lib/sprockets/safety_colons.rb are identical
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/sass_cache_store.rb sprockets-2.2.2.backport2/lib/sprockets/sass_cache_store.rb
*** sprockets-2.2.2.backport1/lib/sprockets/sass_cache_store.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/sass_cache_store.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 16,22 ****
if obj = environment.cache_get("sass/#{key}")
return unless obj[:version] == version
return unless obj[:sha] == sha
! obj[:obj]
else
nil
end
--- 16,22 ----
if obj = environment.cache_get("sass/#{key}")
return unless obj[:version] == version
return unless obj[:sha] == sha
! obj[:contents]
else
nil
end
Files sprockets-2.2.2.backport1/lib/sprockets/sass_compressor.rb and sprockets-2.2.2.backport2/lib/sprockets/sass_compressor.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/sass_functions.rb and sprockets-2.2.2.backport2/lib/sprockets/sass_functions.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/sass_importer.rb and sprockets-2.2.2.backport2/lib/sprockets/sass_importer.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/sass_template.rb and sprockets-2.2.2.backport2/lib/sprockets/sass_template.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/scss_template.rb and sprockets-2.2.2.backport2/lib/sprockets/scss_template.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/server.rb and sprockets-2.2.2.backport2/lib/sprockets/server.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets/static_asset.rb and sprockets-2.2.2.backport2/lib/sprockets/static_asset.rb are identical
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/uglifier_compressor.rb sprockets-2.2.2.backport2/lib/sprockets/uglifier_compressor.rb
*** sprockets-2.2.2.backport1/lib/sprockets/uglifier_compressor.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/uglifier_compressor.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 16,22 ****
end
def evaluate(context, locals, &block)
! Uglifier.new(:copyright => false).compile(data)
end
end
end
--- 16,29 ----
end
def evaluate(context, locals, &block)
! # Feature detect Uglifier 2.0 option support
! if Uglifier::DEFAULTS[:copyright]
! # Uglifier < 2.x
! Uglifier.new(:copyright => false).compile(data)
! else
! # Uglifier >= 2.x
! Uglifier.new(:comments => :none).compile(data)
! end
end
end
end
Files sprockets-2.2.2.backport1/lib/sprockets/utils.rb and sprockets-2.2.2.backport2/lib/sprockets/utils.rb are identical
diff -rcsr sprockets-2.2.2.backport1/lib/sprockets/version.rb sprockets-2.2.2.backport2/lib/sprockets/version.rb
*** sprockets-2.2.2.backport1/lib/sprockets/version.rb 2014-03-13 11:27:20.000000000 +0100
--- sprockets-2.2.2.backport2/lib/sprockets/version.rb 2014-03-13 11:27:11.000000000 +0100
***************
*** 1,3 ****
module Sprockets
! VERSION = "2.2.2.backport1"
end
--- 1,3 ----
module Sprockets
! VERSION = "2.2.2.backport2"
end
Files sprockets-2.2.2.backport1/lib/sprockets/yui_compressor.rb and sprockets-2.2.2.backport2/lib/sprockets/yui_compressor.rb are identical
Files sprockets-2.2.2.backport1/lib/sprockets.rb and sprockets-2.2.2.backport2/lib/sprockets.rb are identical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.