openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2016
- 1 participants
- 1255 discussions
Hello community,
here is the log from the commit of package rubygem-eventmachine for openSUSE:Factory checked in at 2016-04-28 16:53:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-eventmachine (Old)
and /work/SRC/openSUSE:Factory/.rubygem-eventmachine.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-eventmachine"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-eventmachine/rubygem-eventmachine.changes 2015-09-30 05:48:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-eventmachine.new/rubygem-eventmachine.changes 2016-04-28 16:56:22.000000000 +0200
@@ -1,0 +2,70 @@
+Sat Mar 19 05:29:44 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.2.0.1
+ see installed CHANGELOG.md
+
+ ## 1.2.0.1 (March 15, 2016)
+ * Fix crash when accepting IPv6 connections due to struct sockaddr_in [#698, #699]
+
+-------------------------------------------------------------------
+Tue Mar 15 05:30:07 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.2.0
+ see installed CHANGELOG.md
+
+ ## 1.2.0 (March 15, 2016)
+ * Integrate work from the EventMachine-LE 1.1.x versions [#570]
+ * Add start_tls options :ecdh_curve, :dhparam, :fail_if_no_peer_cert [#195, #275, #399, #665]
+ * Add start_tls option :ssl_version for choosing SSL/TLS versions and ciphers [#359, #348, #603, #654]
+ * Add start_tls option :sni_hostname to be passed to TLS params [#593]
+ * Add method EM::Channel#num_subscribers to get the number of subscribers to a channel [#640]
+ * Add support for proc-sources in EM::Iterator [#639]
+ * Factor out method cleanup_machine to cleanup code from EM.run [#650]
+ * Replace Exception class with StandardError [#637]
+ * Close socket on close_connection even after close_connection_after_writing [#694]
+ * Allow reusing of datagram socket/setting bind device [#662]
+ * Handle deferred exceptions in reactor thread [#486]
+ * Reimplement Queue to avoid shift/push performance problem [#311]
+ * Windows: Switch from gethostbyname to getaddrinfo, support IPv6 addresses [#303, #630]
+ * Windows: Use rake-compiler-dock to cross-compile gems [#627]
+ * Windows: Add AppVeyor configuration for Windows CI testing [#578]
+ * Windows: Bump rake-compiler to version 0.9.x [#542]
+ * Fix compilation on AIX (w/ XLC) [#693]
+ * Fix build on OpenBSD [#690]
+ * Fix OpenSSL compile issue on AIX 7.1 [#678]
+ * Fix EventMachine.fork_reactor keeps the threadpool of the original process [#425]
+ * Fix to prevent event machine from stopping when a raise is done in an unbind [#327]
+
+-------------------------------------------------------------------
+Thu Jan 21 05:34:22 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.0.9.1
+ see installed CHANGELOG.md
+
+ ## 1.0.9.1 (January 14, 2016)
+ * Fix EPROTO not defined on Windows [#676]
+ * Fix missing cast to struct sockaddr * [#671]
+ * Fix bug in OpenSSL path detection [#675]
+
+-------------------------------------------------------------------
+Thu Jan 14 05:37:55 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.0.9
+ see installed CHANGELOG.md
+
+ ## 1.0.9 (January 13, 2016)
+ * Try more ways to detect OpenSSL [#602, #643, #661, #663, #668, #669]
+ * Use WSAGetLastError in pipe.cpp same as ed.cpp [#659]
+ * Test compiler flags with the C++ compiler and add them to CXXFLAGS [#634, #651]
+ * Restore silent-fail on unsupported EM.epoll and EM.kqueue [#638, #649]
+ * getDescriptorByFileno deprecated in JRuby 1.7.x, removed in JRuby 9000 [#642, #648]
+ * Add -Wno-address always-true because on Windows rb_fd_select [#578]
+ * Remove the WITHOUT_SSL constant [#578]
+ * Fix SSL error when the server replies a TLS Alert to our ClientHello [#544, #653]
+ * Use WSAStringToAddress in lieu of inet_pton for IPv6 address detection on Windows [#595, #632]
+ * Fix nasty TCP/IPv6 bug [#595, #632]
+ * Use select_large_fdset on Solaris [#611, #625]
+ * Detect the Solaris Studio compiler [#611, #625]
+ * Throw a message with strerror included [#136, #621]
+
+-------------------------------------------------------------------
Old:
----
eventmachine-1.0.8.gem
New:
----
eventmachine-1.2.0.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-eventmachine.spec ++++++
--- /var/tmp/diff_new_pack.q479dX/_old 2016-04-28 16:56:23.000000000 +0200
+++ /var/tmp/diff_new_pack.q479dX/_new 2016-04-28 16:56:23.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-eventmachine
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-eventmachine
-Version: 1.0.8
+Version: 1.2.0.1
Release: 0
%define mod_name eventmachine
%define mod_full_name %{mod_name}-%{version}
++++++ eventmachine-1.0.8.gem -> eventmachine-1.2.0.1.gem ++++++
++++ 5155 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-jquery-rails for openSUSE:Factory checked in at 2016-04-28 16:52:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-jquery-rails (Old)
and /work/SRC/openSUSE:Factory/.rubygem-jquery-rails.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-jquery-rails"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-jquery-rails/rubygem-jquery-rails.changes 2015-09-03 18:12:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-jquery-rails.new/rubygem-jquery-rails.changes 2016-04-28 16:53:06.000000000 +0200
@@ -1,0 +2,28 @@
+Thu Mar 10 05:38:13 UTC 2016 - coolo(a)suse.com
+
+- updated to version 4.1.1
+ see installed CHANGELOG.md
+
+ ## 4.1.1
+
+ - Update jQuery to 1.12.1 and 2.2.1
+ - Update jquery-ujs to 1.2.1
+
+-------------------------------------------------------------------
+Thu Jan 14 05:43:28 UTC 2016 - coolo(a)suse.com
+
+- updated to version 4.1.0
+ see installed CHANGELOG.md
+
+ ## 4.1.0
+
+ - Update jQuery to 1.12.0 and 2.2.0
+ - Update jquery-ujs to 1.2.0
+
+ ## 4.0.5
+
+ - Specify that Ruby version 1.9.3+ is required
+ - Test on Ruby 2.2
+ - Update jquery-ujs from 1.0.4 to 1.1.0
+
+-------------------------------------------------------------------
Old:
----
jquery-rails-4.0.5.gem
New:
----
jquery-rails-4.1.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-jquery-rails.spec ++++++
--- /var/tmp/diff_new_pack.kBDVws/_old 2016-04-28 16:53:07.000000000 +0200
+++ /var/tmp/diff_new_pack.kBDVws/_new 2016-04-28 16:53:07.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-jquery-rails
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-jquery-rails
-Version: 4.0.5
+Version: 4.1.1
Release: 0
%define mod_name jquery-rails
%define mod_full_name %{mod_name}-%{version}
@@ -49,7 +49,7 @@
%install
%gem_install \
- --doc-files="CHANGELOG.md LICENSE README.md" \
+ --doc-files="CHANGELOG.md MIT-LICENSE README.md" \
-f
%gem_packages
++++++ jquery-rails-4.0.5.gem -> jquery-rails-4.1.1.gem ++++++
++++ 17424 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-sshkit for openSUSE:Factory checked in at 2016-04-28 16:52:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sshkit (Old)
and /work/SRC/openSUSE:Factory/.rubygem-sshkit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sshkit"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sshkit/rubygem-sshkit.changes 2015-12-13 09:40:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-sshkit.new/rubygem-sshkit.changes 2016-04-28 16:53:05.000000000 +0200
@@ -1,0 +2,61 @@
+Fri Mar 11 05:43:55 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.9.0
+ see installed CHANGELOG.md
+
+ ## 1.9.0
+
+ **Refer to the 1.9.0.rc1 release notes for a full list of new features, fixes,
+ and potentially breaking changes since SSHKit 1.8.1.** There are no changes
+ since 1.9.0.rc1.
+
+ ## 1.9.0.rc1
+
+ ### Potentially breaking changes
+
+ * The SSHKit DSL is no longer automatically included when you `require` it.
+ **This means you must now explicitly `include SSHKit::DSL`.**
+ See [PR #219](https://github.com/capistrano/sshkit/pull/219) for details.
+ @beatrichartz
+ * `SSHKit::Backend::Printer#test` now always returns true
+ [PR #312](https://github.com/capistrano/sshkit/pull/312) @mikz
+
+ ### New features
+
+ * `SSHKit::Formatter::Abstract` now accepts an optional Hash of options
+ [PR #308](https://github.com/capistrano/sshkit/pull/308) @mattbrictson
+ * Add `SSHKit::Backend.current` so that Capistrano plugin authors can refactor
+ helper methods and still have easy access to the currently-executing Backend
+ without having to use global variables.
+ * Add `SSHKit.config.default_runner` options that allows to override default command runner.
+ This option also accepts a name of the custom runner class.
+ * The ConnectionPool has been rewritten in this release to be more efficient
+ and have a cleaner internal API. You can still completely disable the pool
+ by setting `SSHKit::Backend::Netssh.pool.idle_timeout = 0`.
+ @mattbrictson @byroot [PR #328](https://github.com/capistrano/sshkit/pull/328)
+
+ ### Bug fixes
+
+ * make sure working directory for commands is properly cleared after `within` blocks
+ [PR #307](https://github.com/capistrano/sshkit/pull/307)
+ @steved
+ * display more accurate string for commands with spaces being output in `Formatter::Pretty`
+ [PR #304](https://github.com/capistrano/sshkit/pull/304)
+ @steved
+ [PR #319](https://github.com/capistrano/sshkit/pull/319) @mattbrictson
+ * Fix a race condition experienced in JRuby that could cause multi-server
+ deploys to fail. [PR #322](https://github.com/capistrano/sshkit/pull/322)
+ @mattbrictson
+
+-------------------------------------------------------------------
+Sat Dec 12 05:32:08 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.8.1
+ see installed CHANGELOG.md
+
+ ## 1.8.1
+
+ * Change license to MIT, thanks to all the patient contributors who gave
+ their permissions.
+
+-------------------------------------------------------------------
Old:
----
sshkit-1.8.0.gem
New:
----
sshkit-1.9.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sshkit.spec ++++++
--- /var/tmp/diff_new_pack.eaOcye/_old 2016-04-28 16:53:06.000000000 +0200
+++ /var/tmp/diff_new_pack.eaOcye/_new 2016-04-28 16:53:06.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-sshkit
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-sshkit
-Version: 1.8.0
+Version: 1.9.0
Release: 0
%define mod_name sshkit
%define mod_full_name %{mod_name}-%{version}
@@ -36,7 +36,7 @@
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: SSHKit makes it easy to write structured, testable SSH commands in
-License: GPL-3.0
+License: MIT
Group: Development/Languages/Ruby
%description
++++++ sshkit-1.8.0.gem -> sshkit-1.9.0.gem ++++++
++++ 2277 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-sprockets-rails for openSUSE:Factory checked in at 2016-04-28 16:52:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2015-09-19 09:54:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sprockets-rails.new/rubygem-sprockets-rails.changes 2016-04-28 16:53:03.000000000 +0200
@@ -1,0 +2,30 @@
+Thu Mar 3 05:30:36 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.0.4
+ no changelog found
+
+-------------------------------------------------------------------
+Wed Mar 2 05:38:23 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.0.3
+ no changelog found
+
+-------------------------------------------------------------------
+Wed Feb 24 05:44:53 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.0.2
+ no changelog found
+
+-------------------------------------------------------------------
+Fri Jan 29 05:35:07 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.0.1
+ no changelog found
+
+-------------------------------------------------------------------
+Fri Dec 18 05:39:37 UTC 2015 - coolo(a)suse.com
+
+- updated to version 3.0.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
sprockets-rails-2.3.3.gem
New:
----
sprockets-rails-3.0.4.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sprockets-rails.spec ++++++
--- /var/tmp/diff_new_pack.7K2CNK/_old 2016-04-28 16:53:04.000000000 +0200
+++ /var/tmp/diff_new_pack.7K2CNK/_new 2016-04-28 16:53:04.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-sprockets-rails
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,13 +24,13 @@
#
Name: rubygem-sprockets-rails
-Version: 2.3.3
+Version: 3.0.4
Release: 0
%define mod_name sprockets-rails
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: %{ruby >= 1.9.3}
BuildRequires: %{rubygem gem2rpm}
-BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
Url: https://github.com/rails/sprockets-rails
Source: http://rubygems.org/gems/%{mod_full_name}.gem
@@ -48,7 +48,7 @@
%install
%gem_install \
- --doc-files="LICENSE README.md" \
+ --doc-files="MIT-LICENSE README.md" \
-f
%gem_packages
++++++ sprockets-rails-2.3.3.gem -> sprockets-rails-3.0.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2015-09-08 03:29:27.000000000 +0200
+++ new/LICENSE 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-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
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE
--- old/MIT-LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/MIT-LICENSE 2016-03-02 18:18:46.000000000 +0100
@@ -0,0 +1,20 @@
+Copyright (c) 2014-2016 Joshua Peek
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2015-09-08 03:29:27.000000000 +0200
+++ new/README.md 2016-03-02 18:18:46.000000000 +0100
@@ -27,7 +27,7 @@
**`rake assets:clobber`**
-Nuke `public/assets` and clear the Sprockets file system cache.
+Nuke `public/assets`.
#### Customize
@@ -37,11 +37,6 @@
``` ruby
require 'sprockets/rails/task'
-# clean the old tasks
-Rake::Task["assets:environment"].clear
-Rake::Task["assets:precompile"].clear
-Rake::Task["assets:clean"].clear
-Rake::Task["assets:clobber"].clear
Sprockets::Rails::Task.new(Rails.application) do |t|
t.environment = lambda { Rails.application.assets }
t.assets = %w( application.js application.css )
@@ -51,7 +46,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/rails/sprockets-rails/blob/maste… and [Rake::SprocketsTask](https://github.com/sstephenson/sprockets/blob/master/l….
+Also see [Sprockets::Rails::Task](https://github.com/rails/sprockets-rails/blob/maste… and [Rake::SprocketsTask](https://github.com/rails/sprockets/blob/master/lib/rak….
### Initializer options
@@ -60,10 +55,6 @@
Add additional assets to compile on deploy. Defaults to `application.js`, `application.css` and any other non-js/css file under `app/assets`.
-**`config.assets.raise_runtime_errors`**
-
-Set to `true` to enable additional runtime error checking. Recommended in the `development` environment to minimize unexpected behavior when deploying to `production`.
-
**`config.assets.paths`**
Add additional load paths to this Array. Rails includes `app/assets`, `lib/assets` and `vendor/assets` for you already. Plugins might want to add their custom paths to this.
@@ -83,13 +74,9 @@
Defaults to `/assets`. Changes the directory to compile assets to.
-**`config.assets.manifest`**
-
-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`**
-Link to undigest asset filenames. This option will eventually go away. Unless when `compile` is disabled.
+When enabled, fingerprints will be added to asset filenames.
**`config.assets.debug`**
@@ -97,7 +84,7 @@
**`config.assets.compile`**
-Enables Sprockets compile environment. If disabled, `Rails.application.assets` will be unavailable to any ActionView helpers. View helpers will depend on assets being precompiled to `public/assets` in order to link to them. You can still access the environment by directly calling `Rails.application.assets`.
+Enables Sprockets compile environment. If disabled, `Rails.application.assets` will be `nil` to prevent inadvertent compilation calls. View helpers will depend on assets being precompiled to `public/assets` in order to link to them. Initializers expecting `Rails.application.assets` during boot should be accessing the environment in a `config.assets.configure` block. See below.
**`config.assets.configure`**
@@ -105,18 +92,34 @@
``` ruby
config.assets.configure do |env|
- env.js_compressor = :uglify # or :closure, :yui
+ env.js_compressor = :uglifier # or :closure, :yui
env.css_compressor = :sass # or :yui
require 'my_processor'
env.register_preprocessor 'application/javascript', MyProcessor
env.logger = Rails.logger
-
- env.cache = ActiveSupport::Cache::FileStore.new("tmp/cache/assets")
end
```
+**`config.assets.resolve_with`**
+
+A list of `:environment` and `:manifest` symbols that defines the order that
+we try to find assets: manifest first, environment second? Manifest only?
+
+By default, we check the manifest first if asset digests are enabled and debug
+is not enabled, then we check the environment if compiling is enabled:
+```
+# Dev where debug is true, or digests are disabled
+%i[ environment ]
+
+# Dev default, or production with compile enabled.
+%i[ manifest environment ]
+
+# Production default.
+%i[ manifest ]
+```
+If the resolver list is empty (e.g. if debug is true and compile is false), the standard rails public path resolution will be used.
## Complementary plugins
@@ -132,29 +135,33 @@
* Only compiles digest filenames. Static non-digest assets should simply live in public/.
* 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.
+* 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 = :uglifier` 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.
+## Experimental
-## Contributing
+### [SRI](http://www.w3.org/TR/SRI/) support
-Usual bundler workflow.
+Sprockets 3.x adds experimental support for subresource integrity checks. The spec is still evolving and the API may change in backwards incompatible ways.
-``` shell
-$ git clone https://github.com/rails/sprockets-rails.git
-$ cd sprockets-rails/
-$ bundle install
-$ bundle exec rake test
+``` ruby
+javascript_include_tag :application, integrity: true
+# => "<script src="/assets/application.js" integrity="sha256-TvVUHzSfftWg1rcfL6TIJ0XKEGrgLyEq6lEpcmrG9qs="></script>"
```
-[![Build Status](https://secure.travis-ci.org/rails/sprockets-rails.png)](http://tra…
+## Contributing to Sprockets Rails
+
+Sprockets Rails is work of many contributors. You're encouraged to submit pull requests, propose
+features and discuss issues.
+
+See [CONTRIBUTING](CONTRIBUTING.md).
## Releases
-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.
+sprockets-rails 3.x will primarily target sprockets 3.x. And future versions will target the corresponding sprockets release line.
The minor and patch version will be updated according to [semver](http://semver.org/).
@@ -162,9 +169,12 @@
* Any time the sprockets dependency is bumped, there will be a new minor release
* Simple bug fixes will be patch releases
-
## License
-Copyright © 2014 Joshua Peek.
+Sprockets Rails is released under the [MIT License](MIT-LICENSE).
+
+## Code Status
-Released under the MIT license. See `LICENSE` for details.
+* [![Travis CI](https://api.travis-ci.org/rails/sprockets-rails.svg)](http://travis-ci.…
+* [![Gem Version](https://badge.fury.io/rb/sprockets-rails.svg)](http://badge.fury.io/rb/sprockets-rails)
+* [![Dependencies](https://gemnasium.com/rails/sprockets-rails.svg)](https://gemnasium.com/rails/sprockets-rails)
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/context.rb new/lib/sprockets/rails/context.rb
--- old/lib/sprockets/rails/context.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/sprockets/rails/context.rb 2016-03-02 18:18:46.000000000 +0100
@@ -0,0 +1,48 @@
+require 'action_view'
+require 'sprockets'
+
+module Sprockets
+ module Rails
+ module Context
+ include ActionView::Helpers::AssetUrlHelper
+ include ActionView::Helpers::AssetTagHelper
+
+ def self.included(klass)
+ klass.class_eval do
+ class_attribute :config, :assets_prefix, :digest_assets
+ end
+ end
+
+ def compute_asset_path(path, options = {})
+ @dependencies << 'actioncontroller-asset-url-config'
+
+ begin
+ asset_uri = resolve(path)
+ rescue FileNotFound
+ # TODO: eh, we should be able to use a form of locate that returns
+ # nil instead of raising an exception.
+ end
+
+ if asset_uri
+ asset = link_asset(path)
+ digest_path = asset.digest_path
+ path = digest_path if digest_assets
+ File.join(assets_prefix || "/", path)
+ else
+ super
+ end
+ end
+ end
+ end
+
+ register_dependency_resolver 'actioncontroller-asset-url-config' do |env|
+ config = env.context_class.config
+ [config.relative_url_root,
+ (config.asset_host unless config.asset_host.respond_to?(:call))]
+ end
+
+ # fallback to the default pipeline when using Sprockets 3.x
+ unless config[:pipelines].include? :debug
+ register_pipeline :debug, config[:pipelines][:default]
+ end
+end
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 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/rails/helper.rb 2016-03-02 18:18:46.000000000 +0100
@@ -1,128 +1,118 @@
require 'action_view'
require 'sprockets'
require 'active_support/core_ext/class/attribute'
+require 'sprockets/rails/utils'
module Sprockets
module Rails
module Helper
- class << self
- attr_accessor :precompile, :assets, :raise_runtime_errors
- end
-
- def precompile
- Sprockets::Rails::Helper.precompile
- end
-
- def assets
- Sprockets::Rails::Helper.assets
- end
-
- def raise_runtime_errors
- Sprockets::Rails::Helper.raise_runtime_errors
- end
-
- class AssetFilteredError < StandardError
+ class AssetNotPrecompiled < StandardError
+ include Sprockets::Rails::Utils
def initialize(source)
- msg = "Asset filtered out and will not be served: " <<
- "add `Rails.application.config.assets.precompile += %w( #{source} )` " <<
- "to `config/initializers/assets.rb` and restart your server"
- super(msg)
- 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}"
+ msg =
+ if using_sprockets4?
+ "Asset `#{source}` was not declared to be precompiled in production.\n" +
+ "Declare links to your assets in `assets/config/manifest.js`.\n" +
+ "Examples:\n" +
+ "`//= link ../javascripts/application.js`\n" +
+ "`//= link_directory ../javascripts .js`\n" +
+ "`//= link_directory ../stylesheets .css`\n" +
+ "`//= link_tree ../javascripts .js`\n" +
+ "`//= link_tree ../images`\n"
+ else
+ "Asset was not declared to be precompiled in production.\n" +
+ "Add `Rails.application.config.assets.precompile += " +
+ "%w( #{source} )` to `config/initializers/assets.rb` and " +
+ "restart your server"
+ end
super(msg)
end
end
- if defined? ActionView::Helpers::AssetUrlHelper
- include ActionView::Helpers::AssetUrlHelper
- include ActionView::Helpers::AssetTagHelper
- else
- require 'sprockets/rails/legacy_asset_tag_helper'
- require 'sprockets/rails/legacy_asset_url_helper'
- include LegacyAssetTagHelper
- include LegacyAssetUrlHelper
- end
-
- VIEW_ACCESSORS = [:assets_environment, :assets_manifest,
- :assets_prefix, :digest_assets, :debug_assets]
+ include ActionView::Helpers::AssetUrlHelper
+ include ActionView::Helpers::AssetTagHelper
+ include Sprockets::Rails::Utils
+
+ VIEW_ACCESSORS = [
+ :assets_environment, :assets_manifest,
+ :assets_precompile, :precompiled_asset_checker,
+ :assets_prefix, :digest_assets, :debug_assets,
+ :resolve_assets_with
+ ]
def self.included(klass)
- if klass < Sprockets::Context
- klass.class_eval do
- alias_method :assets_environment, :environment
- def assets_manifest; end
- class_attribute :config, :assets_prefix, :digest_assets, :debug_assets
+ klass.class_attribute(*VIEW_ACCESSORS)
+
+ klass.class_eval do
+ remove_method :assets_environment
+ def assets_environment
+ if instance_variable_defined?(:@assets_environment)
+ @assets_environment = @assets_environment.cached
+ elsif env = self.class.assets_environment
+ @assets_environment = env.cached
+ else
+ nil
+ end
end
- else
- klass.class_attribute(*VIEW_ACCESSORS)
end
end
def self.extended(obj)
obj.class_eval do
attr_accessor(*VIEW_ACCESSORS)
+
+ remove_method :assets_environment
+ def assets_environment
+ if env = @assets_environment
+ @assets_environment = env.cached
+ else
+ nil
+ end
+ end
end
end
def compute_asset_path(path, options = {})
- # Check if we are inside Sprockets context before calling check_dependencies!.
- check_dependencies!(path) if defined?(depend_on)
+ debug = options[:debug]
- if digest_path = asset_digest_path(path)
- path = digest_path if digest_assets
- path += "?body=1" if options[:debug]
- File.join(assets_prefix || "/", path)
+ if asset_path = resolve_asset_path(path, debug)
+ File.join(assets_prefix || "/", legacy_debug_path(asset_path, debug))
else
super
end
end
- # Computes the full URL to a asset in the public directory. This
- # method checks for errors before returning path.
- def asset_path(source, options = {})
- unless options[:debug]
- check_errors_for(source, options)
+ # Resolve the asset path against the Sprockets manifest or environment.
+ # Returns nil if it's an asset we don't know about.
+ def resolve_asset_path(path, allow_non_precompiled = false) #:nodoc:
+ resolve_asset do |resolver|
+ resolver.asset_path path, digest_assets, allow_non_precompiled
end
- super(source, options)
end
- alias :path_to_asset :asset_path
- # Get digest for asset path.
+ # Expand asset path to digested form.
#
# path - String path
# options - Hash options
#
- # Returns String Hex digest or nil if digests are disabled.
- def asset_digest(path, options = {})
- return unless digest_assets
-
- if digest_path = asset_digest_path(path, options)
- digest_path[/-(.+)\./, 1]
+ # Returns String path or nil if no asset was found.
+ def asset_digest_path(path, options = {})
+ resolve_asset do |resolver|
+ resolver.digest_path path, options[:debug]
end
end
- # Expand asset path to digested form.
+ # Experimental: Get integrity for asset path.
#
# path - String path
# options - Hash options
#
- # Returns String path or nil if no asset was found.
- def asset_digest_path(path, options = {})
- if manifest = assets_manifest
- if digest_path = manifest.assets[path]
- return digest_path
- end
- end
+ # Returns String integrity attribute or nil if no asset was found.
+ def asset_integrity(path, options = {})
+ path = path_with_extname(path, options)
- if environment = assets_environment
- if asset = environment[path]
- return asset.digest_path
- end
+ resolve_asset do |resolver|
+ resolver.integrity path
end
end
@@ -131,21 +121,27 @@
# Eventually will be deprecated and replaced by source maps.
def javascript_include_tag(*sources)
options = sources.extract_options!.stringify_keys
+ integrity = compute_integrity?(options)
if options["debug"] != false && request_debug_assets?
sources.map { |source|
- check_errors_for(source, :type => :javascript)
- if asset = lookup_asset_for_path(source, :type => :javascript)
- asset.to_a.map do |a|
- super(path_to_javascript(a.logical_path, :debug => true), options)
+ if asset = lookup_debug_asset(source, type: :javascript)
+ if asset.respond_to?(:to_a)
+ asset.to_a.map do |a|
+ super(path_to_javascript(a.logical_path, debug: true), options)
+ end
+ else
+ super(path_to_javascript(asset.logical_path, debug: true), options)
end
else
super(source, options)
end
}.flatten.uniq.join("\n").html_safe
else
- sources.push(options)
- super(*sources)
+ sources.map { |source|
+ options = options.merge('integrity' => asset_integrity(source, type: :javascript)) if integrity
+ super source, options
+ }.join("\n").html_safe
end
end
@@ -154,81 +150,205 @@
# Eventually will be deprecated and replaced by source maps.
def stylesheet_link_tag(*sources)
options = sources.extract_options!.stringify_keys
+ integrity = compute_integrity?(options)
+
if options["debug"] != false && request_debug_assets?
sources.map { |source|
- check_errors_for(source, :type => :stylesheet)
- if asset = lookup_asset_for_path(source, :type => :stylesheet)
- asset.to_a.map do |a|
- super(path_to_stylesheet(a.logical_path, :debug => true), options)
+ if asset = lookup_debug_asset(source, type: :stylesheet)
+ if asset.respond_to?(:to_a)
+ asset.to_a.map do |a|
+ super(path_to_stylesheet(a.logical_path, debug: true), options)
+ end
+ else
+ super(path_to_stylesheet(asset.logical_path, debug: true), options)
end
else
super(source, options)
end
}.flatten.uniq.join("\n").html_safe
else
- sources.push(options)
- super(*sources)
+ sources.map { |source|
+ options = options.merge('integrity' => asset_integrity(source, type: :stylesheet)) if integrity
+ super source, options
+ }.join("\n").html_safe
end
end
protected
- # Ensures the asset is included in the dependencies list.
- def check_dependencies!(dep)
- depend_on(dep)
- depend_on_asset(dep)
- rescue Sprockets::FileNotFound
+ # This is awkward: `integrity` is a boolean option indicating whether
+ # we want to include or omit the subresource integrity hash, but the
+ # options hash is also passed through as literal tag attributes.
+ # That means we have to delete the shortcut boolean option so it
+ # doesn't bleed into the tag attributes, but also check its value if
+ # it's boolean-ish.
+ def compute_integrity?(options)
+ if secure_subresource_integrity_context?
+ case options['integrity']
+ when nil, false, true
+ options.delete('integrity') == true
+ end
+ else
+ options.delete 'integrity'
+ false
+ end
end
- # 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
+ # Only serve integrity metadata for HTTPS requests:
+ # http://www.w3.org/TR/SRI/#non-secure-contexts-remain-non-secure
+ def secure_subresource_integrity_context?
+ respond_to?(:request) && self.request && self.request.ssl?
+ end
- source = source.to_s
- return if source.blank? || source =~ URI_REGEXP
+ # Enable split asset debugging. Eventually will be deprecated
+ # and replaced by source maps in Sprockets 3.x.
+ def request_debug_assets?
+ debug_assets || (defined?(controller) && controller && params[:debug_assets])
+ rescue # FIXME: what exactly are we rescuing?
+ false
+ end
- asset = lookup_asset_for_path(source, options)
+ # Internal method to support multifile debugging. Will
+ # eventually be removed w/ Sprockets 3.x.
+ def lookup_debug_asset(path, options = {})
+ path = path_with_extname(path, options)
- if asset && asset_needs_precompile?(asset.logical_path, asset.pathname.to_s)
- raise AssetFilteredError.new(asset.logical_path)
+ resolve_asset do |resolver|
+ resolver.find_debug_asset path
end
+ end
+
+ # compute_asset_extname is in AV::Helpers::AssetUrlHelper
+ def path_with_extname(path, options)
+ path = path.to_s
+ "#{path}#{compute_asset_extname(path, options)}"
+ 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)
+ # Try each asset resolver and return the first non-nil result.
+ def resolve_asset
+ asset_resolver_strategies.detect do |resolver|
+ if result = yield(resolver)
+ break result
end
end
end
- # Returns true when an asset will not be available after precompile is run
- def asset_needs_precompile?(source, filename)
- if assets_environment && assets_environment.send(:matches_filter, precompile || [], source, filename)
- false
+ # List of resolvers in `config.assets.resolve_with` order.
+ def asset_resolver_strategies
+ @asset_resolver_strategies ||=
+ Array(resolve_assets_with).map do |name|
+ HelperAssetResolvers[name].new(self)
+ end
+ end
+
+ # Append ?body=1 if debug is on and we're on old Sprockets.
+ def legacy_debug_path(path, debug)
+ if debug && !using_sprockets4?
+ "#{path}?body=1"
else
- true
+ path
end
end
+ end
- # Enable split asset debugging. Eventually will be deprecated
- # and replaced by source maps in Sprockets 3.x.
- def request_debug_assets?
- debug_assets || (defined?(controller) && controller && params[:debug_assets])
- rescue
- return false
+ # Use a separate module since Helper is mixed in and we needn't pollute
+ # the class namespace with our internals.
+ module HelperAssetResolvers #:nodoc:
+ def self.[](name)
+ case name
+ when :manifest
+ Manifest
+ when :environment
+ Environment
+ else
+ raise ArgumentError, "Unrecognized asset resolver: #{name.inspect}. Expected :manifest or :environment"
end
+ end
- # Internal method to support multifile debugging. Will
- # eventually be removed w/ Sprockets 3.x.
- def lookup_asset_for_path(path, options = {})
- return unless env = assets_environment
- path = path.to_s
- if extname = compute_asset_extname(path, options)
- path = "#{path}#{extname}"
+ class Manifest #:nodoc:
+ def initialize(view)
+ @manifest = view.assets_manifest
+ raise ArgumentError, 'config.assets.resolve_with includes :manifest, but app.assets_manifest is nil' unless @manifest
+ end
+
+ def asset_path(path, digest, allow_non_precompiled = false)
+ if digest
+ digest_path path, allow_non_precompiled
+ end
+ end
+
+ def digest_path(path, allow_non_precompiled = false)
+ @manifest.assets[path]
+ end
+
+ def integrity(path)
+ if meta = metadata(path)
+ meta["integrity"]
end
- env[path]
end
+
+ def find_debug_asset(path)
+ nil
+ end
+
+ private
+ def metadata(path)
+ if digest_path = digest_path(path)
+ @manifest.files[digest_path]
+ end
+ end
+ end
+
+ class Environment #:nodoc:
+ def initialize(view)
+ raise ArgumentError, 'config.assets.resolve_with includes :environment, but app.assets is nil' unless view.assets_environment
+ @env = view.assets_environment
+ @precompiled_asset_checker = view.precompiled_asset_checker
+ end
+
+ def asset_path(path, digest, allow_non_precompiled = false)
+ # Digests enabled? Do the work to calculate the full asset path.
+ if digest
+ digest_path path, allow_non_precompiled
+
+ # Otherwise, ask the Sprockets environment whether the asset exists
+ # and check whether it's also precompiled for production deploys.
+ elsif asset = find_asset(path)
+ raise_unless_precompiled_asset asset.logical_path unless allow_non_precompiled
+ path
+ end
+ end
+
+ def digest_path(path, allow_non_precompiled = false)
+ if asset = find_asset(path)
+ raise_unless_precompiled_asset asset.logical_path unless allow_non_precompiled
+ asset.digest_path
+ end
+ end
+
+ def integrity(path)
+ find_asset(path).try :integrity
+ end
+
+ def find_debug_asset(path)
+ if asset = find_asset(path, pipeline: :debug)
+ raise_unless_precompiled_asset asset.logical_path.sub('.debug', '')
+ asset
+ end
+ end
+
+ private
+ def find_asset(path, options = {})
+ @env[path, options]
+ end
+
+ def precompiled?(path)
+ @precompiled_asset_checker.call path
+ end
+
+ def raise_unless_precompiled_asset(path)
+ raise Helper::AssetNotPrecompiled.new(path) unless precompiled?(path)
+ end
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/legacy_asset_tag_helper.rb new/lib/sprockets/rails/legacy_asset_tag_helper.rb
--- old/lib/sprockets/rails/legacy_asset_tag_helper.rb 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/rails/legacy_asset_tag_helper.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-require 'sprockets'
-
-module Sprockets
- module Rails
- # Backports of AssetTagHelper methods for Rails 2.x and 3.x.
- module LegacyAssetTagHelper
- include ActionView::Helpers::TagHelper
-
- def javascript_include_tag(*sources)
- options = sources.extract_options!.stringify_keys
- sources.uniq.map { |source|
- tag_options = {
- "src" => path_to_javascript(source)
- }.merge(options)
- content_tag(:script, "", tag_options)
- }.join("\n").html_safe
- end
-
- def stylesheet_link_tag(*sources)
- options = sources.extract_options!.stringify_keys
- sources.uniq.map { |source|
- tag_options = {
- "rel" => "stylesheet",
- "media" => "screen",
- "href" => path_to_stylesheet(source)
- }.merge(options)
- tag(:link, tag_options)
- }.join("\n").html_safe
- end
- end
- end
-end
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 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/rails/legacy_asset_url_helper.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,133 +0,0 @@
-require 'sprockets'
-
-module Sprockets
- module Rails
- # Backports of AssetUrlHelper methods for Rails 2.x and 3.x.
- module LegacyAssetUrlHelper
- URI_REGEXP = %r{^[-a-z]+://|^(?:cid|data):|^//}
-
- def asset_path(source, options = {})
- source = source.to_s
- return "" unless source.present?
- return source if source =~ URI_REGEXP
-
- tail, source = source[/([\?#].+)$/], source.sub(/([\?#].+)$/, '')
-
- if extname = compute_asset_extname(source, options)
- source = "#{source}#{extname}"
- end
-
- if source[0] != ?/
- source = compute_asset_path(source, options)
- end
-
- relative_url_root = defined?(config.relative_url_root) && config.relative_url_root
- if relative_url_root
- source = "#{relative_url_root}#{source}" unless source.starts_with?("#{relative_url_root}/")
- end
-
- if host = compute_asset_host(source, options)
- source = "#{host}#{source}"
- end
-
- "#{source}#{tail}"
- 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'
- }
-
- def compute_asset_extname(source, options = {})
- return if options[:extname] == false
- extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]
- extname if extname && File.extname(source) != extname
- end
-
- ASSET_PUBLIC_DIRECTORIES = {
- :audio => '/audios',
- :font => '/fonts',
- :image => '/images',
- :javascript => '/javascripts',
- :stylesheet => '/stylesheets',
- :video => '/videos'
- }
-
- def compute_asset_path(source, options = {})
- dir = ASSET_PUBLIC_DIRECTORIES[options[:type]] || ""
- File.join(dir, source)
- end
-
- def compute_asset_host(source = "", options = {})
- request = self.request if respond_to?(:request)
-
- if defined? config
- host = config.asset_host
- elsif defined? ActionController::Base.asset_host
- host = ActionController::Base.asset_host
- end
-
- host ||= request.base_url if request && options[:protocol] == :request
- return unless host
-
- if host.respond_to?(:call)
- arity = host.respond_to?(:arity) ? host.arity : host.method(:call).arity
- args = [source]
- args << request if request && (arity > 1 || arity < 0)
- host = host.call(*args)
- elsif host =~ /%d/
- host = host % (Zlib.crc32(source) % 4)
- end
-
- if host =~ URI_REGEXP
- host
- else
- protocol = options[:protocol] || (request ? :request : :relative)
- case protocol
- when :relative
- "//#{host}"
- when :request
- "#{request.protocol}#{host}"
- else
- "#{protocol}://#{host}"
- end
- end
- end
-
- def javascript_path(source, options = {})
- path_to_asset(source, {:type => :javascript}.merge(options))
- end
- alias_method :path_to_javascript, :javascript_path
-
- def stylesheet_path(source, options = {})
- path_to_asset(source, {:type => :stylesheet}.merge(options))
- end
- alias_method :path_to_stylesheet, :stylesheet_path
-
- def image_path(source, options = {})
- path_to_asset(source, {:type => :image}.merge(options))
- end
- alias_method :path_to_image, :image_path
-
- def video_path(source, options = {})
- path_to_asset(source, {:type => :video}.merge(options))
- end
- alias_method :path_to_video, :video_path
-
- def audio_path(source, options = {})
- path_to_asset(source, {:type => :audio}.merge(options))
- end
- alias_method :path_to_audio, :audio_path
-
- def font_path(source, options = {})
- path_to_asset(source, {:type => :font}.merge(options))
- end
- alias_method :path_to_font, :font_path
- end
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/route_wrapper.rb new/lib/sprockets/rails/route_wrapper.rb
--- old/lib/sprockets/rails/route_wrapper.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/sprockets/rails/route_wrapper.rb 2016-03-02 18:18:46.000000000 +0100
@@ -0,0 +1,23 @@
+module Sprockets
+ module Rails
+ module RouteWrapper
+
+ def internal_assets_path?
+ path =~ %r{\A#{self.class.assets_prefix}\z}
+ end
+
+ def internal?
+ super || internal_assets_path?
+ end
+
+ def self.included(klass)
+ klass.class_eval do
+ def internal_with_sprockets?
+ internal_without_sprockets? || internal_assets_path?
+ end
+ alias_method_chain :internal?, :sprockets
+ end
+ end
+ end
+ end
+end
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 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/rails/task.rb 2016-03-02 18:18:46.000000000 +0100
@@ -16,7 +16,9 @@
def environment
if app
- app.assets
+ # Use initialized app.assets or force build an environment if
+ # config.assets.compile is disabled
+ app.assets || Sprockets::Railtie.build_environment(app)
else
super
end
@@ -24,7 +26,8 @@
def output
if app
- File.join(app.root, 'public', app.config.assets.prefix)
+ config = app.config
+ File.join(config.paths['public'].first, config.assets.prefix)
else
super
end
@@ -46,17 +49,12 @@
end
end
- def cache_path
- if app
- "#{app.config.root}/tmp/cache/assets"
- else
- @cache_path
- end
- end
- attr_writer :cache_path
-
def define
namespace :assets do
+ %w( environment precompile clean clobber ).each do |task|
+ Rake::Task[task].clear if Rake::Task.task_defined?(task)
+ end
+
# Override this task change the loaded dependencies
desc "Load asset compile environment"
task :environment do
@@ -73,9 +71,8 @@
desc "Remove old compiled assets"
task :clean, [:keep] => :environment do |t, args|
- keep = Integer(args.keep || 2)
with_logger do
- manifest.clean(keep)
+ manifest.clean(Integer(args.keep || self.keep))
end
end
@@ -83,7 +80,6 @@
task :clobber => :environment do
with_logger do
manifest.clobber
- rm_rf cache_path if cache_path
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sprockets/rails/utils.rb new/lib/sprockets/rails/utils.rb
--- old/lib/sprockets/rails/utils.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/sprockets/rails/utils.rb 2016-03-02 18:18:46.000000000 +0100
@@ -0,0 +1,11 @@
+require 'sprockets'
+
+module Sprockets
+ module Rails
+ module Utils
+ def using_sprockets4?
+ Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('4.x')
+ end
+ end
+ end
+end
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 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/rails/version.rb 2016-03-02 18:18:46.000000000 +0100
@@ -1,5 +1,5 @@
module Sprockets
module Rails
- VERSION = "2.3.3"
+ VERSION = "3.0.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 2015-09-08 03:29:27.000000000 +0200
+++ new/lib/sprockets/railtie.rb 2016-03-02 18:18:46.000000000 +0100
@@ -2,9 +2,13 @@
require 'rails/railtie'
require 'action_controller/railtie'
require 'active_support/core_ext/module/remove_method'
+require 'active_support/core_ext/numeric/bytes'
require 'sprockets'
+require 'sprockets/rails/context'
require 'sprockets/rails/helper'
+require 'sprockets/rails/route_wrapper'
require 'sprockets/rails/version'
+require 'set'
module Rails
class Application
@@ -19,37 +23,40 @@
remove_possible_method :assets=
# Returns Sprockets::Environment for app config.
- def assets
- @assets ||= Sprockets::Environment.new(root.to_s) do |env|
- env.version = ::Rails.env
+ attr_accessor :assets
- path = "#{config.root}/tmp/cache/assets/#{::Rails.env}"
- env.cache = Sprockets::Cache::FileStore.new(path)
+ # Returns Sprockets::Manifest for app config.
+ attr_accessor :assets_manifest
- env.context_class.class_eval do
- include ::Sprockets::Rails::Helper
- end
+ # Called from asset helpers to alert you if you reference an asset URL that
+ # isn't precompiled and hence won't be available in production.
+ def asset_precompiled?(logical_path)
+ if precompiled_assets.include?(logical_path)
+ true
+ elsif !config.cache_classes
+ # Check to see if precompile list has been updated
+ precompiled_assets(true).include?(logical_path)
+ else
+ false
end
end
- attr_writer :assets
- # Returns Sprockets::Manifest for app config.
- attr_accessor :assets_manifest
+ # Lazy-load the precompile list so we don't cause asset compilation at app
+ # boot time, but ensure we cache the list so we don't recompute it for each
+ # request or test case.
+ def precompiled_assets(clear_cache = false)
+ @precompiled_assets = nil if clear_cache
+ @precompiled_assets ||= assets_manifest.find(config.assets.precompile).map(&:logical_path).to_set
+ end
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
+ 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)
end
end
end
@@ -57,8 +64,11 @@
module Sprockets
class Railtie < ::Rails::Railtie
- LOOSE_APP_ASSETS = lambda do |filename, path|
- path =~ /app\/assets/ && !%w(.js .css).include?(File.extname(filename))
+ include Sprockets::Rails::Utils
+
+ LOOSE_APP_ASSETS = lambda do |logical_path, filename|
+ filename.start_with?(::Rails.root.join("app/assets").to_s) &&
+ !['.js', '.css', ''].include?(File.extname(logical_path))
end
class OrderedOptions < ActiveSupport::OrderedOptions
@@ -68,92 +78,140 @@
end
config.assets = OrderedOptions.new
- config.assets._blocks = []
- config.assets.paths = []
- config.assets.prefix = "/assets"
- config.assets.manifest = nil
- config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js)$/]
- config.assets.version = ""
- config.assets.debug = false
- config.assets.compile = true
- config.assets.digest = false
+ config.assets._blocks = []
+ config.assets.paths = []
+ config.assets.prefix = "/assets"
+ config.assets.manifest = nil
+ if using_sprockets4?
+ config.assets.precompile = %w( manifest.js )
+ else
+ config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js)$/]
+ end
+ config.assets.version = ""
+ config.assets.debug = false
+ config.assets.compile = true
+ config.assets.digest = true
+ config.assets.cache_limit = 50.megabytes
+
+ config.assets.configure do |env|
+ config.assets.paths.each { |path| env.append_path(path) }
+ end
+
+ config.assets.configure do |env|
+ env.context_class.send :include, ::Sprockets::Rails::Context
+ env.context_class.assets_prefix = config.assets.prefix
+ env.context_class.digest_assets = config.assets.digest
+ env.context_class.config = config.action_controller
+ end
+
+ config.assets.configure do |env|
+ env.cache = Sprockets::Cache::FileStore.new(
+ "#{env.root}/tmp/cache/assets",
+ config.assets.cache_limit,
+ env.logger
+ )
+ end
+
+ Sprockets.register_dependency_resolver 'rails-env' do
+ ::Rails.env.to_s
+ end
+
+ config.assets.configure do |env|
+ env.depend_on 'rails-env'
+ end
+
+ config.assets.configure do |env|
+ env.version = config.assets.version
+ end
rake_tasks do |app|
require 'sprockets/rails/task'
Sprockets::Rails::Task.new(app)
end
- config.after_initialize do |app|
- config = app.config
-
- # 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 unless config.action_controller.asset_host.respond_to?(:call)),
- Sprockets::Rails::VERSION
- ].compact.join('-')
-
- # Copy config.assets.paths to Sprockets
- config.assets.paths.each do |path|
- app.assets.append_path path
+ def build_environment(app, initialized = nil)
+ initialized = app.initialized? if initialized.nil?
+ unless initialized
+ ::Rails.logger.warn "Application uninitialized: Try calling YourApp::Application.initialize!"
end
+ env = Sprockets::Environment.new(app.root.to_s)
+
+ config = app.config
+
# Run app.assets.configure blocks
config.assets._blocks.each do |block|
- block.call app.assets
+ block.call(env)
end
# Set compressors after the configure blocks since they can
# define new compressors and we only accept existent compressors.
- app.assets.js_compressor = config.assets.js_compressor
- app.assets.css_compressor = config.assets.css_compressor
+ env.js_compressor = config.assets.js_compressor
+ env.css_compressor = config.assets.css_compressor
# No more configuration changes at this point.
# With cache classes on, Sprockets won't check the FS when files
# change. Preferable in production when the FS only changes on
# deploys when the app restarts.
if config.cache_classes
- app.assets = app.assets.index
+ env = env.cached
end
- manifest_assets_path = File.join(config.paths['public'].first, config.assets.prefix)
+ env
+ end
+
+ def self.build_manifest(app)
+ config = app.config
+ path = File.join(config.paths['public'].first, config.assets.prefix)
+ Sprockets::Manifest.new(app.assets, path, config.assets.manifest)
+ end
+
+ config.after_initialize do |app|
+ config = app.config
+
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)
+ app.assets = self.build_environment(app, true)
+ app.routes.prepend do
+ mount app.assets => config.assets.prefix
+ end
+ end
+
+ app.assets_manifest = build_manifest(app)
+
+ if config.assets.resolve_with.nil?
+ config.assets.resolve_with = []
+ config.assets.resolve_with << :manifest if config.assets.digest && !config.assets.debug
+ config.assets.resolve_with << :environment if config.assets.compile
+ end
+
+ ActionDispatch::Routing::RouteWrapper.class_eval do
+ class_attribute :assets_prefix
+
+ if defined?(prepend) && ::Rails.version >= '4'
+ prepend Sprockets::Rails::RouteWrapper
+ else
+ include Sprockets::Rails::RouteWrapper
+ end
+
+ self.assets_prefix = config.assets.prefix
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.debug_assets = config.assets.debug
+ self.digest_assets = config.assets.digest
+ self.assets_prefix = config.assets.prefix
+ self.assets_precompile = config.assets.precompile
- self.assets_environment = app.assets if config.assets.compile
+ self.assets_environment = app.assets
self.assets_manifest = app.assets_manifest
- end
- Sprockets::Rails::Helper.precompile ||= app.config.assets.precompile
- Sprockets::Rails::Helper.assets ||= app.assets
- Sprockets::Rails::Helper.raise_runtime_errors = app.config.assets.raise_runtime_errors
+ self.resolve_assets_with = config.assets.resolve_with
- if config.assets.compile
- if app.routes.respond_to?(:prepend)
- app.routes.prepend do
- mount app.assets => config.assets.prefix
- end
- end
+ # Expose the app precompiled asset check to the view
+ self.precompiled_asset_checker = -> logical_path { app.asset_precompiled? logical_path }
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-09-08 03:29:27.000000000 +0200
+++ new/metadata 2016-03-02 18:18:46.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: sprockets-rails
version: !ruby/object:Gem::Version
- version: 2.3.3
+ version: 3.0.4
platform: ruby
authors:
- Joshua Peek
autorequire:
bindir: bin
cert_chain: []
-date: 2015-09-08 00:00:00.000000000 Z
+date: 2016-03-02 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: sprockets
@@ -16,62 +16,56 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '2.8'
- - - "<"
- - !ruby/object:Gem::Version
- version: '4.0'
+ version: 3.0.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'
+ version: 3.0.0
- !ruby/object:Gem::Dependency
name: actionpack
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
- !ruby/object:Gem::Dependency
name: activesupport
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
- !ruby/object:Gem::Dependency
name: railties
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '3.0'
+ version: '4.0'
- !ruby/object:Gem::Dependency
name: rake
requirement: !ruby/object:Gem::Requirement
@@ -120,13 +114,14 @@
extensions: []
extra_rdoc_files: []
files:
-- LICENSE
+- MIT-LICENSE
- README.md
- lib/sprockets/rails.rb
+- lib/sprockets/rails/context.rb
- lib/sprockets/rails/helper.rb
-- lib/sprockets/rails/legacy_asset_tag_helper.rb
-- lib/sprockets/rails/legacy_asset_url_helper.rb
+- lib/sprockets/rails/route_wrapper.rb
- lib/sprockets/rails/task.rb
+- lib/sprockets/rails/utils.rb
- lib/sprockets/rails/version.rb
- lib/sprockets/railtie.rb
homepage: https://github.com/rails/sprockets-rails
@@ -141,7 +136,7 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '0'
+ version: 1.9.3
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
@@ -149,9 +144,8 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.4.7
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: Sprockets Rails integration
test_files: []
-has_rdoc:
1
0
Hello community,
here is the log from the commit of package perl-JSON-XS for openSUSE:Factory checked in at 2016-04-28 16:52:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-JSON-XS (Old)
and /work/SRC/openSUSE:Factory/.perl-JSON-XS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-JSON-XS"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-JSON-XS/perl-JSON-XS.changes 2013-12-06 14:43:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-JSON-XS.new/perl-JSON-XS.changes 2016-04-28 16:53:02.000000000 +0200
@@ -1,0 +2,9 @@
+Fri Mar 11 10:17:07 UTC 2016 - coolo(a)suse.com
+
+- updated to 3.02
+ see /usr/share/doc/packages/perl-JSON-XS/Changes
+
+ TODO: how to cope with tagged values and standard json decoders
+ TODO: investigate magic (Eric Brine)
+
+-------------------------------------------------------------------
Old:
----
JSON-XS-3.01.tar.gz
New:
----
JSON-XS-3.02.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.ayiiEl/_old 2016-04-28 16:53:03.000000000 +0200
+++ /var/tmp/diff_new_pack.ayiiEl/_new 2016-04-28 16:53:03.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-JSON-XS
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX 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,20 +17,22 @@
Name: perl-JSON-XS
-Version: 3.01
+Version: 3.02
Release: 0
+#Upstream: CHECK(GPL-1.0+ or Artistic-1.0)
%define cpan_name JSON-XS
Summary: JSON serialising/deserialising, done correctly and fast
-License: GPL-1.0+ or Artistic-1.0
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/JSON-XS/
-Source: http://www.cpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz
+Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(Canary::Stability)
BuildRequires: perl(Types::Serialiser)
BuildRequires: perl(common::sense)
-#BuildRequires: perl(JSON::XS)
Requires: perl(Types::Serialiser)
Requires: perl(common::sense)
%{perl_requires}
@@ -59,7 +61,7 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
++++++ JSON-XS-3.01.tar.gz -> JSON-XS-3.02.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/Changes new/JSON-XS-3.02/Changes
--- old/JSON-XS-3.01/Changes 2013-10-29 16:55:22.000000000 +0100
+++ new/JSON-XS-3.02/Changes 2016-02-26 22:46:02.000000000 +0100
@@ -3,6 +3,20 @@
TODO: maybe detetc and croak on more invalid inputs (e.g. +-inf/nan)
TODO: maybe avoid the reblessing and better support readonly objects.
TODO: http://stevehanov.ca/blog/index.php?id=104 compression
+TODO: how to cope with tagged values and standard json decoders
+TODO: investigate magic (Eric Brine)
+
+3.02 Fri Feb 26 22:45:20 CET 2016
+ - allow_nonref now affects booleans (\1, $Types::Serialiser::Boolean)
+ as well (reported by Alex Efros).
+ - allow literal tabs in strings in relaxed mode (patch by
+ lubo.rintel(a)gooddata.com).
+ - support "cbor" format in json_xs tool.
+ - support (and fix) calling encode and decode in list context
+ (reported by Вадим Власов).
+ - work around a bug in older perls crashing when presented
+ with shared hash keys (Reini Urban).
+ - use stability canary.
3.01 Tue Oct 29 16:55:15 CET 2013
- backport to perls < 5.18 (reported by Paul Howarth).
@@ -11,7 +25,7 @@
- implemented an object tagging extension (using the
Types::Serialiser serialisation protocol).
- reworked the documentation regarding object serialisation,
- add a new OBJECT SERIALISATION section that explains the
+ add a new OBJECT SERIALISATION section that explains th
whole process.
- new setting: allow_tags.
- switch to Types::Serialiser booleans.
@@ -142,7 +156,7 @@
- lifted the log2 rounding restriction of max_depth and max_size.
- make booleans mutable by creating a copy instead of handing out
the same scalar (reported by pasha sadri).
- - added support for incremental json parsing (still EXPERIMENTAL).
+ - added support for incremental json parsing (still EXPERIMENTAL).
- implemented and added a json_xs command line utility that can convert
from/to a number of serialisation formats - tell me if you need more.
- implement allow_unknown/get_allow_unknown methods.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/META.json new/JSON-XS-3.02/META.json
--- old/JSON-XS-3.01/META.json 2013-10-29 16:55:40.000000000 +0100
+++ new/JSON-XS-3.02/META.json 2016-02-26 22:46:28.000000000 +0100
@@ -4,7 +4,7 @@
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001",
"license" : [
"unknown"
],
@@ -27,7 +27,8 @@
},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "0"
+ "Canary::Stability" : "0",
+ "ExtUtils::MakeMaker" : "6.52"
}
},
"runtime" : {
@@ -38,5 +39,5 @@
}
},
"release_status" : "stable",
- "version" : "3.01"
+ "version" : 3.02
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/META.yml new/JSON-XS-3.02/META.yml
--- old/JSON-XS-3.01/META.yml 2013-10-29 16:55:40.000000000 +0100
+++ new/JSON-XS-3.02/META.yml 2016-02-26 22:46:28.000000000 +0100
@@ -3,21 +3,22 @@
author:
- unknown
build_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ Canary::Stability: '0'
+ ExtUtils::MakeMaker: '6.52'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: JSON-XS
no_index:
directory:
- t
- inc
requires:
- Types::Serialiser: 0
- common::sense: 0
-version: 3.01
+ Types::Serialiser: '0'
+ common::sense: '0'
+version: 3.02
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/Makefile.PL new/JSON-XS-3.02/Makefile.PL
--- old/JSON-XS-3.01/Makefile.PL 2013-10-28 22:28:41.000000000 +0100
+++ new/JSON-XS-3.02/Makefile.PL 2016-02-26 22:44:29.000000000 +0100
@@ -1,6 +1,8 @@
-use 5.008002;
+use 5.008003;
use ExtUtils::MakeMaker;
+use Canary::Stability JSON::XS => 1, 5.008003;
+
WriteMakefile(
dist => {
PREOP => 'pod2text XS.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
@@ -14,5 +16,6 @@
common::sense => 0,
Types::Serialiser => 0,
},
+ CONFIGURE_REQUIRES => { ExtUtils::MakeMaker => 6.52, Canary::Stability => 0 },
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/README new/JSON-XS-3.02/README
--- old/JSON-XS-3.01/README 2013-10-29 16:55:40.000000000 +0100
+++ new/JSON-XS-3.02/README 2016-02-26 22:46:28.000000000 +0100
@@ -354,6 +354,16 @@
# neither this one...
]
+ * literal ASCII TAB characters in strings
+
+ Literal ASCII TAB characters are now allowed in strings (and
+ treated as "\t").
+
+ [
+ "Hello\tWorld",
+ "Hello<TAB>World", # literal <TAB> would not normally be allowed
+ ]
+
$json = $json->canonical ([$enable])
$enabled = $json->get_canonical
If $enable is true (or missing), then the "encode" method will
@@ -624,7 +634,7 @@
protocol and you need to know where the JSON text ends.
JSON::XS->new->decode_prefix ("[1] the tail")
- => ([], 3)
+ => ([1], 3)
INCREMENTAL PARSING
In some cases, there is the need for incremental parsing of JSON texts.
@@ -1431,12 +1441,126 @@
deal with it, as major browser developers care only for features, not
about getting security right).
+"OLD" VS. "NEW" JSON (RFC 4627 VS. RFC 7159)
+ TL;DR: Due to security concerns, JSON::XS will not allow scalar data in
+ JSON texts by default - you need to create your own JSON::XS object and
+ enable "allow_nonref":
+
+ my $json = JSON::XS->new->allow_nonref;
+
+ $text = $json->encode ($data);
+ $data = $json->decode ($text);
+
+ The long version: JSON being an important and supposedly stable format,
+ the IETF standardised it as RFC 4627 in 2006. Unfortunately, the
+ inventor of JSON, Dougles Crockford, unilaterally changed the definition
+ of JSON in javascript. Rather than create a fork, the IETF decided to
+ standardise the new syntax (apparently, so Iw as told, without finding
+ it very amusing).
+
+ The biggest difference between thed original JSON and the new JSON is
+ that the new JSON supports scalars (anything other than arrays and
+ objects) at the toplevel of a JSON text. While this is strictly
+ backwards compatible to older versions, it breaks a number of protocols
+ that relied on sending JSON back-to-back, and is a minor security
+ concern.
+
+ For example, imagine you have two banks communicating, and on one side,
+ trhe JSON coder gets upgraded. Two messages, such as 10 and 1000 might
+ then be confused to mean 101000, something that couldn't happen in the
+ original JSON, because niether of these messages would be valid JSON.
+
+ If one side accepts these messages, then an upgrade in the coder on
+ either side could result in this becoming exploitable.
+
+ This module has always allowed these messages as an optional extension,
+ by default disabled. The security concerns are the reason why the
+ default is still disabled, but future versions might/will likely upgrade
+ to the newer RFC as default format, so you are advised to check your
+ implementation and/or override the default with "->allow_nonref (0)" to
+ ensure that future versions are safe.
+
INTEROPERABILITY WITH OTHER MODULES
"JSON::XS" uses the Types::Serialiser module to provide boolean
constants. That means that the JSON true and false values will be
comaptible to true and false values of iother modules that do the same,
such as JSON::PP and CBOR::XS.
+INTEROPERABILITY WITH OTHER JSON DECODERS
+ As long as you only serialise data that can be directly expressed in
+ JSON, "JSON::XS" is incapable of generating invalid JSON output (modulo
+ bugs, but "JSON::XS" has found more bugs in the official JSON testsuite
+ (1) than the official JSON testsuite has found in "JSON::XS" (0)).
+
+ When you have trouble decoding JSON generated by this module using other
+ decoders, then it is very likely that you have an encoding mismatch or
+ the other decoder is broken.
+
+ When decoding, "JSON::XS" is strict by default and will likely catch all
+ errors. There are currently two settings that change this: "relaxed"
+ makes "JSON::XS" accept (but not generate) some non-standard extensions,
+ and "allow_tags" will allow you to encode and decode Perl objects, at
+ the cost of not outputting valid JSON anymore.
+
+ TAGGED VALUE SYNTAX AND STANDARD JSON EN/DECODERS
+ When you use "allow_tags" to use the extended (and also nonstandard and
+ invalid) JSON syntax for serialised objects, and you still want to
+ decode the generated When you want to serialise objects, you can run a
+ regex to replace the tagged syntax by standard JSON arrays (it only
+ works for "normal" packagesnames without comma, newlines or single
+ colons). First, the readable Perl version:
+
+ # if your FREEZE methods return no values, you need this replace first:
+ $json =~ s/\( \s* (" (?: [^\\":,]+|\\.|::)* ") \s* \) \s* \[\s*\]/[$1]/gx;
+
+ # this works for non-empty constructor arg lists:
+ $json =~ s/\( \s* (" (?: [^\\":,]+|\\.|::)* ") \s* \) \s* \[/[$1,/gx;
+
+ And here is a less readable version that is easy to adapt to other
+ languages:
+
+ $json =~ s/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/[$1,/g;
+
+ Here is an ECMAScript version (same regex):
+
+ json = json.replace (/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/g, "[$1,");
+
+ Since this syntax converts to standard JSON arrays, it might be hard to
+ distinguish serialised objects from normal arrays. You can prepend a
+ "magic number" as first array element to reduce chances of a collision:
+
+ $json =~ s/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/["XU1peReLzT4ggEllLanBYq4G9VzliwKF",$1,/g;
+
+ And after decoding the JSON text, you could walk the data structure
+ looking for arrays with a first element of
+ "XU1peReLzT4ggEllLanBYq4G9VzliwKF".
+
+ The same approach can be used to create the tagged format with another
+ encoder. First, you create an array with the magic string as first
+ member, the classname as second, and constructor arguments last, encode
+ it as part of your JSON structure, and then:
+
+ $json =~ s/\[\s*"XU1peReLzT4ggEllLanBYq4G9VzliwKF"\s*,\s*("([^\\":,]+|\\.|::)*")\s*,/($1)[/g;
+
+ Again, this has some limitations - the magic string must not be encoded
+ with character escapes, and the constructor arguments must be non-empty.
+
+RFC7159
+ Since this module was written, Google has written a new JSON RFC, RFC
+ 7159 (and RFC7158). Unfortunately, this RFC breaks compatibility with
+ both the original JSON specification on www.json.org and RFC4627.
+
+ As far as I can see, you can get partial compatibility when parsing by
+ using "->allow_nonref". However, consider thew security implications of
+ doing so.
+
+ I haven't decided yet when to break compatibility with RFC4627 by
+ default (and potentially leave applications insecure) and change the
+ default to follow RFC7159, but application authors are well advised to
+ call "->allow_nonref(0)" even if this is the current default, if they
+ cannot handle non-reference values, in preparation for the day when the4
+ default will change.
+
THREADS
This module is *not* guaranteed to be thread safe and there are no plans
to change this until Perl gets thread support (as opposed to the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/XS.pm new/JSON-XS-3.02/XS.pm
--- old/JSON-XS-3.01/XS.pm 2013-10-29 16:55:34.000000000 +0100
+++ new/JSON-XS-3.02/XS.pm 2016-02-26 22:46:21.000000000 +0100
@@ -103,7 +103,7 @@
use common::sense;
-our $VERSION = 3.01;
+our $VERSION = 3.02;
our @ISA = qw(Exporter);
our @EXPORT = qw(encode_json decode_json);
@@ -406,6 +406,16 @@
# neither this one...
]
+=item * literal ASCII TAB characters in strings
+
+Literal ASCII TAB characters are now allowed in strings (and treated as
+C<\t>).
+
+ [
+ "Hello\tWorld",
+ "Hello<TAB>World", # literal <TAB> would not normally be allowed
+ ]
+
=back
=item $json = $json->canonical ([$enable])
@@ -689,7 +699,7 @@
and you need to know where the JSON text ends.
JSON::XS->new->decode_prefix ("[1] the tail")
- => ([], 3)
+ => ([1], 3)
=back
@@ -1555,6 +1565,47 @@
security right).
+=head1 "OLD" VS. "NEW" JSON (RFC 4627 VS. RFC 7159)
+
+TL;DR: Due to security concerns, JSON::XS will not allow scalar data in
+JSON texts by default - you need to create your own JSON::XS object and
+enable C<allow_nonref>:
+
+
+ my $json = JSON::XS->new->allow_nonref;
+
+ $text = $json->encode ($data);
+ $data = $json->decode ($text);
+
+The long version: JSON being an important and supposedly stable format,
+the IETF standardised it as RFC 4627 in 2006. Unfortunately, the inventor
+of JSON, Dougles Crockford, unilaterally changed the definition of JSON in
+javascript. Rather than create a fork, the IETF decided to standardise the
+new syntax (apparently, so Iw as told, without finding it very amusing).
+
+The biggest difference between thed original JSON and the new JSON is that
+the new JSON supports scalars (anything other than arrays and objects) at
+the toplevel of a JSON text. While this is strictly backwards compatible
+to older versions, it breaks a number of protocols that relied on sending
+JSON back-to-back, and is a minor security concern.
+
+For example, imagine you have two banks communicating, and on one side,
+trhe JSON coder gets upgraded. Two messages, such as C<10> and C<1000>
+might then be confused to mean C<101000>, something that couldn't happen
+in the original JSON, because niether of these messages would be valid
+JSON.
+
+If one side accepts these messages, then an upgrade in the coder on either
+side could result in this becoming exploitable.
+
+This module has always allowed these messages as an optional extension, by
+default disabled. The security concerns are the reason why the default is
+still disabled, but future versions might/will likely upgrade to the newer
+RFC as default format, so you are advised to check your implementation
+and/or override the default with C<< ->allow_nonref (0) >> to ensure that
+future versions are safe.
+
+
=head1 INTEROPERABILITY WITH OTHER MODULES
C<JSON::XS> uses the L<Types::Serialiser> module to provide boolean
@@ -1563,6 +1614,86 @@
such as L<JSON::PP> and L<CBOR::XS>.
+=head1 INTEROPERABILITY WITH OTHER JSON DECODERS
+
+As long as you only serialise data that can be directly expressed in JSON,
+C<JSON::XS> is incapable of generating invalid JSON output (modulo bugs,
+but C<JSON::XS> has found more bugs in the official JSON testsuite (1)
+than the official JSON testsuite has found in C<JSON::XS> (0)).
+
+When you have trouble decoding JSON generated by this module using other
+decoders, then it is very likely that you have an encoding mismatch or the
+other decoder is broken.
+
+When decoding, C<JSON::XS> is strict by default and will likely catch all
+errors. There are currently two settings that change this: C<relaxed>
+makes C<JSON::XS> accept (but not generate) some non-standard extensions,
+and C<allow_tags> will allow you to encode and decode Perl objects, at the
+cost of not outputting valid JSON anymore.
+
+=head2 TAGGED VALUE SYNTAX AND STANDARD JSON EN/DECODERS
+
+When you use C<allow_tags> to use the extended (and also nonstandard and
+invalid) JSON syntax for serialised objects, and you still want to decode
+the generated When you want to serialise objects, you can run a regex
+to replace the tagged syntax by standard JSON arrays (it only works for
+"normal" packagesnames without comma, newlines or single colons). First,
+the readable Perl version:
+
+ # if your FREEZE methods return no values, you need this replace first:
+ $json =~ s/\( \s* (" (?: [^\\":,]+|\\.|::)* ") \s* \) \s* \[\s*\]/[$1]/gx;
+
+ # this works for non-empty constructor arg lists:
+ $json =~ s/\( \s* (" (?: [^\\":,]+|\\.|::)* ") \s* \) \s* \[/[$1,/gx;
+
+And here is a less readable version that is easy to adapt to other
+languages:
+
+ $json =~ s/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/[$1,/g;
+
+Here is an ECMAScript version (same regex):
+
+ json = json.replace (/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/g, "[$1,");
+
+Since this syntax converts to standard JSON arrays, it might be hard to
+distinguish serialised objects from normal arrays. You can prepend a
+"magic number" as first array element to reduce chances of a collision:
+
+ $json =~ s/\(\s*("([^\\":,]+|\\.|::)*")\s*\)\s*\[/["XU1peReLzT4ggEllLanBYq4G9VzliwKF",$1,/g;
+
+And after decoding the JSON text, you could walk the data
+structure looking for arrays with a first element of
+C<XU1peReLzT4ggEllLanBYq4G9VzliwKF>.
+
+The same approach can be used to create the tagged format with another
+encoder. First, you create an array with the magic string as first member,
+the classname as second, and constructor arguments last, encode it as part
+of your JSON structure, and then:
+
+ $json =~ s/\[\s*"XU1peReLzT4ggEllLanBYq4G9VzliwKF"\s*,\s*("([^\\":,]+|\\.|::)*")\s*,/($1)[/g;
+
+Again, this has some limitations - the magic string must not be encoded
+with character escapes, and the constructor arguments must be non-empty.
+
+
+=head1 RFC7159
+
+Since this module was written, Google has written a new JSON RFC, RFC 7159
+(and RFC7158). Unfortunately, this RFC breaks compatibility with both the
+original JSON specification on www.json.org and RFC4627.
+
+As far as I can see, you can get partial compatibility when parsing by
+using C<< ->allow_nonref >>. However, consider thew security implications
+of doing so.
+
+I haven't decided yet when to break compatibility with RFC4627 by default
+(and potentially leave applications insecure) and change the default to
+follow RFC7159, but application authors are well advised to call C<<
+->allow_nonref(0) >> even if this is the current default, if they cannot
+handle non-reference values, in preparation for the day when the4 default
+will change.
+
+
=head1 THREADS
This module is I<not> guaranteed to be thread safe and there are no
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/XS.xs new/JSON-XS-3.02/XS.xs
--- old/JSON-XS-3.01/XS.xs 2013-10-29 16:52:49.000000000 +0100
+++ new/JSON-XS-3.02/XS.xs 2016-02-26 22:41:10.000000000 +0100
@@ -81,16 +81,18 @@
#ifdef USE_ITHREADS
# define JSON_SLOW 1
# define JSON_STASH (json_stash ? json_stash : gv_stashpv ("JSON::XS", 1))
+# define BOOL_STASH (bool_stash ? bool_stash : gv_stashpv ("Types::Serialiser::Boolean", 1))
#else
# define JSON_SLOW 0
# define JSON_STASH json_stash
+# define BOOL_STASH bool_stash
#endif
// the amount of HEs to allocate on the stack, when sorting keys
#define STACK_HES 64
-static HV *json_stash, *types_boolean_stash; // JSON::XS::
-static SV *types_true, *types_false, *sv_json;
+static HV *json_stash, *bool_stash; // JSON::XS::, Types::Serialiser::Boolean::
+static SV *bool_true, *bool_false, *sv_json;
enum {
INCR_M_WS = 0, // initial whitespace skipping, must be 0
@@ -301,6 +303,47 @@
return neg ? -accum : accum;
}
+
+// target of scalar reference is bool? -1 == nope, 0 == false, 1 == true
+static int
+ref_bool_type (SV *sv)
+{
+ svtype svt = SvTYPE (sv);
+
+ if (svt < SVt_PVAV)
+ {
+ STRLEN len = 0;
+ char *pv = svt ? SvPV (sv, len) : 0;
+
+ if (len == 1)
+ if (*pv == '1')
+ return 1;
+ else if (*pv == '0')
+ return 0;
+
+ }
+
+ return -1;
+}
+
+// returns whether scalar is not a reference in the sense of allow_nonref
+static int
+json_nonref (SV *scalar)
+{
+ if (!SvROK (scalar))
+ return 1;
+
+ scalar = SvRV (scalar);
+
+ if (SvSTASH (scalar) == bool_stash)
+ return 1;
+
+ if (!SvOBJECT (scalar) && ref_bool_type (scalar) >= 0)
+ return 1;
+
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////
// encoder
@@ -703,12 +746,9 @@
if (expect_false (SvOBJECT (sv)))
{
- HV *boolean_stash = !JSON_SLOW || types_boolean_stash
- ? types_boolean_stash
- : gv_stashpv ("Types::Serialiser::Boolean", 1);
HV *stash = SvSTASH (sv);
- if (stash == boolean_stash)
+ if (stash == bool_stash)
{
if (SvIV (sv))
encode_str (enc, "true", 4, 0);
@@ -720,7 +760,9 @@
int count;
dSP;
- ENTER; SAVETMPS; PUSHMARK (SP);
+ ENTER; SAVETMPS;
+ SAVESTACK_POS ();
+ PUSHMARK (SP);
EXTEND (SP, 2);
// we re-bless the reference to get overload and other niceties right
PUSHs (sv_bless (sv_2mortal (newRV_inc (sv)), stash));
@@ -732,7 +774,7 @@
// catch this surprisingly common error
if (SvROK (TOPs) && SvRV (TOPs) == sv)
- croak ("%s::TO_JSON method returned same object as was passed instead of a new one", HvNAME (SvSTASH (sv)));
+ croak ("%s::FREEZE method returned same object as was passed instead of a new one", HvNAME (SvSTASH (sv)));
encode_ch (enc, '(');
encode_ch (enc, '"');
@@ -751,15 +793,14 @@
encode_ch (enc, ']');
- PUTBACK;
-
FREETMPS; LEAVE;
}
else if ((enc->json.flags & F_CONV_BLESSED) && (method = gv_fetchmethod_autoload (stash, "TO_JSON", 0)))
{
dSP;
- ENTER; SAVETMPS; PUSHMARK (SP);
+ ENTER; SAVETMPS;
+ PUSHMARK (SP);
// we re-bless the reference to get overload and other niceties right
XPUSHs (sv_bless (sv_2mortal (newRV_inc (sv)), stash));
@@ -791,12 +832,11 @@
encode_av (enc, (AV *)sv);
else if (svt < SVt_PVAV)
{
- STRLEN len = 0;
- char *pv = svt ? SvPV (sv, len) : 0;
+ int bool_type = ref_bool_type (sv);
- if (len == 1 && *pv == '1')
+ if (bool_type == 1)
encode_str (enc, "true", 4, 0);
- else if (len == 1 && *pv == '0')
+ else if (bool_type == 0)
encode_str (enc, "false", 5, 0);
else if (enc->json.flags & F_ALLOW_UNKNOWN)
encode_str (enc, "null", 4, 0);
@@ -889,7 +929,7 @@
{
enc_t enc;
- if (!(json->flags & F_ALLOW_NONREF) && !SvROK (scalar))
+ if (!(json->flags & F_ALLOW_NONREF) && json_nonref (scalar))
croak ("hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)");
enc.json = *json;
@@ -1106,6 +1146,8 @@
utf8 = 1;
}
+ else if (ch == '\t' && dec->json.flags & F_RELAXED)
+ *cur++ = ch;
else
{
--dec_cur;
@@ -1437,7 +1479,7 @@
he = hv_iternext (hv);
hv_iterinit (hv);
- // the next line creates a mortal sv each time its called.
+ // the next line creates a mortal sv each time it's called.
// might want to optimise this for common cases.
cb = hv_fetch_ent (dec->json.cb_sk_object, hv_iterkeysv (he), 0, 0);
@@ -1446,7 +1488,9 @@
dSP;
int count;
- ENTER; SAVETMPS; PUSHMARK (SP);
+ ENTER; SAVETMPS;
+ SAVESTACK_POS ();
+ PUSHMARK (SP);
XPUSHs (HeVAL (he));
sv_2mortal (sv);
@@ -1469,7 +1513,9 @@
dSP;
int count;
- ENTER; SAVETMPS; PUSHMARK (SP);
+ ENTER; SAVETMPS;
+ SAVESTACK_POS ();
+ PUSHMARK (SP);
XPUSHs (sv_2mortal (sv));
PUTBACK; count = call_sv (dec->json.cb_object, G_ARRAY); SPAGAIN;
@@ -1546,7 +1592,8 @@
dSP;
- ENTER; SAVETMPS; PUSHMARK (SP);
+ ENTER; SAVETMPS;
+ PUSHMARK (SP);
EXTEND (SP, len + 2);
// we re-bless the reference to get overload and other niceties right
PUSHs (tag);
@@ -1598,9 +1645,9 @@
{
dec->cur += 4;
#if JSON_SLOW
- types_true = get_bool ("Types::Serialiser::true");
+ bool_true = get_bool ("Types::Serialiser::true");
#endif
- return newSVsv (types_true);
+ return newSVsv (bool_true);
}
else
ERR ("'true' expected");
@@ -1612,9 +1659,9 @@
{
dec->cur += 5;
#if JSON_SLOW
- types_false = get_bool ("Types::Serialiser::false");
+ bool_false = get_bool ("Types::Serialiser::false");
#endif
- return newSVsv (types_false);
+ return newSVsv (bool_false);
}
else
ERR ("'false' expected");
@@ -1651,9 +1698,12 @@
* makes perl ignore the magic in subsequent accesses.
* also make a copy of non-PV values, to get them into a clean
* state (SvPV should do that, but it's buggy, see below).
+ *
+ * SvIsCOW_shared_hash works around a bug in perl (possibly 5.16),
+ * as reported by Reini Urban.
*/
/*SvGETMAGIC (string);*/
- if (SvMAGICAL (string) || !SvPOK (string))
+ if (SvMAGICAL (string) || !SvPOK (string) || SvIsCOW_shared_hash (string))
string = sv_2mortal (newSVsv (string));
SvUPGRADE (string, SVt_PV);
@@ -1738,7 +1788,7 @@
sv = sv_2mortal (sv);
- if (!(dec.json.flags & F_ALLOW_NONREF) && !SvROK (sv))
+ if (!(dec.json.flags & F_ALLOW_NONREF) && json_nonref (sv))
croak ("JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this)");
return sv;
@@ -1918,11 +1968,10 @@
: i >= 'A' && i <= 'F' ? i - 'A' + 10
: -1;
- json_stash = gv_stashpv ("JSON::XS" , 1);
- types_boolean_stash = gv_stashpv ("Types::Serialiser::Boolean", 1);
-
- types_true = get_bool ("Types::Serialiser::true");
- types_false = get_bool ("Types::Serialiser::false");
+ json_stash = gv_stashpv ("JSON::XS" , 1);
+ bool_stash = gv_stashpv ("Types::Serialiser::Boolean", 1);
+ bool_true = get_bool ("Types::Serialiser::true");
+ bool_false = get_bool ("Types::Serialiser::false");
sv_json = newSVpv ("JSON", 0);
SvREADONLY_on (sv_json);
@@ -1934,8 +1983,8 @@
void CLONE (...)
CODE:
- json_stash = 0;
- types_boolean_stash = 0;
+ json_stash = 0;
+ bool_stash = 0;
void new (char *klass)
PPCODE:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-3.01/bin/json_xs new/JSON-XS-3.02/bin/json_xs
--- old/JSON-XS-3.01/bin/json_xs 2013-10-28 22:56:48.000000000 +0100
+++ new/JSON-XS-3.02/bin/json_xs 2016-02-21 16:37:44.000000000 +0100
@@ -52,6 +52,8 @@
=item none - nothing is read, creates an C<undef> scalar - mainly useful with C<-e>
+=item cbor - CBOR (via CBOR::XS)
+
=back
=item -t toformat
@@ -183,6 +185,7 @@
"bencode" => sub { require Convert::Bencode; Convert::Bencode::bdecode ($_) },
"clzf" => sub { require Compress::LZF; Compress::LZF::sthaw ($_) },
"yaml" => sub { require YAML; YAML::Load ($_) },
+ "cbor" => sub { require CBOR::XS; CBOR::XS::decode_cbor ($_) },
"eval" => sub { my $v = eval "no strict; no warnings; no utf8;\n#line 1 \"input\"\n$_"; die "$@" if $@; $v },
);
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
license: Perl License
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module
1
0
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
28 Apr '16
Hello community,
here is the log from the commit of package rubygem-gettext_i18n_rails for openSUSE:Factory checked in at 2016-04-28 16:52:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-gettext_i18n_rails (Old)
and /work/SRC/openSUSE:Factory/.rubygem-gettext_i18n_rails.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-gettext_i18n_rails"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-gettext_i18n_rails/rubygem-gettext_i18n_rails.changes 2015-12-03 13:30:08.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-gettext_i18n_rails.new/rubygem-gettext_i18n_rails.changes 2016-04-28 16:53:01.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Mar 1 05:45:09 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.5.0
+ no changelog found
+
+-------------------------------------------------------------------
+Thu Jan 21 05:36:18 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.4.0
+ no changelog found
+
+-------------------------------------------------------------------
+Tue Dec 15 05:30:28 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.3.2
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
gettext_i18n_rails-1.3.1.gem
New:
----
gettext_i18n_rails-1.5.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-gettext_i18n_rails.spec ++++++
--- /var/tmp/diff_new_pack.GznRWy/_old 2016-04-28 16:53:02.000000000 +0200
+++ /var/tmp/diff_new_pack.GznRWy/_new 2016-04-28 16:53:02.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-gettext_i18n_rails
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-gettext_i18n_rails
-Version: 1.3.1
+Version: 1.5.0
Release: 0
%define mod_name gettext_i18n_rails
%define mod_full_name %{mod_name}-%{version}
++++++ gettext_i18n_rails-1.3.1.gem -> gettext_i18n_rails-1.5.0.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/active_model/translation.rb new/lib/gettext_i18n_rails/active_model/translation.rb
--- old/lib/gettext_i18n_rails/active_model/translation.rb 2015-10-31 22:29:03.000000000 +0100
+++ new/lib/gettext_i18n_rails/active_model/translation.rb 2016-02-29 18:11:37.000000000 +0100
@@ -17,7 +17,15 @@
def inheritance_tree_root(aclass)
return aclass unless aclass.respond_to?(:base_class)
base = aclass.base_class
- base.superclass.abstract_class? ? base.superclass : base
+ if base.superclass.abstract_class?
+ if defined?(::ApplicationRecord) && base.superclass == ApplicationRecord
+ base
+ else
+ base.superclass
+ end
+ else
+ base
+ end
end
def humanize_class_name(name=nil)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/model_attributes_finder.rb new/lib/gettext_i18n_rails/model_attributes_finder.rb
--- old/lib/gettext_i18n_rails/model_attributes_finder.rb 2015-10-31 22:29:03.000000000 +0100
+++ new/lib/gettext_i18n_rails/model_attributes_finder.rb 2016-02-29 18:11:37.000000000 +0100
@@ -42,15 +42,16 @@
end
def initialize
- @existing_tables = ActiveRecord::Base.connection.tables
+ connection = ::ActiveRecord::Base.connection
+ @existing_tables = (Rails::VERSION::MAJOR >= 5 ? connection.data_sources : connection.tables)
end
- # Rails < 3.0 doesn't have DescendantsTracker.
+ # Rails < 3.0 doesn't have DescendantsTracker.
# Instead of iterating over ObjectSpace (slow) the decision was made NOT to support
# class hierarchies with abstract base classes in Rails 2.x
def model_attributes(model, ignored_tables, ignored_cols)
return [] if model.abstract_class? && Rails::VERSION::MAJOR < 3
-
+
if model.abstract_class?
model.direct_descendants.reject {|m| ignored?(m.table_name, ignored_tables)}.inject([]) do |attrs, m|
attrs.push(model_attributes(m, ignored_tables, ignored_cols)).flatten.uniq
@@ -63,9 +64,17 @@
end
def models
- if Rails::VERSION::MAJOR > 2
+ if Rails::VERSION::MAJOR >= 3
Rails.application.eager_load! # make sure that all models are loaded so that direct_descendants works
- ::ActiveRecord::Base.direct_descendants
+ descendants = ::ActiveRecord::Base.direct_descendants
+
+ # In rails 5+ user models are supposed to inherit from ApplicationRecord
+ if defined?(::ApplicationRecord)
+ descendants += ApplicationRecord.direct_descendants
+ descendants.delete ApplicationRecord
+ end
+
+ descendants
else
::ActiveRecord::Base.connection.tables \
.map { |t| table_name_to_namespaced_model(t) } \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/railtie.rb new/lib/gettext_i18n_rails/railtie.rb
--- old/lib/gettext_i18n_rails/railtie.rb 2015-10-31 22:29:03.000000000 +0100
+++ new/lib/gettext_i18n_rails/railtie.rb 2016-02-29 18:11:37.000000000 +0100
@@ -2,6 +2,7 @@
class Railtie < ::Rails::Railtie
config.gettext_i18n_rails = ActiveSupport::OrderedOptions.new
config.gettext_i18n_rails.msgmerge = nil
+ config.gettext_i18n_rails.msgcat = nil
config.gettext_i18n_rails.xgettext = nil
config.gettext_i18n_rails.use_for_active_record_attributes = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/tasks.rb new/lib/gettext_i18n_rails/tasks.rb
--- old/lib/gettext_i18n_rails/tasks.rb 2015-10-31 22:29:03.000000000 +0100
+++ new/lib/gettext_i18n_rails/tasks.rb 2016-02-29 18:11:37.000000000 +0100
@@ -27,6 +27,11 @@
config || gettext_default_options
end
+ def gettext_msgcat_options
+ config = (Rails.application.config.gettext_i18n_rails.msgcat if defined?(Rails.application))
+ config || gettext_default_options
+ end
+
def gettext_xgettext_options
config = (Rails.application.config.gettext_i18n_rails.xgettext if defined?(Rails.application))
config || gettext_default_options
@@ -45,6 +50,7 @@
task.files = files_to_translate
task.enable_description = false
task.msgmerge_options = gettext_msgmerge_options
+ task.msgcat_options = gettext_msgcat_options
task.xgettext_options = gettext_xgettext_options
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/version.rb new/lib/gettext_i18n_rails/version.rb
--- old/lib/gettext_i18n_rails/version.rb 2015-10-31 22:29:03.000000000 +0100
+++ new/lib/gettext_i18n_rails/version.rb 2016-02-29 18:11:37.000000000 +0100
@@ -1,3 +1,3 @@
module GettextI18nRails
- Version = VERSION = '1.3.1'
+ Version = VERSION = '1.5.0'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-10-31 22:29:03.000000000 +0100
+++ new/metadata 2016-02-29 18:11:37.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: gettext_i18n_rails
version: !ruby/object:Gem::Version
- version: 1.3.1
+ version: 1.5.0
platform: ruby
authors:
- Michael Grosser
autorequire:
bindir: bin
cert_chain: []
-date: 2015-10-31 00:00:00.000000000 Z
+date: 2016-02-29 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: fast_gettext
1
0
Hello community,
here is the log from the commit of package rubygem-warden for openSUSE:Factory checked in at 2016-04-28 16:52:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-warden (Old)
and /work/SRC/openSUSE:Factory/.rubygem-warden.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-warden"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-warden/rubygem-warden.changes 2013-07-22 13:53:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-warden.new/rubygem-warden.changes 2016-04-28 16:53:00.000000000 +0200
@@ -1,0 +2,24 @@
+Tue Feb 9 05:31:57 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.2.6
+ see installed History.rdoc
+
+ == Version 1.2.6 / 2016-01-31
+ * Separate test helpers to encapsulate Warden object mocking inside it's own class
+
+-------------------------------------------------------------------
+Fri Jan 29 05:35:22 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.2.5
+ see installed History.rdoc
+
+ == Version 1.2.5 / 2016-01-28
+ * Expands on the test helpers available to make it easier for testing gems
+
+-------------------------------------------------------------------
+Thu Dec 10 05:37:15 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.2.4
+ see installed History.rdoc
+
+-------------------------------------------------------------------
Old:
----
warden-1.2.3.gem
New:
----
gem2rpm.yml
warden-1.2.6.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-warden.spec ++++++
--- /var/tmp/diff_new_pack.so0Nhb/_old 2016-04-28 16:53:01.000000000 +0200
+++ /var/tmp/diff_new_pack.so0Nhb/_new 2016-04-28 16:53:01.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-warden
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,68 +16,42 @@
#
+#
+# This file was generated with a gem2rpm.yml and not just plain gem2rpm.
+# All sections marked as MANUAL, license headers, summaries and descriptions
+# can be maintained in that file. Please consult this file before editing any
+# of those fields
+#
+
Name: rubygem-warden
-Version: 1.2.3
+Version: 1.2.6
Release: 0
%define mod_name warden
%define mod_full_name %{mod_name}-%{version}
-
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 1
-BuildRequires: rubygem(rdoc) > 3.10
+BuildRequires: %{rubygem gem2rpm}
+BuildRequires: %{rubygem rdoc > 3.10}
+BuildRequires: %{ruby}
+BuildRequires: ruby-macros >= 5
Url: http://github.com/hassox/warden
Source: http://rubygems.org/gems/%{mod_full_name}.gem
+Source1: gem2rpm.yml
Summary: Rack middleware that provides authentication for rack applications
License: MIT
Group: Development/Languages/Ruby
%description
-Rack middleware that provides authentication for rack applications
-
-%package doc
-Summary: RDoc documentation for %{mod_name}
-Group: Development/Languages/Ruby
-Requires: %{name} = %{version}
-
-%description doc
-Documentation generated at gem installation time.
-Usually in RDoc and RI formats.
-
-%package testsuite
-Summary: Test suite for %{mod_name}
-Group: Development/Languages/Ruby
-Requires: %{name} = %{version}
-
-%description testsuite
-Test::Unit or RSpec files, useful for developers.
+Rack middleware that provides authentication for rack applications.
%prep
-#gem_unpack
-#if you need patches, apply them here and replace the # with a % sign in the surrounding lines
-#gem_build
%build
%install
-%gem_install -f
-mkdir -p %{buildroot}%{_docdir}/%{name}
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/History.rdoc %buildroot/%{_docdir}/%{name}/History.rdoc
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/LICENSE %buildroot/%{_docdir}/%{name}/LICENSE
-
-%files
-%defattr(-,root,root,-)
-%{_docdir}/%{name}
-%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
-%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
-%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec
-
-%files doc
-%defattr(-,root,root,-)
-%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/
-
-%files testsuite
-%defattr(-,root,root,-)
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
+%gem_install \
+ --doc-files="History.rdoc LICENSE" \
+ -f
+
+%gem_packages
%changelog
++++++ gem2rpm.yml ++++++
# ---
# ## used by gem2rpm
# :summary: this is a custom summary
# ## used by gem2rpm
# :description: |-
# this is a custom description
#
# it can be multiline
# ## used by gem2rpm
# :license: MIT or Ruby
# ## used by gem2rpm and gem_packages
# :version_suffix: -x_y
# ## used by gem2rpm and gem_packages
# :disable_docs: true
# ## used by gem2rpm
# :disable_automatic_rdoc_dep: true
# ## used by gem2rpm
# :preamble: |-
# BuildRequires: foobar
# Requires: foobar
# ## used by gem2rpm
# :patches:
# foo.patch: -p1
# bar.patch:
# ## used by gem2rpm
:sources:
# - foo.desktop
# - bar.desktop
# :gem_install_args: '....'
# ## used by gem2rpm
# :pre_install: |-
# %if 0%{?use_system_libev}
# export USE_VENDORED_LIBEV="no"
# %endif
# ## used by gem2rpm
# :post_install: |-
# # delete custom files here or do other fancy stuff
# install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse
# ## used by gem2rpm
# :testsuite_command: |-
# (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test)
# ## used by gem2rpm
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem2rpm
# :scripts:
# :post: |-
# /bin/echo foo
# ## used by gem_packages
# :main:
# :preamble: |-
# Requires: util-linux
# Recommends: pwgen
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem_packages
# :custom:
# apache:
# :preamble: |-
# Requires: .....
# :filelist: |-
# /etc/apache2/conf.d/passenger.conf
# :summary: Custom summary is optional
# :description: |-
# Custom description is optional
#
# bar
# :post: |-
# /bin/echo foo
#
++++++ warden-1.2.3.gem -> warden-1.2.6.gem ++++++
++++ 3025 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-coffee-rails for openSUSE:Factory checked in at 2016-04-28 16:52:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-coffee-rails (Old)
and /work/SRC/openSUSE:Factory/.rubygem-coffee-rails.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-coffee-rails"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-coffee-rails/rubygem-coffee-rails.changes 2015-04-18 10:39:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-coffee-rails.new/rubygem-coffee-rails.changes 2016-04-28 16:52:59.000000000 +0200
@@ -1,0 +2,6 @@
+Sat Dec 19 05:31:17 UTC 2015 - coolo(a)suse.com
+
+- updated to version 4.1.1
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
Old:
----
coffee-rails-4.1.0.gem
New:
----
coffee-rails-4.1.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-coffee-rails.spec ++++++
--- /var/tmp/diff_new_pack.pTrAaR/_old 2016-04-28 16:53:00.000000000 +0200
+++ /var/tmp/diff_new_pack.pTrAaR/_new 2016-04-28 16:53:00.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-coffee-rails
-Version: 4.1.0
+Version: 4.1.1
Release: 0
%define mod_name coffee-rails
%define mod_full_name %{mod_name}-%{version}
++++++ coffee-rails-4.1.0.gem -> coffee-rails-4.1.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 2014-10-13 02:58:45.000000000 +0200
+++ new/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-tmp/
-test/tmp
-Gemfile.lock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2014-10-13 02:58:45.000000000 +0200
+++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-language: ruby
-before_install:
- - gem install bundler
-rvm:
- - 1.9.3
- - 2.0.0
- - 2.1.0
- - jruby
- - rbx
-gemfile:
- - Gemfile
- - gemfiles/Gemfile-4-0-stable
- - gemfiles/Gemfile-4-1-stable
-notifications:
- email: false
- campfire:
- secure: "CGWvthGkBKNnTnk9YSmf9AXKoiRI33fCl5D3jU4nx3cOPu6kv2R9nMjt9EAo\nOuS4Q85qNSf4VNQ2cUPNiNYSWQ+XiTfivKvDUw/QW9r1FejYyeWarMsSBWA+\n0fADjF1M2dkDIVLgYPfwoXEv7l+j654F1KLKB69F0F/netwP9CQ="
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2014-10-13 02:58:45.000000000 +0200
+++ new/CHANGELOG.md 2015-12-18 19:40:30.000000000 +0100
@@ -1,4 +1,10 @@
-## unreleased ##
+## 4.1.1 (December 18, 2018) ##
+
+* Allow Rails 5.
+
+ *Rafael Mendonça França*
+
+## 4.1.0 (October 12, 2014) ##
* Default to .coffee extension instead of .js.coffee
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2014-10-13 02:58:45.000000000 +0200
+++ new/Gemfile 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-source "https://rubygems.org"
-
-# Specify your gem's dependencies in coffee-rails.gemspec
-gemspec
-
-gem "rails", github: "rails/rails"
-
-platforms :rbx do
- gem "rubysl", "~> 2.0"
- gem "racc", "~> 1.4"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2014-10-13 02:58:45.000000000 +0200
+++ new/README.md 2015-12-18 19:40:30.000000000 +0100
@@ -1,25 +1,21 @@
# Coffee-Rails
-CoffeeScript adapter for the Rails asset pipeline. Also adds support to use CoffeeScript to respond to JavaScript requests (use .js.coffee views).
+CoffeeScript adapter for the Rails asset pipeline. Also adds support to use CoffeeScript to respond to JavaScript requests (use `.coffee` views).
## Installation
Since Rails 3.1 Coffee-Rails is included in the default Gemfile when you create a new application. If you are upgrading to Rails 3.1 you must add the coffee-rails to your Gemfile:
- gem 'coffee-rails'
-
-If you are precompiling your assets (with rake assets:precompile) before run your application in production, you might want add it to the assets group to prevent the gem being required in the production environment. _Note that this may prevent you from using Coffeescript for UJS responses_.
-
- group :assets do
- gem 'coffee-rails'
- end
+~~~ruby
+gem 'coffee-rails'
+~~~
## Running tests
$ bundle install
$ bundle exec rake test
-If you need to test against local gems, use Bundler's gem :path option in the Gemfile.
+If you need to test against local gems, use Bundler's gem `:path` option in the Gemfile.
## Code Status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2014-10-13 02:58:45.000000000 +0200
+++ new/Rakefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-require 'bundler'
-Bundler::GemHelper.install_tasks
-
-require 'rake/testtask'
-
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.libs << 'test'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = false
-end
-
-task default: :test
-
-specname = "coffee-rails.gemspec"
-deps = `git ls-files`.split("\n") - [specname]
-
-file specname => deps do
- files = `git ls-files`.split("\n")
- test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
-
- require 'erb'
-
- File.open specname, 'w:utf-8' do |f|
- f.write ERB.new(File.read("#{specname}.erb")).result(binding)
- end
-end
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coffee-rails.gemspec new/coffee-rails.gemspec
--- old/coffee-rails.gemspec 2014-10-13 02:58:45.000000000 +0200
+++ new/coffee-rails.gemspec 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-$:.push File.expand_path("../lib", __FILE__)
-require "coffee/rails/version"
-
-Gem::Specification.new do |s|
- s.name = "coffee-rails"
- s.version = Coffee::Rails::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["Santiago Pastorino"]
- s.email = ["santiago(a)wyeworks.com"]
- s.homepage = "https://github.com/rails/coffee-rails"
- s.summary = %q{CoffeeScript adapter for the Rails asset pipeline.}
- s.description = %q{CoffeeScript adapter for the Rails asset pipeline.}
-
- s.rubyforge_project = "coffee-rails"
-
- s.add_runtime_dependency 'coffee-script', '>= 2.2.0'
- s.add_runtime_dependency 'railties', '>= 4.0.0', '< 5.0'
-
- s.files = [".gitignore",".travis.yml","CHANGELOG.md","Gemfile","MIT-LICENSE","README.md","Rakefile","coffee-rails.gemspec","coffee-rails.gemspec.erb","gemfiles/Gemfile-4-0-stable","gemfiles/Gemfile-4-1-stable","lib/assets/javascripts/coffee-script.js.erb","lib/coffee-rails.rb","lib/coffee/rails/engine.rb","lib/coffee/rails/template_handler.rb","lib/coffee/rails/version.rb","lib/rails/generators/coffee/assets/assets_generator.rb","lib/rails/generators/coffee/assets/templates/javascript.coffee","test/assets_generator_test.rb","test/assets_test.rb","test/controller_generator_test.rb","test/scaffold_generator_test.rb","test/support/routes.rb","test/support/site/index.coffee","test/template_handler_test.rb","test/test_helper.rb"]
- s.test_files = ["test/assets_generator_test.rb","test/assets_test.rb","test/controller_generator_test.rb","test/scaffold_generator_test.rb","test/support/routes.rb","test/support/site/index.coffee","test/template_handler_test.rb","test/test_helper.rb"]
- s.executables = []
- s.require_paths = ["lib"]
- s.license = "MIT"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coffee-rails.gemspec.erb new/coffee-rails.gemspec.erb
--- old/coffee-rails.gemspec.erb 2014-10-13 02:58:45.000000000 +0200
+++ new/coffee-rails.gemspec.erb 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-$:.push File.expand_path("../lib", __FILE__)
-require "coffee/rails/version"
-
-Gem::Specification.new do |s|
- s.name = "coffee-rails"
- s.version = Coffee::Rails::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["Santiago Pastorino"]
- s.email = ["santiago(a)wyeworks.com"]
- s.homepage = "https://github.com/rails/coffee-rails"
- s.summary = %q{CoffeeScript adapter for the Rails asset pipeline.}
- s.description = %q{CoffeeScript adapter for the Rails asset pipeline.}
-
- s.rubyforge_project = "coffee-rails"
-
- s.add_runtime_dependency 'coffee-script', '>= 2.2.0'
- s.add_runtime_dependency 'railties', '>= 4.0.0', '< 5.0'
-
- s.files = [<%= files.map(&:inspect).join ',' %>]
- s.test_files = [<%= test_files.map(&:inspect).join ',' %>]
- s.executables = [<%= executables.map(&:inspect).join ',' %>]
- s.require_paths = ["lib"]
- s.license = "MIT"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/Gemfile-4-0-stable new/gemfiles/Gemfile-4-0-stable
--- old/gemfiles/Gemfile-4-0-stable 2014-10-13 02:58:45.000000000 +0200
+++ new/gemfiles/Gemfile-4-0-stable 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-source 'https://rubygems.org'
-
-gemspec path: '..'
-
-gem 'rails', github: 'rails/rails', branch: '4-0-stable'
-
-platforms :rbx do
- gem "rubysl", "~> 2.0"
- gem "racc", "~> 1.4"
- gem "json"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/Gemfile-4-1-stable new/gemfiles/Gemfile-4-1-stable
--- old/gemfiles/Gemfile-4-1-stable 2014-10-13 02:58:45.000000000 +0200
+++ new/gemfiles/Gemfile-4-1-stable 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-source 'https://rubygems.org'
-
-gemspec path: '..'
-
-gem 'rails', github: 'rails/rails', branch: '4-1-stable'
-
-platforms :rbx do
- gem "rubysl", "~> 2.0"
- gem "racc", "~> 1.4"
- gem "json"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/coffee/rails/version.rb new/lib/coffee/rails/version.rb
--- old/lib/coffee/rails/version.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/lib/coffee/rails/version.rb 2015-12-18 19:40:30.000000000 +0100
@@ -1,5 +1,5 @@
module Coffee
module Rails
- VERSION = "4.1.0"
+ VERSION = "4.1.1"
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2014-10-13 02:58:45.000000000 +0200
+++ new/metadata 2015-12-18 19:40:30.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: coffee-rails
version: !ruby/object:Gem::Version
- version: 4.1.0
+ version: 4.1.1
platform: ruby
authors:
- Santiago Pastorino
autorequire:
bindir: bin
cert_chain: []
-date: 2014-10-13 00:00:00.000000000 Z
+date: 2015-12-18 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: coffee-script
@@ -33,7 +33,7 @@
version: 4.0.0
- - "<"
- !ruby/object:Gem::Version
- version: '5.0'
+ version: 5.1.x
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@
version: 4.0.0
- - "<"
- !ruby/object:Gem::Version
- version: '5.0'
+ version: 5.1.x
description: CoffeeScript adapter for the Rails asset pipeline.
email:
- santiago(a)wyeworks.com
@@ -51,17 +51,9 @@
extensions: []
extra_rdoc_files: []
files:
-- ".gitignore"
-- ".travis.yml"
- CHANGELOG.md
-- Gemfile
- MIT-LICENSE
- README.md
-- Rakefile
-- coffee-rails.gemspec
-- coffee-rails.gemspec.erb
-- gemfiles/Gemfile-4-0-stable
-- gemfiles/Gemfile-4-1-stable
- lib/assets/javascripts/coffee-script.js.erb
- lib/coffee-rails.rb
- lib/coffee/rails/engine.rb
@@ -69,14 +61,6 @@
- lib/coffee/rails/version.rb
- lib/rails/generators/coffee/assets/assets_generator.rb
- lib/rails/generators/coffee/assets/templates/javascript.coffee
-- test/assets_generator_test.rb
-- test/assets_test.rb
-- test/controller_generator_test.rb
-- test/scaffold_generator_test.rb
-- test/support/routes.rb
-- test/support/site/index.coffee
-- test/template_handler_test.rb
-- test/test_helper.rb
homepage: https://github.com/rails/coffee-rails
licenses:
- MIT
@@ -97,16 +81,8 @@
version: '0'
requirements: []
rubyforge_project: coffee-rails
-rubygems_version: 2.4.1
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: CoffeeScript adapter for the Rails asset pipeline.
-test_files:
-- test/assets_generator_test.rb
-- test/assets_test.rb
-- test/controller_generator_test.rb
-- test/scaffold_generator_test.rb
-- test/support/routes.rb
-- test/support/site/index.coffee
-- test/template_handler_test.rb
-- test/test_helper.rb
+test_files: []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/assets_generator_test.rb new/test/assets_generator_test.rb
--- old/test/assets_generator_test.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/assets_generator_test.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-require 'test_helper'
-require 'rails/generators/coffee/assets/assets_generator'
-
-class AssetGeneratorTest < Rails::Generators::TestCase
- tests Coffee::Generators::AssetsGenerator
-
- destination File.expand_path("../tmp", __FILE__)
- setup :prepare_destination
-
- def test_assets
- run_generator %w(posts)
- assert_no_file "app/assets/javascripts/posts.js"
- assert_file "app/assets/javascripts/posts.coffee"
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/assets_test.rb new/test/assets_test.rb
--- old/test/assets_test.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/assets_test.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-require 'test_helper'
-require 'coffee-rails'
-
-class AssetsTest < ActiveSupport::TestCase
- def setup
- require "rails"
- require "action_controller/railtie"
- require "sprockets/railtie"
-
- @app = Class.new(Rails::Application)
- @app.config.eager_load = false
- @app.config.active_support.deprecation = :stderr
- @app.config.assets.enabled = true
- @app.config.assets.cache_store = [ :file_store, "#{tmp_path}/cache" ]
- @app.paths["log"] = "#{tmp_path}/log/test.log"
- @app.initialize!
- end
-
- def teardown
- FileUtils.rm_rf "#{tmp_path}/cache"
- FileUtils.rm_rf "#{tmp_path}/log"
- File.delete "#{tmp_path}/coffee-script.js"
- end
-
- test "coffee-script.js is included in Sprockets environment" do
- @app.assets["coffee-script"].write_to("#{tmp_path}/coffee-script.js")
-
- assert_match "/lib/assets/javascripts/coffee-script.js.erb", @app.assets["coffee-script"].pathname.to_s
- assert_match "CoffeeScript Compiler", File.open("#{tmp_path}/coffee-script.js").read
- end
-
- def tmp_path
- "#{File.dirname(__FILE__)}/tmp"
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/controller_generator_test.rb new/test/controller_generator_test.rb
--- old/test/controller_generator_test.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/controller_generator_test.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-require 'test_helper'
-require 'rails/generators/rails/controller/controller_generator'
-require 'rails/generators/coffee/assets/assets_generator'
-
-class ControllerGeneratorTest < Rails::Generators::TestCase
- tests Rails::Generators::ControllerGenerator
-
- destination File.expand_path("../tmp", __FILE__)
- setup do
- prepare_destination
- copy_routes
- end
-
- def test_assets
- run_generator %w(posts --javascript-engine=coffee --orm=false)
- assert_no_file "app/assets/javascripts/posts.js"
- assert_file "app/assets/javascripts/posts.coffee"
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/scaffold_generator_test.rb new/test/scaffold_generator_test.rb
--- old/test/scaffold_generator_test.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/scaffold_generator_test.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-require 'test_helper'
-require 'rails/generators/rails/scaffold/scaffold_generator'
-require 'rails/generators/coffee/assets/assets_generator'
-
-class ScaffoldGeneratorTest < Rails::Generators::TestCase
- tests Rails::Generators::ScaffoldGenerator
-
- destination File.expand_path("../tmp", __FILE__)
- setup do
- prepare_destination
- copy_routes
- end
-
- def test_assets
- run_generator %w(posts --javascript-engine=coffee --orm=false)
- assert_no_file "app/assets/javascripts/posts.js"
- assert_file "app/assets/javascripts/posts.coffee"
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/support/routes.rb new/test/support/routes.rb
--- old/test/support/routes.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/support/routes.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-# routes dummy file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/support/site/index.coffee new/test/support/site/index.coffee
--- old/test/support/site/index.coffee 2014-10-13 02:58:45.000000000 +0200
+++ new/test/support/site/index.coffee 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-alert 'hello world'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/template_handler_test.rb new/test/template_handler_test.rb
--- old/test/template_handler_test.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/template_handler_test.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-require 'test_helper'
-require 'action_controller'
-require 'coffee-rails'
-
-class SiteController < ActionController::Base
- self.view_paths = File.expand_path("../support", __FILE__)
-end
-
-DummyApp = ActionDispatch::Routing::RouteSet.new
-DummyApp.draw do
- get "site/index"
-end
-
-class TemplateHandlerTest < ActiveSupport::TestCase
- include Rack::Test::Methods
-
- def app
- @app ||= DummyApp
- end
-
- test "coffee views are served as javascript" do
- get "/site/index.js"
-
- assert_match "alert('hello world');\n", last_response.body
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_helper.rb new/test/test_helper.rb
--- old/test/test_helper.rb 2014-10-13 02:58:45.000000000 +0200
+++ new/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-# Configure Rails Envinronment
-ENV["RAILS_ENV"] = "test"
-
-require 'bundler/setup'
-require 'rails'
-require "rails/test_help"
-
-# For generators
-require 'rails/generators/test_case'
-
-def copy_routes
- routes = File.expand_path("../support/routes.rb", __FILE__)
- destination = File.join(destination_root, "config")
-
- FileUtils.mkdir_p(destination)
- FileUtils.cp routes, destination
-end
1
0
Hello community,
here is the log from the commit of package rubygem-arel for openSUSE:Factory checked in at 2016-04-28 16:52:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-arel (Old)
and /work/SRC/openSUSE:Factory/.rubygem-arel.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-arel"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-arel/rubygem-arel.changes 2015-08-05 19:14:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-arel.new/rubygem-arel.changes 2016-04-28 16:52:58.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Dec 18 05:28:53 UTC 2015 - coolo(a)suse.com
+
+- updated to version 7.0.0
+ see installed History.txt
+
+-------------------------------------------------------------------
Old:
----
arel-6.0.3.gem
New:
----
arel-7.0.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-arel.spec ++++++
--- /var/tmp/diff_new_pack.tz029K/_old 2016-04-28 16:52:59.000000000 +0200
+++ /var/tmp/diff_new_pack.tz029K/_new 2016-04-28 16:52:59.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-arel
-Version: 6.0.3
+Version: 7.0.0
Release: 0
%define mod_name arel
%define mod_full_name %{mod_name}-%{version}
++++++ arel-6.0.3.gem -> arel-7.0.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.txt new/History.txt
--- old/History.txt 2015-08-04 23:28:25.000000000 +0200
+++ new/History.txt 2015-12-17 21:03:56.000000000 +0100
@@ -1,20 +1,10 @@
-=== 6.0.3 / 2015-08-04
+=== 7.0.0 / 2015-12-17
-* Bug fixes
+* Enhancements
- * Fix quoting LIMIT values on Oracle visitor.
-
-=== 6.0.2 / 2015-07-11
-
-* Bug fixes
-
- * Fix file permission problem on the gem package
-
-=== 6.0.1 / 2015-07-10
-
-* Bug fixes
-
- * Stop quoting LIMIT values.
+ * Remove deprecated method `Table#primary_key`
+ * Remove engine from the constructor arguments `Arel::Table`
+ * Deprecate automatic type casting within Arel
=== 6.0.0 / 2014-11-25
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE.txt new/MIT-LICENSE.txt
--- old/MIT-LICENSE.txt 2015-08-04 23:28:25.000000000 +0200
+++ new/MIT-LICENSE.txt 2015-12-17 21:03:56.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2007-2010 Nick Kallen, Bryan Helmkamp, Emilio Tagua, Aaron Patterson
+Copyright (c) 2007-2015 Nick Kallen, Bryan Helmkamp, Emilio Tagua, Aaron Patterson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -18,3 +18,4 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.markdown new/README.markdown
--- old/README.markdown 2015-08-04 23:28:25.000000000 +0200
+++ new/README.markdown 2015-12-17 21:03:56.000000000 +0100
@@ -1,4 +1,4 @@
-# Arel [![Build Status](https://secure.travis-ci.org/rails/arel.svg?branch=master)](http://… [![Dependency Status](https://gemnasium.com/rails/arel.svg)](https://gemnasium.com/rails/…
+# Arel
* http://github.com/rails/arel
@@ -222,6 +222,12 @@
FROM "photos"
```
-### License
+## Contributing to Arel
-Arel is released under the [MIT License](http://opensource.org/licenses/MIT).
+Arel is work of many contributors. You're encouraged to submit pull requests, propose
+features and discuss issues.
+
+See [CONTRIBUTING](CONTRIBUTING.md).
+
+## License
+Arel is released under the [MIT License](http://www.opensource.org/licenses/MIT).
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/attributes/attribute.rb new/lib/arel/attributes/attribute.rb
--- old/lib/arel/attributes/attribute.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/attributes/attribute.rb 2015-12-17 21:03:56.000000000 +0100
@@ -12,6 +12,14 @@
def lower
relation.lower self
end
+
+ def type_cast_for_database(value)
+ relation.type_cast_for_database(name, value)
+ end
+
+ def able_to_type_cast?
+ relation.able_to_type_cast?
+ end
end
class String < Attribute; end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/crud.rb new/lib/arel/crud.rb
--- old/lib/arel/crud.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/crud.rb 2015-12-17 21:03:56.000000000 +0100
@@ -3,7 +3,7 @@
# FIXME hopefully we can remove this
module Crud
def compile_update values, pk
- um = UpdateManager.new @engine
+ um = UpdateManager.new
if Nodes::SqlLiteral === values
relation = @ctx.from
@@ -26,11 +26,12 @@
end
def create_insert
- InsertManager.new @engine
+ InsertManager.new
end
def compile_delete
- dm = DeleteManager.new @engine
+ dm = DeleteManager.new
+ dm.take @ast.limit.expr if @ast.limit
dm.wheres = @ctx.wheres
dm.from @ctx.froms
dm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/delete_manager.rb new/lib/arel/delete_manager.rb
--- old/lib/arel/delete_manager.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/delete_manager.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,6 +1,6 @@
module Arel
class DeleteManager < Arel::TreeManager
- def initialize engine
+ def initialize
super
@ast = Nodes::DeleteStatement.new
@ctx = @ast
@@ -11,6 +11,11 @@
self
end
+ def take limit
+ @ast.limit = Nodes::Limit.new(Nodes.build_quoted(limit)) if limit
+ self
+ end
+
def wheres= list
@ast.wheres = list
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/insert_manager.rb new/lib/arel/insert_manager.rb
--- old/lib/arel/insert_manager.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/insert_manager.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,6 +1,6 @@
module Arel
class InsertManager < Arel::TreeManager
- def initialize engine
+ def initialize
super
@ast = Nodes::InsertStatement.new
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/binary.rb new/lib/arel/nodes/binary.rb
--- old/lib/arel/nodes/binary.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/binary.rb 2015-12-17 21:03:57.000000000 +0100
@@ -38,9 +38,7 @@
LessThanOrEqual
NotEqual
NotIn
- NotRegexp
Or
- Regexp
Union
UnionAll
Intersect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/bind_param.rb new/lib/arel/nodes/bind_param.rb
--- old/lib/arel/nodes/bind_param.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/bind_param.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,6 +1,9 @@
module Arel
module Nodes
class BindParam < Node
+ def ==(other)
+ other.is_a?(BindParam)
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/casted.rb new/lib/arel/nodes/casted.rb
--- old/lib/arel/nodes/casted.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/arel/nodes/casted.rb 2015-12-17 21:03:57.000000000 +0100
@@ -0,0 +1,40 @@
+module Arel
+ module Nodes
+ class Casted < Arel::Nodes::Node # :nodoc:
+ attr_reader :val, :attribute
+ def initialize val, attribute
+ @val = val
+ @attribute = attribute
+ super()
+ end
+
+ def nil?; @val.nil?; end
+
+ def eql? other
+ self.class == other.class &&
+ self.val == other.val &&
+ self.attribute == other.attribute
+ end
+ alias :== :eql?
+ end
+
+ class Quoted < Arel::Nodes::Unary # :nodoc:
+ alias :val :value
+ def nil?; val.nil?; end
+ end
+
+ def self.build_quoted other, attribute = nil
+ case other
+ when Arel::Nodes::Node, Arel::Attributes::Attribute, Arel::Table, Arel::Nodes::BindParam, Arel::SelectManager, Arel::Nodes::Quoted
+ other
+ else
+ case attribute
+ when Arel::Attributes::Attribute
+ Casted.new other, attribute
+ else
+ Quoted.new other
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/delete_statement.rb new/lib/arel/nodes/delete_statement.rb
--- old/lib/arel/nodes/delete_statement.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/delete_statement.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,6 +1,8 @@
module Arel
module Nodes
class DeleteStatement < Arel::Nodes::Binary
+ attr_accessor :limit
+
alias :relation :left
alias :relation= :left=
alias :wheres :right
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/function.rb new/lib/arel/nodes/function.rb
--- old/lib/arel/nodes/function.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/function.rb 2015-12-17 21:03:57.000000000 +0100
@@ -3,6 +3,7 @@
class Function < Arel::Nodes::Node
include Arel::Predications
include Arel::WindowPredications
+ include Arel::OrderPredications
attr_accessor :expressions, :alias, :distinct
def initialize expr, aliaz = nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/matches.rb new/lib/arel/nodes/matches.rb
--- old/lib/arel/nodes/matches.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/matches.rb 2015-12-17 21:03:57.000000000 +0100
@@ -2,10 +2,12 @@
module Nodes
class Matches < Binary
attr_reader :escape
+ attr_accessor :case_sensitive
- def initialize(left, right, escape = nil)
+ def initialize(left, right, escape = nil, case_sensitive = false)
super(left, right)
@escape = escape && Nodes.build_quoted(escape)
+ @case_sensitive = case_sensitive
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/regexp.rb new/lib/arel/nodes/regexp.rb
--- old/lib/arel/nodes/regexp.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/arel/nodes/regexp.rb 2015-12-17 21:03:57.000000000 +0100
@@ -0,0 +1,14 @@
+module Arel
+ module Nodes
+ class Regexp < Binary
+ attr_accessor :case_sensitive
+
+ def initialize(left, right, case_sensitive = true)
+ super(left, right)
+ @case_sensitive = case_sensitive
+ end
+ end
+
+ class NotRegexp < Regexp; end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/select_core.rb new/lib/arel/nodes/select_core.rb
--- old/lib/arel/nodes/select_core.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/select_core.rb 2015-12-17 21:03:57.000000000 +0100
@@ -2,7 +2,7 @@
module Nodes
class SelectCore < Arel::Nodes::Node
attr_accessor :top, :projections, :wheres, :groups, :windows
- attr_accessor :having, :source, :set_quantifier
+ attr_accessor :havings, :source, :set_quantifier
def initialize
super()
@@ -14,7 +14,7 @@
@projections = []
@wheres = []
@groups = []
- @having = nil
+ @havings = []
@windows = []
end
@@ -35,14 +35,14 @@
@projections = @projections.clone
@wheres = @wheres.clone
@groups = @groups.clone
- @having = @having.clone if @having
+ @havings = @havings.clone
@windows = @windows.clone
end
def hash
[
@source, @top, @set_quantifier, @projections,
- @wheres, @groups, @having, @windows
+ @wheres, @groups, @havings, @windows
].hash
end
@@ -54,7 +54,7 @@
self.projections == other.projections &&
self.wheres == other.wheres &&
self.groups == other.groups &&
- self.having == other.having &&
+ self.havings == other.havings &&
self.windows == other.windows
end
alias :== :eql?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/table_alias.rb new/lib/arel/nodes/table_alias.rb
--- old/lib/arel/nodes/table_alias.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/table_alias.rb 2015-12-17 21:03:57.000000000 +0100
@@ -13,8 +13,12 @@
relation.respond_to?(:name) ? relation.name : name
end
- def engine
- relation.engine
+ def type_cast_for_database(*args)
+ relation.type_cast_for_database(*args)
+ end
+
+ def able_to_type_cast?
+ relation.respond_to?(:able_to_type_cast?) && relation.able_to_type_cast?
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes/unary.rb new/lib/arel/nodes/unary.rb
--- old/lib/arel/nodes/unary.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes/unary.rb 2015-12-17 21:03:57.000000000 +0100
@@ -23,7 +23,6 @@
%w{
Bin
Group
- Having
Limit
Not
Offset
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/nodes.rb new/lib/arel/nodes.rb
--- old/lib/arel/nodes.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/nodes.rb 2015-12-17 21:03:57.000000000 +0100
@@ -30,6 +30,7 @@
require 'arel/nodes/infix_operation'
require 'arel/nodes/over'
require 'arel/nodes/matches'
+require 'arel/nodes/regexp'
# nary
require 'arel/nodes/and'
@@ -55,41 +56,4 @@
require 'arel/nodes/sql_literal'
-module Arel
- module Nodes
- class Casted < Arel::Nodes::Node # :nodoc:
- attr_reader :val, :attribute
- def initialize val, attribute
- @val = val
- @attribute = attribute
- super()
- end
-
- def nil?; @val.nil?; end
-
- def eql? other
- self.class == other.class &&
- self.val == other.val &&
- self.attribute == other.attribute
- end
- alias :== :eql?
- end
-
- class Quoted < Arel::Nodes::Unary # :nodoc:
- end
-
- def self.build_quoted other, attribute = nil
- case other
- when Arel::Nodes::Node, Arel::Attributes::Attribute, Arel::Table, Arel::Nodes::BindParam, Arel::SelectManager
- other
- else
- case attribute
- when Arel::Attributes::Attribute
- Casted.new other, attribute
- else
- Quoted.new other
- end
- end
- end
- end
-end
+require 'arel/nodes/casted'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/predications.rb new/lib/arel/predications.rb
--- old/lib/arel/predications.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/predications.rb 2015-12-17 21:03:57.000000000 +0100
@@ -25,15 +25,15 @@
end
def between other
- if other.begin == -Float::INFINITY
- if other.end == Float::INFINITY
+ if equals_quoted?(other.begin, -Float::INFINITY)
+ if equals_quoted?(other.end, Float::INFINITY)
not_in([])
elsif other.exclude_end?
lt(other.end)
else
lteq(other.end)
end
- elsif other.end == Float::INFINITY
+ elsif equals_quoted?(other.end, Float::INFINITY)
gteq(other.begin)
elsif other.exclude_end?
gteq(other.begin).and(lt(other.end))
@@ -71,15 +71,15 @@
end
def not_between other
- if other.begin == -Float::INFINITY # The range begins with negative infinity
- if other.end == Float::INFINITY
+ if equals_quoted?(other.begin, -Float::INFINITY)
+ if equals_quoted?(other.end, Float::INFINITY)
self.in([])
elsif other.exclude_end?
gteq(other.end)
else
gt(other.end)
end
- elsif other.end == Float::INFINITY
+ elsif equals_quoted?(other.end, Float::INFINITY)
lt(other.begin)
else
left = lt(other.begin)
@@ -118,20 +118,28 @@
grouping_all :not_in, others
end
- def matches other, escape = nil
- Nodes::Matches.new self, quoted_node(other), escape
+ def matches other, escape = nil, case_sensitive = false
+ Nodes::Matches.new self, quoted_node(other), escape, case_sensitive
end
- def matches_any others, escape = nil
- grouping_any :matches, others, escape
+ def matches_regexp other, case_sensitive = true
+ Nodes::Regexp.new self, quoted_node(other), case_sensitive
end
- def matches_all others, escape = nil
- grouping_all :matches, others, escape
+ def matches_any others, escape = nil, case_sensitive = false
+ grouping_any :matches, others, escape, case_sensitive
end
- def does_not_match other, escape = nil
- Nodes::DoesNotMatch.new self, quoted_node(other), escape
+ def matches_all others, escape = nil, case_sensitive = false
+ grouping_all :matches, others, escape, case_sensitive
+ end
+
+ def does_not_match other, escape = nil, case_sensitive = false
+ Nodes::DoesNotMatch.new self, quoted_node(other), escape, case_sensitive
+ end
+
+ def does_not_match_regexp other, case_sensitive = true
+ Nodes::NotRegexp.new self, quoted_node(other), case_sensitive
end
def does_not_match_any others, escape = nil
@@ -211,5 +219,13 @@
def quoted_array(others)
others.map { |v| quoted_node(v) }
end
+
+ def equals_quoted?(maybe_quoted, value)
+ if maybe_quoted.is_a?(Nodes::Quoted)
+ maybe_quoted.val == value
+ else
+ maybe_quoted == value
+ end
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/select_manager.rb new/lib/arel/select_manager.rb
--- old/lib/arel/select_manager.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/select_manager.rb 2015-12-17 21:03:57.000000000 +0100
@@ -6,8 +6,8 @@
STRING_OR_SYMBOL_CLASS = [Symbol, String]
- def initialize engine, table = nil
- super(engine)
+ def initialize table = nil
+ super()
@ast = Nodes::SelectStatement.new
@ctx = @ast.cores.last
from table
@@ -118,8 +118,8 @@
join(relation, Nodes::OuterJoin)
end
- def having *exprs
- @ctx.having = Nodes::Having.new(collapse(exprs, @ctx.having))
+ def having expr
+ @ctx.havings << expr
self
end
@@ -176,10 +176,10 @@
@ast.orders
end
- def where_sql
+ def where_sql engine = Table.engine
return if @ctx.wheres.empty?
- viz = Visitors::WhereSql.new @engine.connection
+ viz = Visitors::WhereSql.new(engine.connection.visitor, engine.connection)
Nodes::SqlLiteral.new viz.accept(@ctx, Collectors::SQLString.new).value
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/table.rb new/lib/arel/table.rb
--- old/lib/arel/table.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/table.rb 2015-12-17 21:03:57.000000000 +0100
@@ -6,40 +6,24 @@
@engine = nil
class << self; attr_accessor :engine; end
- attr_accessor :name, :engine, :aliases, :table_alias
+ attr_accessor :name, :aliases, :table_alias
# TableAlias and Table both have a #table_name which is the name of the underlying table
alias :table_name :name
- def initialize name, engine = Table.engine
+ def initialize(name, as: nil, type_caster: nil)
@name = name.to_s
- @engine = engine
@columns = nil
@aliases = []
- @table_alias = nil
- @primary_key = nil
+ @type_caster = type_caster
- if Hash === engine
- @engine = engine[:engine] || Table.engine
-
- # Sometime AR sends an :as parameter to table, to let the table know
- # that it is an Alias. We may want to override new, and return a
- # TableAlias node?
- @table_alias = engine[:as] unless engine[:as].to_s == @name
- end
- end
-
- def primary_key
- if $VERBOSE
- warn <<-eowarn
-primary_key (#{caller.first}) is deprecated and will be removed in Arel 4.0.0
- eowarn
- end
- @primary_key ||= begin
- primary_key_name = @engine.connection.primary_key(name)
- # some tables might be without primary key
- primary_key_name && self[primary_key_name]
+ # Sometime AR sends an :as parameter to table, to let the table know
+ # that it is an Alias. We may want to override new, and return a
+ # TableAlias node?
+ if as.to_s == @name
+ as = nil
end
+ @table_alias = as
end
def alias name = "#{self.name}_2"
@@ -48,12 +32,12 @@
end
end
- def from table
- SelectManager.new(@engine, table)
+ def from
+ SelectManager.new(self)
end
def join relation, klass = Nodes::InnerJoin
- return from(self) unless relation
+ return from unless relation
case relation
when String, Nodes::SqlLiteral
@@ -61,7 +45,7 @@
klass = Nodes::StringJoin
end
- from(self).join(relation, klass)
+ from.join(relation, klass)
end
def outer_join relation
@@ -69,55 +53,39 @@
end
def group *columns
- from(self).group(*columns)
+ from.group(*columns)
end
def order *expr
- from(self).order(*expr)
+ from.order(*expr)
end
def where condition
- from(self).where condition
+ from.where condition
end
def project *things
- from(self).project(*things)
+ from.project(*things)
end
def take amount
- from(self).take amount
+ from.take amount
end
def skip amount
- from(self).skip amount
+ from.skip amount
end
def having expr
- from(self).having expr
+ from.having expr
end
def [] name
::Arel::Attribute.new self, name
end
- def select_manager
- SelectManager.new(@engine)
- end
-
- def insert_manager
- InsertManager.new(@engine)
- end
-
- def update_manager
- UpdateManager.new(@engine)
- end
-
- def delete_manager
- DeleteManager.new(@engine)
- end
-
def hash
- # Perf note: aliases, table alias and engine is excluded from the hash
+ # Perf note: aliases and table alias is excluded from the hash
# aliases can have a loop back to this table breaking hashes in parent
# relations, for the vast majority of cases @name is unique to a query
@name.hash
@@ -126,12 +94,23 @@
def eql? other
self.class == other.class &&
self.name == other.name &&
- self.engine == other.engine &&
self.aliases == other.aliases &&
self.table_alias == other.table_alias
end
alias :== :eql?
+ def type_cast_for_database(attribute_name, value)
+ type_caster.type_cast_for_database(attribute_name, value)
+ end
+
+ def able_to_type_cast?
+ !type_caster.nil?
+ end
+
+ protected
+
+ attr_reader :type_caster
+
private
def attributes_for columns
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/tree_manager.rb new/lib/arel/tree_manager.rb
--- old/lib/arel/tree_manager.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/tree_manager.rb 2015-12-17 21:03:57.000000000 +0100
@@ -8,8 +8,7 @@
attr_accessor :bind_values
- def initialize engine
- @engine = engine
+ def initialize
@ctx = nil
@bind_values = []
end
@@ -20,13 +19,9 @@
collector.value
end
- def visitor
- engine.connection.visitor
- end
-
- def to_sql
+ def to_sql engine = Table.engine
collector = Arel::Collectors::SQLString.new
- collector = visitor.accept @ast, collector
+ collector = engine.connection.visitor.accept @ast, collector
collector.value
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/update_manager.rb new/lib/arel/update_manager.rb
--- old/lib/arel/update_manager.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/update_manager.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,6 +1,6 @@
module Arel
class UpdateManager < Arel::TreeManager
- def initialize engine
+ def initialize
super
@ast = Nodes::UpdateStatement.new
@ctx = @ast
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/depth_first.rb new/lib/arel/visitors/depth_first.rb
--- old/lib/arel/visitors/depth_first.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/depth_first.rb 2015-12-17 21:03:57.000000000 +0100
@@ -146,7 +146,7 @@
visit o.wheres
visit o.groups
visit o.windows
- visit o.having
+ visit o.havings
end
def visit_Arel_Nodes_SelectStatement o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/informix.rb new/lib/arel/visitors/informix.rb
--- old/lib/arel/visitors/informix.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/informix.rb 2015-12-17 21:03:57.000000000 +0100
@@ -34,8 +34,13 @@
collector = inject_join o.groups, collector, ", "
end
- maybe_visit o.having, collector
+ if o.havings.any?
+ collector << " HAVING "
+ collector = inject_join o.havings, collector, " AND "
+ end
+ collector
end
+
def visit_Arel_Nodes_Offset o, collector
collector << "SKIP "
visit o.expr, collector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/mssql.rb new/lib/arel/visitors/mssql.rb
--- old/lib/arel/visitors/mssql.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/mssql.rb 2015-12-17 21:03:57.000000000 +0100
@@ -3,6 +3,11 @@
class MSSQL < Arel::Visitors::ToSql
RowNumber = Struct.new :children
+ def initialize(*)
+ @primary_keys = {}
+ super
+ end
+
private
# `top` wouldn't really work here. I.e. User.select("distinct first_name").limit(10) would generate
@@ -61,6 +66,23 @@
end
end
+ def visit_Arel_Nodes_DeleteStatement o, collector
+ collector << 'DELETE '
+ if o.limit
+ collector << 'TOP ('
+ visit o.limit.expr, collector
+ collector << ') '
+ end
+ collector << 'FROM '
+ collector = visit o.relation, collector
+ if o.wheres.any?
+ collector << ' WHERE '
+ inject_join o.wheres, collector, AND
+ else
+ collector
+ end
+ end
+
def determine_order_by orders, x
if orders.any?
orders
@@ -81,10 +103,20 @@
end
# FIXME raise exception of there is no pk?
- # FIXME!! Table.primary_key will be deprecated. What is the replacement??
def find_left_table_pk o
- return o.primary_key if o.instance_of? Arel::Table
- find_left_table_pk o.left if o.kind_of? Arel::Nodes::Join
+ if o.kind_of?(Arel::Nodes::Join)
+ find_left_table_pk(o.left)
+ elsif o.instance_of?(Arel::Table)
+ find_primary_key(o)
+ end
+ end
+
+ def find_primary_key(o)
+ @primary_keys[o.name] ||= begin
+ primary_key_name = @connection.primary_key(o.name)
+ # some tables might be without primary key
+ primary_key_name && o[primary_key_name]
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/oracle12.rb new/lib/arel/visitors/oracle12.rb
--- old/lib/arel/visitors/oracle12.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/arel/visitors/oracle12.rb 2015-12-17 21:03:57.000000000 +0100
@@ -0,0 +1,53 @@
+module Arel
+ module Visitors
+ class Oracle12 < Arel::Visitors::ToSql
+ private
+
+ def visit_Arel_Nodes_SelectStatement o, collector
+ # Oracle does not allow LIMIT clause with select for update
+ if o.limit && o.lock
+ o = o.dup
+ o.limit = []
+ end
+
+ super
+ end
+
+ def visit_Arel_Nodes_SelectOptions o, collector
+ collector = maybe_visit o.offset, collector
+ collector = maybe_visit o.limit, collector
+ collector = maybe_visit o.lock, collector
+ end
+
+ def visit_Arel_Nodes_Limit o, collector
+ collector << "FETCH FIRST "
+ collector = visit o.expr, collector
+ collector << " ROWS ONLY"
+ end
+
+ def visit_Arel_Nodes_Offset o, collector
+ collector << "OFFSET "
+ visit o.expr, collector
+ collector << " ROWS"
+ end
+
+ def visit_Arel_Nodes_Except o, collector
+ collector << "( "
+ collector = infix_value o, collector, " MINUS "
+ collector << " )"
+ end
+
+ def visit_Arel_Nodes_UpdateStatement o, collector
+ # Oracle does not allow ORDER BY/LIMIT in UPDATEs.
+ if o.orders.any? && o.limit.nil?
+ # However, there is no harm in silently eating the ORDER BY clause if no LIMIT has been provided,
+ # otherwise let the user deal with the error
+ o = o.dup
+ o.orders = []
+ end
+
+ super
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/postgresql.rb new/lib/arel/visitors/postgresql.rb
--- old/lib/arel/visitors/postgresql.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/postgresql.rb 2015-12-17 21:03:57.000000000 +0100
@@ -4,19 +4,35 @@
private
def visit_Arel_Nodes_Matches o, collector
- infix_value o, collector, ' ILIKE '
+ op = o.case_sensitive ? ' LIKE ' : ' ILIKE '
+ collector = infix_value o, collector, op
+ if o.escape
+ collector << ' ESCAPE '
+ visit o.escape, collector
+ else
+ collector
+ end
end
def visit_Arel_Nodes_DoesNotMatch o, collector
- infix_value o, collector, ' NOT ILIKE '
+ op = o.case_sensitive ? ' NOT LIKE ' : ' NOT ILIKE '
+ collector = infix_value o, collector, op
+ if o.escape
+ collector << ' ESCAPE '
+ visit o.escape, collector
+ else
+ collector
+ end
end
def visit_Arel_Nodes_Regexp o, collector
- infix_value o, collector, ' ~ '
+ op = o.case_sensitive ? ' ~ ' : ' ~* '
+ infix_value o, collector, op
end
def visit_Arel_Nodes_NotRegexp o, collector
- infix_value o, collector, ' !~ '
+ op = o.case_sensitive ? ' !~ ' : ' !~* '
+ infix_value o, collector, op
end
def visit_Arel_Nodes_DistinctOn o, collector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/to_sql.rb new/lib/arel/visitors/to_sql.rb
--- old/lib/arel/visitors/to_sql.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/to_sql.rb 2015-12-17 21:03:57.000000000 +0100
@@ -4,6 +4,12 @@
module Arel
module Visitors
+ class UnsupportedVisitError < StandardError
+ def initialize(object)
+ super "Unsupported argument type: #{object.class.name}. Construct an Arel node instead."
+ end
+ end
+
class ToSql < Arel::Visitors::Reduce
##
# This is some roflscale crazy stuff. I'm roflscaling this because
@@ -74,14 +80,14 @@
end
def visit_Arel_Nodes_DeleteStatement o, collector
- collector << "DELETE FROM "
+ collector << 'DELETE FROM '
collector = visit o.relation, collector
if o.wheres.any?
- collector << " WHERE "
- inject_join o.wheres, collector, AND
- else
- collector
+ collector << ' WHERE '
+ collector = inject_join o.wheres, collector, AND
end
+
+ maybe_visit o.limit, collector
end
# FIXME: we should probably have a 2-pass visitor for this
@@ -211,7 +217,6 @@
}
unless o.orders.empty?
- collector << SPACE
collector << ORDER_BY
len = o.orders.length - 1
o.orders.each_with_index { |x, i|
@@ -220,11 +225,15 @@
}
end
+ visit_Arel_Nodes_SelectOptions(o, collector)
+
+ collector
+ end
+
+ def visit_Arel_Nodes_SelectOptions o, collector
collector = maybe_visit o.limit, collector
collector = maybe_visit o.offset, collector
collector = maybe_visit o.lock, collector
-
- collector
end
def visit_Arel_Nodes_SelectCore o, collector
@@ -266,7 +275,10 @@
end
end
- collector = maybe_visit o.having, collector
+ unless o.havings.empty?
+ collector << " HAVING "
+ inject_join o.havings, collector, AND
+ end
unless o.windows.empty?
collector << WINDOW
@@ -405,11 +417,6 @@
end
end
- def visit_Arel_Nodes_Having o, collector
- collector << "HAVING "
- visit o.expr, collector
- end
-
def visit_Arel_Nodes_Offset o, collector
collector << "OFFSET "
visit o.expr, collector
@@ -728,11 +735,15 @@
alias :visit_Fixnum :literal
def quoted o, a
- quote(o, column_for(a))
+ if a && a.able_to_type_cast?
+ quote(a.type_cast_for_database(o))
+ else
+ quote(o, column_for(a))
+ end
end
def unsupported o, collector
- raise "unsupported: #{o.class.name}"
+ raise UnsupportedVisitError.new(o)
end
alias :visit_ActiveSupport_Multibyte_Chars :unsupported
@@ -768,6 +779,9 @@
def quote value, column = nil
return value if Arel::Nodes::SqlLiteral === value
+ if column
+ print_type_cast_deprecation
+ end
@connection.quote value, column
end
@@ -817,6 +831,20 @@
collector
end
end
+
+ def print_type_cast_deprecation
+ unless defined?($arel_silence_type_casting_deprecation) && $arel_silence_type_casting_deprecation
+ warn <<-eowarn
+Arel performing automatic type casting is deprecated, and will be removed in Arel 8.0. If you are seeing this, it is because you are manually passing a value to an Arel predicate, and the `Arel::Table` object was constructed manually. The easiest way to remove this warning is to use an `Arel::Table` object returned from calling `arel_table` on an ActiveRecord::Base subclass.
+
+If you're certain the value is already of the right type, change `attribute.eq(value)` to `attribute.eq(Arel::Nodes::Quoted.new(value))` (you will be able to remove that in Arel 8.0, it is only required to silence this deprecation warning).
+
+You can also silence this warning globally by setting `$arel_silence_type_casting_deprecation` to `true`. (Do NOT do this if you are a library author)
+
+If you are passing user input to a predicate, you must either give an appropriate type caster object to the `Arel::Table`, or manually cast the value before passing it to Arel.
+ eowarn
+ end
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors/where_sql.rb new/lib/arel/visitors/where_sql.rb
--- old/lib/arel/visitors/where_sql.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors/where_sql.rb 2015-12-17 21:03:57.000000000 +0100
@@ -1,11 +1,20 @@
module Arel
module Visitors
class WhereSql < Arel::Visitors::ToSql
+ def initialize(inner_visitor, *args, &block)
+ @inner_visitor = inner_visitor
+ super(*args, &block)
+ end
+
private
def visit_Arel_Nodes_SelectCore o, collector
collector << "WHERE "
- inject_join o.wheres, collector, ' AND '
+ wheres = o.wheres.map do |where|
+ Nodes::SqlLiteral.new(@inner_visitor.accept(where, collector.class.new).value)
+ end
+
+ inject_join wheres, collector, ' AND '
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel/visitors.rb new/lib/arel/visitors.rb
--- old/lib/arel/visitors.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel/visitors.rb 2015-12-17 21:03:57.000000000 +0100
@@ -6,6 +6,7 @@
require 'arel/visitors/mysql'
require 'arel/visitors/mssql'
require 'arel/visitors/oracle'
+require 'arel/visitors/oracle12'
require 'arel/visitors/where_sql'
require 'arel/visitors/dot'
require 'arel/visitors/ibm_db'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/arel.rb new/lib/arel.rb
--- old/lib/arel.rb 2015-08-04 23:28:25.000000000 +0200
+++ new/lib/arel.rb 2015-12-17 21:03:56.000000000 +0100
@@ -21,7 +21,7 @@
require 'arel/nodes'
module Arel
- VERSION = '6.0.3'
+ VERSION = '7.0.0'
def self.sql raw_sql
Arel::Nodes::SqlLiteral.new raw_sql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-08-04 23:28:25.000000000 +0200
+++ new/metadata 2015-12-17 21:03:56.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: arel
version: !ruby/object:Gem::Version
- version: 6.0.3
+ version: 7.0.0
platform: ruby
authors:
- Aaron Patterson
@@ -11,7 +11,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2015-08-04 00:00:00.000000000 Z
+date: 2015-12-17 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: minitest
@@ -41,6 +41,20 @@
- - "~>"
- !ruby/object:Gem::Version
version: '4.0'
+- !ruby/object:Gem::Dependency
+ name: rake
+ 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: |-
Arel Really Exasperates Logicians
@@ -85,6 +99,7 @@
- lib/arel/nodes/ascending.rb
- lib/arel/nodes/binary.rb
- lib/arel/nodes/bind_param.rb
+- lib/arel/nodes/casted.rb
- lib/arel/nodes/count.rb
- lib/arel/nodes/delete_statement.rb
- lib/arel/nodes/descending.rb
@@ -104,6 +119,7 @@
- lib/arel/nodes/node.rb
- lib/arel/nodes/outer_join.rb
- lib/arel/nodes/over.rb
+- lib/arel/nodes/regexp.rb
- lib/arel/nodes/right_outer_join.rb
- lib/arel/nodes/select_core.rb
- lib/arel/nodes/select_statement.rb
@@ -134,6 +150,7 @@
- lib/arel/visitors/mssql.rb
- lib/arel/visitors/mysql.rb
- lib/arel/visitors/oracle.rb
+- lib/arel/visitors/oracle12.rb
- lib/arel/visitors/postgresql.rb
- lib/arel/visitors/reduce.rb
- lib/arel/visitors/sqlite.rb
@@ -163,9 +180,8 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.4.7
+rubygems_version: 2.4.5.1
signing_key:
specification_version: 4
summary: Arel Really Exasperates Logicians Arel is a SQL AST manager for Ruby
test_files: []
-has_rdoc:
1
0
Hello community,
here is the log from the commit of package rubygem-gpgme for openSUSE:Factory checked in at 2016-04-28 16:52:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-gpgme (Old)
and /work/SRC/openSUSE:Factory/.rubygem-gpgme.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-gpgme"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-gpgme/rubygem-gpgme.changes 2015-12-24 12:16:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-gpgme.new/rubygem-gpgme.changes 2016-04-28 16:52:56.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Jan 20 05:43:28 UTC 2016 - coolo(a)suse.com
+
+- updated to version 2.0.12
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
gpgme-2.0.11.gem
New:
----
gpgme-2.0.12.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-gpgme.spec ++++++
--- /var/tmp/diff_new_pack.n4R1RT/_old 2016-04-28 16:52:57.000000000 +0200
+++ /var/tmp/diff_new_pack.n4R1RT/_new 2016-04-28 16:52:57.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-gpgme
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-gpgme
-Version: 2.0.11
+Version: 2.0.12
Release: 0
%define mod_name gpgme
%define mod_full_name %{mod_name}-%{version}
++++++ gpgme-2.0.11.gem -> gpgme-2.0.12.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/gpgme/extconf.rb new/ext/gpgme/extconf.rb
--- old/ext/gpgme/extconf.rb 2015-12-15 09:30:04.000000000 +0100
+++ new/ext/gpgme/extconf.rb 2016-01-19 06:48:40.000000000 +0100
@@ -60,7 +60,7 @@
EOS
require 'rubygems'
- require 'mini_portile'
+ require 'mini_portile2'
libgpg_error_recipe = MiniPortile.new('libgpg-error', '1.21').tap do |recipe|
recipe.target = File.join(ROOT, "ports")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/version.rb new/lib/gpgme/version.rb
--- old/lib/gpgme/version.rb 2015-12-15 09:30:04.000000000 +0100
+++ new/lib/gpgme/version.rb 2016-01-19 06:48:40.000000000 +0100
@@ -1,4 +1,4 @@
module GPGME
# The version of GPGME ruby binding you are using
- VERSION = "2.0.11"
+ VERSION = "2.0.12"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-12-15 09:30:04.000000000 +0100
+++ new/metadata 2016-01-19 06:48:40.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: gpgme
version: !ruby/object:Gem::Version
- version: 2.0.11
+ version: 2.0.12
platform: ruby
authors:
- Daiki Ueno
@@ -9,22 +9,22 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2015-12-15 00:00:00.000000000 Z
+date: 2016-01-19 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
- name: mini_portile
+ name: mini_portile2
requirement: !ruby/object:Gem::Requirement
requirements:
- - - ">="
+ - - "~>"
- !ruby/object:Gem::Version
- version: 0.5.0
+ version: 2.1.0
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - - ">="
+ - - "~>"
- !ruby/object:Gem::Version
- version: 0.5.0
+ version: 2.1.0
- !ruby/object:Gem::Dependency
name: mocha
requirement: !ruby/object:Gem::Requirement
1
0