Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-sprockets for
openSUSE:Factory checked in at 2022-07-08 14:03:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sprockets (Old)
and /work/SRC/openSUSE:Factory/.rubygem-sprockets.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sprockets"
Fri Jul 8 14:03:23 2022 rev:41 rq:987858 version:4.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sprockets/rubygem-sprockets.changes
2022-03-11 21:42:03.894107384 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-sprockets.new.1523/rubygem-sprockets.changes
2022-07-08 14:03:30.038557969 +0200
@@ -1,0 +2,7 @@
+Fri Jul 8 08:51:43 UTC 2022 - Manuel Schnitzer <[email protected]>
+
+- updated to version 4.1.1
+
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
sprockets-4.0.3.gem
New:
----
sprockets-4.1.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sprockets.spec ++++++
--- /var/tmp/diff_new_pack.oIr3CY/_old 2022-07-08 14:03:30.470558484 +0200
+++ /var/tmp/diff_new_pack.oIr3CY/_new 2022-07-08 14:03:30.474558489 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-sprockets
-Version: 4.0.3
+Version: 4.1.1
Release: 0
%define mod_name sprockets
%define mod_full_name %{mod_name}-%{version}
++++++ sprockets-4.0.3.gem -> sprockets-4.1.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2022-03-02 21:47:19.000000000 +0100
+++ new/CHANGELOG.md 2022-06-28 01:51:08.000000000 +0200
@@ -2,6 +2,18 @@
Get upgrade notes from Sprockets 3.x to 4.x at
https://github.com/rails/sprockets/blob/master/UPGRADING.md
+- Fix `Sprockets::Server` to return response headers to compatible with with
Rack::Lint 2.0.
+
+## 4.1.0
+
+- Allow age to be altered in asset:clean rake task.
+- Fix `Sprockets::Server` to return lower-cased response headers to comply
with Rack::Lint 3.0. [#744](https://github.com/rails/sprockets/pull/744)
+- Adding new directive `depend_on_directory`
[#668](https://github.com/rails/sprockets/pull/668)
+- Fix `application/js-sourcemap+json` charset
[#669](https://github.com/rails/sprockets/pull/669)
+- Fix `CachedEnvironment` caching nil values
[#723](https://github.com/rails/sprockets/pull/723)
+- Process `*.jst.ejs.erb` files with ERBProcessor
[#674](https://github.com/rails/sprockets/pull/674)
+- Fix cache key for coffee script processor to be dependent on the filename
[#670](https://github.com/rails/sprockets/pull/670)
+
## 4.0.3
- Fix `Manifest#find` yielding from a Promise causing issue on Ruby 3.1.0-dev.
[#720](https://github.com/rails/sprockets/pull/720)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2022-03-02 21:47:19.000000000 +0100
+++ new/README.md 2022-06-28 01:51:08.000000000 +0200
@@ -119,6 +119,7 @@
- [`link_directory`](#link_directory) - Make target directory compile and be
publicly available without adding contents to current
- [`link_tree`](#link_tree) - Make target tree compile and be publicly
available without adding contents to current
- [`depend_on`](#depend_on) - Recompile current file if target has changed
+- [`depend_on_directory`](#depend_on_directory) - Recompile current file if
any files in target directory has changed
- [`stub`](#stub) - Ignore target file
You can see what each of these does below.
@@ -239,7 +240,7 @@
So, if `b.js` changes it will get recompiled. However instead of having to
recompile the other files from `a.js` to `z.js` since they did not change, we
can use the prior intermediary files stored in the cached values . If these
files were expensive to generate, then this "partial" asset cache strategy can
save a lot of time.
-Directives such as `require`, `link`, and `depend_on` tell Sprockets what
assets need to be re-compiled when a file changes. Files are considered "fresh"
based on their mtime on disk and a combination of cache keys.
+Directives such as `require`, `link`, `depend_on`, and `depend_on_directory`
tell Sprockets what assets need to be re-compiled when a file changes. Files
are considered "fresh" based on their mtime on disk and a combination of cache
keys.
On Rails you can force a "clean" install by clearing the `public/assets` and
`tmp/cache/assets` directories.
@@ -381,6 +382,14 @@
**Caution**: the "link" directive should always have an explicit extension on
the end.
+`link` can also be used to include manifest files from mounted Rails engines:
+
+```
+//= link my_engine
+```
+
+This would find a manifest file at `my_engine/app/assets/config/my_engine.js`
and include its directives.
+
### link_directory
`link_directory` *path* links all the files inside the directory specified by
the *path*. By "link", we mean they are specified as compilation targets to be
written out to disk, and made available to be served to user-agents.
@@ -445,11 +454,53 @@
var bar = '<%= File.read("bar.data") %>'
```
+To depend on an entire directory containing multiple files, use
`depend_on_directory`
+
### depend_on_asset
`depend_on_asset` *path* works like `depend_on`, but operates
recursively reading the file and following the directives found. This is
automatically implied if you use `link`, so consider if it just makes sense
using `link` instead of `depend_on_asset`.
+### depend_on_directory
+
+`depend_on_directory` *path* declares all files in the given *path* without
+including them in the bundle. This is useful when you need to expire an
+asset's cache in response to a change in multiple files in a single directory.
+
+All paths are relative to your declaration and must begin with `./`
+
+Also, your must include these directories in your [load
path](guides/building_an_asset_processing_framework.md#the-load-path).
+
+**Example:**
+
+If we've got a directory called `data` with files `a.data` and `b.data`
+
+```
+// ./data/a.data
+A
+```
+
+```
+// ./data/b.data
+B
+```
+
+```
+// ./file.js.erb
+//= depend_on_directory ./data
+var a = '<% File.read('data/a.data') %>'
+var b = '<% File.read('data/b.data') %>'
+```
+
+Would produce:
+
+```js
+var a = "A";
+var b = "B";
+```
+
+You can also see [Index files are proxies for
folders](#index-files-are-proxies-for-folders) for another method of organizing
folders that will give you more control.
+
### stub
`stub` *path* excludes that asset and its dependencies from the asset bundle.
@@ -491,9 +542,9 @@
recompiled so that the fingerprint will be correct in the generated asset.
You can manually make sprockets depend on any other file that is generated
-by sprockets by using the `depend_on` directive. Rails implements the above
-feature by auto calling `depend_on` on the original asset when the `asset_url`
-is used inside of an asset.
+by sprockets by using the `depend_on` or `depend_on_directory` directive. Rails
+implements the above feature by auto calling `depend_on` on the original asset
+when the `asset_url` is used inside of an asset.
### Styling with Sass and SCSS
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rake/sprocketstask.rb
new/lib/rake/sprocketstask.rb
--- old/lib/rake/sprocketstask.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/rake/sprocketstask.rb 2022-06-28 01:51:08.000000000 +0200
@@ -69,9 +69,12 @@
#
attr_accessor :assets
- # Number of old assets to keep.
+ # Minimum number of old assets to keep. See Sprockets::Manifest#clean for
more information.
attr_accessor :keep
+ # Assets created within this age will be kept. See
Sprockets::Manifest#clean for more information.
+ attr_accessor :age
+
# Logger to use during rake tasks. Defaults to using stderr.
#
# t.logger = Logger.new($stdout)
@@ -103,6 +106,7 @@
@logger = Logger.new($stderr)
@logger.level = Logger::INFO
@keep = 2
+ @age = 3600
yield self if block_given?
@@ -130,7 +134,7 @@
desc name == :assets ? "Clean old assets" : "Clean old #{name} assets"
task "clean_#{name}" do
with_logger do
- manifest.clean(keep)
+ manifest.clean(keep, age)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/cached_environment.rb
new/lib/sprockets/cached_environment.rb
--- old/lib/sprockets/cached_environment.rb 2022-03-02 21:47:19.000000000
+0100
+++ new/lib/sprockets/cached_environment.rb 2022-06-28 01:51:08.000000000
+0200
@@ -31,27 +31,27 @@
# Internal: Cache Environment#entries
def entries(path)
- @entries[path] ||= super(path)
+ @entries.fetch(path){ @entries[path] = super(path) }
end
# Internal: Cache Environment#stat
def stat(path)
- @stats[path] ||= super(path)
+ @stats.fetch(path){ @stats[path] = super(path) }
end
# Internal: Cache Environment#load
def load(uri)
- @uris[uri] ||= super(uri)
+ @uris.fetch(uri){ @uris[uri] = super(uri) }
end
# Internal: Cache Environment#processor_cache_key
def processor_cache_key(str)
- @processor_cache_keys[str] ||= super(str)
+ @processor_cache_keys.fetch(str){ @processor_cache_keys[str] =
super(str) }
end
# Internal: Cache Environment#resolve_dependency
def resolve_dependency(str)
- @resolved_dependencies[str] ||= super(str)
+ @resolved_dependencies.fetch(str){ @resolved_dependencies[str] =
super(str) }
end
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/coffee_script_processor.rb
new/lib/sprockets/coffee_script_processor.rb
--- old/lib/sprockets/coffee_script_processor.rb 2022-03-02
21:47:19.000000000 +0100
+++ new/lib/sprockets/coffee_script_processor.rb 2022-06-28
01:51:08.000000000 +0200
@@ -20,7 +20,7 @@
def self.call(input)
data = input[:data]
- js, map = input[:cache].fetch([self.cache_key, data]) do
+ js, map = input[:cache].fetch([self.cache_key, data, input[:filename]])
do
result = Autoload::CoffeeScript.compile(
data,
sourceMap: "v3",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/digest_utils.rb
new/lib/sprockets/digest_utils.rb
--- old/lib/sprockets/digest_utils.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/sprockets/digest_utils.rb 2022-06-28 01:51:08.000000000 +0200
@@ -183,7 +183,7 @@
#
# Returns true if the name contains a digest like string and .digested
before the extension
def already_digested?(name)
- return name =~ /-([0-9a-f]{7,128})\.digested/
+ return name =~ /-([0-9a-zA-Z]{7,128})\.digested/
end
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/directive_processor.rb
new/lib/sprockets/directive_processor.rb
--- old/lib/sprockets/directive_processor.rb 2022-03-02 21:47:19.000000000
+0100
+++ new/lib/sprockets/directive_processor.rb 2022-06-28 01:51:08.000000000
+0200
@@ -285,6 +285,24 @@
to_load(resolve(path))
end
+ # Allows you to state a dependency on a relative directory
+ # without including it.
+ #
+ # This is used for caching purposes. Any changes made to
+ # the dependency directory will invalidate the cache of the
+ # source file.
+ #
+ # This is useful if you are using ERB and File.read to pull
+ # in contents from multiple files in a directory.
+ #
+ # //= depend_on_directory ./data
+ #
+ def process_depend_on_directory_directive(path = ".", accept = nil)
+ path = expand_relative_dirname(:depend_on_directory, path)
+ accept = expand_accept_shorthand(accept)
+ resolve_paths(*@environment.stat_directory_with_dependencies(path),
accept: accept)
+ end
+
# Allows dependency to be excluded from the asset bundle.
#
# The `path` must be a valid asset and may or may not already
@@ -374,7 +392,7 @@
next if subpath == @filename || stat.directory?
uri, deps = @environment.resolve(subpath, **kargs)
@dependencies.merge(deps)
- yield uri if uri
+ yield uri if uri && block_given?
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/path_utils.rb
new/lib/sprockets/path_utils.rb
--- old/lib/sprockets/path_utils.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/sprockets/path_utils.rb 2022-06-28 01:51:08.000000000 +0200
@@ -162,7 +162,7 @@
def split_subpath(path, subpath)
return "" if path == subpath
path = File.join(path, ''.freeze)
- if subpath.start_with?(path)
+ if subpath&.start_with?(path)
subpath[path.length..-1]
else
nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/server.rb new/lib/sprockets/server.rb
--- old/lib/sprockets/server.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/sprockets/server.rb 2022-06-28 01:51:08.000000000 +0200
@@ -299,7 +299,7 @@
# # => "0aa2105d29558f3eb790d411d7d8fb66"
#
def path_fingerprint(path)
- path[/-([0-9a-f]{7,128})\.[^.]+\z/, 1]
+ path[/-([0-9a-zA-Z]{7,128})\.[^.]+\z/, 1]
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets/version.rb new/lib/sprockets/version.rb
--- old/lib/sprockets/version.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/sprockets/version.rb 2022-06-28 01:51:08.000000000 +0200
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Sprockets
- VERSION = "4.0.3"
+ VERSION = "4.1.1"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sprockets.rb new/lib/sprockets.rb
--- old/lib/sprockets.rb 2022-03-02 21:47:19.000000000 +0100
+++ new/lib/sprockets.rb 2022-06-28 01:51:08.000000000 +0200
@@ -51,6 +51,7 @@
register_mime_type 'application/json', extensions: ['.json'], charset:
:unicode
register_mime_type 'application/ruby', extensions: ['.rb']
register_mime_type 'application/xml', extensions: ['.xml']
+ register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
register_mime_type 'text/css', extensions: ['.css'], charset: :css
register_mime_type 'text/html', extensions: ['.html', '.htm'], charset: :html
register_mime_type 'text/plain', extensions: ['.txt', '.text']
@@ -89,7 +90,7 @@
register_mime_type 'application/font-woff2', extensions: ['.woff2']
require 'sprockets/source_map_processor'
- register_mime_type 'application/js-sourcemap+json', extensions: ['.js.map']
+ register_mime_type 'application/js-sourcemap+json', extensions: ['.js.map'],
charset: :unicode
register_mime_type 'application/css-sourcemap+json', extensions: ['.css.map']
register_transformer 'application/javascript',
'application/js-sourcemap+json', SourceMapProcessor
register_transformer 'text/css', 'application/css-sourcemap+json',
SourceMapProcessor
@@ -180,6 +181,7 @@
application/ecmascript-6
application/javascript
application/json
+ application/manifest+json
application/xml
text/coffeescript
text/css
@@ -189,6 +191,7 @@
text/scss
text/yaml
text/eco
+ text/ejs
), 'application/\2+ruby', '.erb', ERBProcessor)
register_mime_type 'application/html+ruby', extensions: ['.html.erb',
'.erb', '.rhtml'], charset: :html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2022-03-02 21:47:19.000000000 +0100
+++ new/metadata 2022-06-28 01:51:08.000000000 +0200
@@ -1,15 +1,15 @@
--- !ruby/object:Gem::Specification
name: sprockets
version: !ruby/object:Gem::Version
- version: 4.0.3
+ version: 4.1.1
platform: ruby
authors:
- Sam Stephenson
- Joshua Peek
-autorequire:
+autorequire:
bindir: bin
cert_chain: []
-date: 2022-03-02 00:00:00.000000000 Z
+date: 2022-06-27 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rack
@@ -423,7 +423,7 @@
licenses:
- MIT
metadata: {}
-post_install_message:
+post_install_message:
rdoc_options: []
require_paths:
- lib
@@ -438,8 +438,8 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.2.32
-signing_key:
+rubygems_version: 3.3.7
+signing_key:
specification_version: 4
summary: Rack-based asset packaging system
test_files: []