Hello community, here is the log from the commit of package rubygem-sprockets-rails for openSUSE:Factory checked in at 2015-02-10 20:23:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-sprockets-rails (Old) and /work/SRC/openSUSE:Factory/.rubygem-sprockets-rails.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-sprockets-rails" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-sprockets-rails/rubygem-sprockets-rails.changes 2014-11-12 00:22:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-sprockets-rails.new/rubygem-sprockets-rails.changes 2015-02-10 20:23:11.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Feb 9 13:17:58 UTC 2015 - tboerger@suse.com + +- Updated to 2.2.4 + For changelog look at https://github.com/rails/sprockets-rails/blob/master/CHANGELOG.md + +------------------------------------------------------------------- Old: ---- sprockets-rails-2.1.3.gem New: ---- sprockets-rails-2.2.4.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-sprockets-rails.spec ++++++ --- /var/tmp/diff_new_pack.zgAlxs/_old 2015-02-10 20:23:11.000000000 +0100 +++ /var/tmp/diff_new_pack.zgAlxs/_new 2015-02-10 20:23:11.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-sprockets-rails # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: rubygem-sprockets-rails -Version: 2.1.3 +Version: 2.2.4 Release: 0 %define mod_name sprockets-rails %define mod_full_name %{mod_name}-%{version} ++++++ sprockets-rails-2.1.3.gem -> sprockets-rails-2.2.4.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE --- old/LICENSE 2014-04-11 22:07:18.000000000 +0200 +++ new/LICENSE 2015-01-22 20:04:24.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright (c) 2012-2014 Joshua Peek +Copyright (c) 2014 Joshua Peek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2014-04-11 22:07:18.000000000 +0200 +++ new/README.md 2015-01-22 20:04:24.000000000 +0100 @@ -51,7 +51,7 @@ Each asset task will invoke `assets:environment` first. By default this loads the Rails environment. You can override this task to add or remove dependencies for your specific compilation environment. -Also see [Sprockets::Rails::Task](https://github.com/josh/sprockets-rails/blob/master/lib/sprockets/rails/task...) and [Rake::SprocketsTask](https://github.com/sstephenson/sprockets/blob/master/lib/rake/sprocketstask....). +Also see [Sprockets::Rails::Task](https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/tas...) and [Rake::SprocketsTask](https://github.com/sstephenson/sprockets/blob/master/lib/rake/sprocketstask....). ### Initializer options @@ -85,7 +85,7 @@ **`config.assets.manifest`** -Defines the full path to be used for the asset precompiler's manifest file. Defaults to using the `config.assets.prefix` directory within the public folder. +Defines the full path to be used for the asset precompiler's manifest file. Defaults to a randomly-generated filename in the `config.assets.prefix` directory within the public folder. **`config.assets.digest`** @@ -134,6 +134,7 @@ * Unmanaged asset paths and urls fallback to linking to public/. This should make it easier to work with both compiled assets and simple static assets. As a side effect, there will never be any "asset not precompiled errors" when linking to missing assets. They will just link to a public file which may or may not exist. * JS and CSS compressors must be explicitly set. Magic detection has been removed to avoid loading compressors in environments where you want to avoid loading any of the asset libraries. Assign `config.assets.js_compressor = :uglify` or `config.assets.css_compressor = :sass` for the standard compressors. * The manifest file is now in a JSON format. Since it lives in public/ by default, the initial filename is also randomized to obfuscate public access to the resource. +* `config.assets.manifest` (if used) must now include the manifest filename, e.g. `Rails.root.join('config/manifest.json')`. It cannot be a directory. * Two cleanup tasks. `rake assets:clean` is now a safe cleanup that only removes older assets that are no longer used. While `rake assets:clobber` nukes the entire `public/assets` directory and clears your filesystem cache. The clean task allows for rolling deploys that may still be linking to an old asset while the new assets are being built. @@ -153,17 +154,17 @@ ## Releases -sprockets-rails 2.x will primarily target sprockets 2.x. And future versions will target the corresponding sprockets release line. +sprockets-rails 2.x will primarily target sprockets 2.x with future compatibility for 3.x. Consider upgrading to sprockets-rails 3.x to take full advantage of 3.x features. The minor and patch version will be updated according to [semver](http://semver.org/). * Any new APIs or config options that don't break compatibility will be in a minor release -* Any time the sprockets depedency is bumped, there will be a new minor release +* Any time the sprockets dependency is bumped, there will be a new minor release * Simple bug fixes will be patch releases ## License -Copyright © 2012 Joshua Peek. +Copyright © 2014 Joshua Peek. Released under the MIT license. See `LICENSE` for details. Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/helper.rb new/lib/sprockets/rails/helper.rb --- old/lib/sprockets/rails/helper.rb 2014-04-11 22:07:18.000000000 +0200 +++ new/lib/sprockets/rails/helper.rb 2015-01-22 20:04:24.000000000 +0100 @@ -30,6 +30,14 @@ end end + class AbsoluteAssetPathError < ArgumentError + def initialize(bad_path, good_path, prefix) + msg = "Asset names passed to helpers should not include the #{prefix.inspect} prefix. " << + "Instead of #{bad_path.inspect}, use #{good_path.inspect}" + super(msg) + end + end + if defined? ActionView::Helpers::AssetUrlHelper include ActionView::Helpers::AssetUrlHelper include ActionView::Helpers::AssetTagHelper @@ -77,17 +85,12 @@ # Computes the full URL to a asset in the public directory. This # method checks for errors before returning path. def asset_path(source, options = {}) - check_errors_for(source, options) - path_to_asset(source, options) - end - alias :path_to_asset_with_errors :asset_path - - # Computes the full URL to a asset in the public directory. This - # will use +asset_path+ internally, so most of their behaviors - # will be the same. - def asset_url(source, options = {}) - path_to_asset_with_errors(source, options.merge(:protocol => :request)) + unless options[:debug] + check_errors_for(source, options) + end + super(source, options) end + alias :path_to_asset :asset_path # Get digest for asset path. # @@ -173,17 +176,30 @@ def check_dependencies!(dep) depend_on(dep) depend_on_asset(dep) + rescue Sprockets::FileNotFound end - # Raise errors when source does not exist or is not in the precompiled list + # Raise errors when source is not in the precompiled list, or + # incorrectly contains the assets_prefix. def check_errors_for(source, options) + return unless self.raise_runtime_errors + source = source.to_s - return source if !self.raise_runtime_errors || source.blank? || source =~ URI_REGEXP + return if source.blank? || source =~ URI_REGEXP + asset = lookup_asset_for_path(source, options) if asset && asset_needs_precompile?(asset.logical_path, asset.pathname.to_s) raise AssetFilteredError.new(asset.logical_path) end + + full_prefix = File.join(self.assets_prefix || "/", '') + if !asset && source.start_with?(full_prefix) + short_path = source[full_prefix.size, source.size] + if lookup_asset_for_path(short_path, options) + raise AbsoluteAssetPathError.new(source, short_path, full_prefix) + end + end end # Returns true when an asset will not be available after precompile is run diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/legacy_asset_url_helper.rb new/lib/sprockets/rails/legacy_asset_url_helper.rb --- old/lib/sprockets/rails/legacy_asset_url_helper.rb 2014-04-11 22:07:18.000000000 +0200 +++ new/lib/sprockets/rails/legacy_asset_url_helper.rb 2015-01-22 20:04:24.000000000 +0100 @@ -34,6 +34,10 @@ end alias_method :path_to_asset, :asset_path + def asset_url(source, options = {}) + path_to_asset(source, options.merge(:protocol => :request)) + end + ASSET_EXTENSIONS = { :javascript => '.js', :stylesheet => '.css' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/task.rb new/lib/sprockets/rails/task.rb --- old/lib/sprockets/rails/task.rb 2014-04-11 22:07:18.000000000 +0200 +++ new/lib/sprockets/rails/task.rb 2015-01-22 20:04:24.000000000 +0100 @@ -1,6 +1,7 @@ require 'rake' require 'rake/sprocketstask' require 'sprockets' +require 'action_view' require 'action_view/base' module Sprockets @@ -35,6 +36,14 @@ else super end + end + + def manifest + if app + Sprockets::Manifest.new(index, output, app.config.assets.manifest) + else + super + end end def cache_path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/version.rb new/lib/sprockets/rails/version.rb --- old/lib/sprockets/rails/version.rb 2014-04-11 22:07:18.000000000 +0200 +++ new/lib/sprockets/rails/version.rb 2015-01-22 20:04:24.000000000 +0100 @@ -1,5 +1,5 @@ module Sprockets module Rails - VERSION = "2.1.3" + VERSION = "2.2.4" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/railtie.rb new/lib/sprockets/railtie.rb --- old/lib/sprockets/railtie.rb 2014-04-11 22:07:18.000000000 +0200 +++ new/lib/sprockets/railtie.rb 2015-01-22 20:04:24.000000000 +0100 @@ -32,6 +32,26 @@ end end attr_writer :assets + + # Returns Sprockets::Manifest for app config. + attr_accessor :assets_manifest + end + + class Engine < Railtie + # Skip defining append_assets_path on Rails <= 4.2 + unless initializers.find { |init| init.name == :append_assets_path } + initializer :append_assets_path, :group => :all do |app| + if paths["app/assets"].respond_to?(:existent_directories) + app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories) + app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories) + app.config.assets.paths.unshift(*paths["app/assets"].existent_directories) + else + app.config.assets.paths.unshift(*paths["vendor/assets"].paths.select { |d| File.directory?(d) }) + app.config.assets.paths.unshift(*paths["lib/assets"].paths.select { |d| File.directory?(d) }) + app.config.assets.paths.unshift(*paths["app/assets"].paths.select { |d| File.directory?(d) }) + end + end + end end end @@ -66,16 +86,14 @@ config.after_initialize do |app| config = app.config - manifest_path = config.assets.manifest || File.join(config.paths['public'].first, config.assets.prefix) - # Configuration options that should invalidate # the Sprockets cache when changed. app.assets.version = [ app.assets.version, config.assets.version, config.action_controller.relative_url_root, - config.action_controller.asset_host, - Sprockets::Rails::VERSION, + (config.action_controller.asset_host unless config.action_controller.asset_host.respond_to?(:call)), + Sprockets::Rails::VERSION ].compact.join('-') # Copy config.assets.paths to Sprockets @@ -83,28 +101,6 @@ app.assets.append_path path end - ActiveSupport.on_load(:action_view) do - include Sprockets::Rails::Helper - - # Copy relevant config to AV context - self.debug_assets = config.assets.debug - self.digest_assets = config.assets.digest - self.assets_prefix = config.assets.prefix - - # Copy over to Sprockets as well - context = app.assets.context_class - context.assets_prefix = config.assets.prefix - context.digest_assets = config.assets.digest - context.config = config.action_controller - - if config.assets.compile - self.assets_environment = app.assets - self.assets_manifest = Sprockets::Manifest.new(app.assets, manifest_path) - else - self.assets_manifest = Sprockets::Manifest.new(manifest_path) - end - end - app.assets.js_compressor = config.assets.js_compressor app.assets.css_compressor = config.assets.css_compressor @@ -121,6 +117,30 @@ app.assets = app.assets.index end + manifest_assets_path = File.join(config.paths['public'].first, config.assets.prefix) + if config.assets.compile + app.assets_manifest = Sprockets::Manifest.new(app.assets, manifest_assets_path, config.assets.manifest) + else + app.assets_manifest = Sprockets::Manifest.new(manifest_assets_path, config.assets.manifest) + end + + ActiveSupport.on_load(:action_view) do + include Sprockets::Rails::Helper + + # Copy relevant config to AV context + self.debug_assets = config.assets.debug + self.digest_assets = config.assets.digest + self.assets_prefix = config.assets.prefix + + # Copy over to Sprockets as well + context = app.assets.context_class + context.assets_prefix = config.assets.prefix + context.digest_assets = config.assets.digest + context.config = config.action_controller + + self.assets_environment = app.assets if config.assets.compile + self.assets_manifest = app.assets_manifest + end Sprockets::Rails::Helper.precompile ||= app.config.assets.precompile Sprockets::Rails::Helper.assets ||= app.assets diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2014-04-11 22:07:18.000000000 +0200 +++ new/metadata 2015-01-22 20:04:24.000000000 +0100 @@ -1,29 +1,35 @@ --- !ruby/object:Gem::Specification name: sprockets-rails version: !ruby/object:Gem::Version - version: 2.1.3 + version: 2.2.4 platform: ruby authors: - Joshua Peek autorequire: bindir: bin cert_chain: [] -date: 2014-04-11 00:00:00.000000000 Z +date: 2015-01-22 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: sprockets requirement: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version version: '2.8' + - - "<" + - !ruby/object:Gem::Version + version: '4.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version version: '2.8' + - - "<" + - !ruby/object:Gem::Version + version: '4.0' - !ruby/object:Gem::Dependency name: actionpack requirement: !ruby/object:Gem::Requirement @@ -53,6 +59,20 @@ - !ruby/object:Gem::Version version: '3.0' - !ruby/object:Gem::Dependency + name: railties + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '3.0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '3.0' +- !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: @@ -67,19 +87,33 @@ - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency - name: railties + name: sass requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version - version: '3.0' + version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version - version: '3.0' + version: '0' +- !ruby/object:Gem::Dependency + name: uglifier + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' description: email: josh@joshpeek.com executables: [] -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org