Hello community,
here is the log from the commit of package rubygem-activejob-5.2 for
openSUSE:Factory checked in at 2019-01-21 10:26:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activejob-5.2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activejob-5.2.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activejob-5.2"
Mon Jan 21 10:26:58 2019 rev:4 rq:656399 version:5.2.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activejob-5.2/rubygem-activejob-5.2.changes
2018-12-06 12:17:57.817478144 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-activejob-5.2.new.28833/rubygem-activejob-5.2.changes
2019-01-21 10:27:03.981637770 +0100
@@ -1,0 +2,32 @@
+Sat Dec 8 16:14:30 UTC 2018 - Stephan Kulow <[email protected]>
+
+- updated to version 5.2.2
+ see installed CHANGELOG.md
+
+ ## Rails 5.2.2 (December 04, 2018) ##
+
+ * Make sure `assert_enqueued_with()` & `assert_performed_with()` work
reliably with hash arguments.
+
+ *Sharang Dashputre*
+
+ * Restore `ActionController::Parameters` support to
`ActiveJob::Arguments.serialize`.
+
+ *Bernie Chiu*
+
+ * Restore `HashWithIndifferentAccess` support to
`ActiveJob::Arguments.deserialize`.
+
+ *Gannon McGibbon*
+
+ * Include deserialized arguments in job instances returned from
+ `assert_enqueued_with` and `assert_performed_with`
+
+ *Alan Wu*
+
+ * Increment execution count before deserialize arguments.
+
+ Currently, the execution count increments after deserializes arguments.
+ Therefore, if an error occurs with deserialize, it retries indefinitely.
+
+ *Yuji Yaginuma*
+
+-------------------------------------------------------------------
Old:
----
activejob-5.2.1.1.gem
New:
----
activejob-5.2.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activejob-5.2.spec ++++++
--- /var/tmp/diff_new_pack.viuZwb/_old 2019-01-21 10:27:04.721636958 +0100
+++ /var/tmp/diff_new_pack.viuZwb/_new 2019-01-21 10:27:04.725636953 +0100
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -24,7 +24,7 @@
#
Name: rubygem-activejob-5.2
-Version: 5.2.1.1
+Version: 5.2.2
Release: 0
%define mod_name activejob
%define mod_full_name %{mod_name}-%{version}
@@ -36,9 +36,9 @@
%endif
# /MANUAL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 5
BuildRequires: %{ruby >= 2.2.2}
BuildRequires: %{rubygem gem2rpm}
+BuildRequires: ruby-macros >= 5
Url: http://rubyonrails.org
Source: https://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
++++++ activejob-5.2.1.1.gem -> activejob-5.2.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2018-11-27 21:12:22.000000000 +0100
+++ new/CHANGELOG.md 2018-12-04 19:12:08.000000000 +0100
@@ -1,3 +1,30 @@
+## Rails 5.2.2 (December 04, 2018) ##
+
+* Make sure `assert_enqueued_with()` & `assert_performed_with()` work
reliably with hash arguments.
+
+ *Sharang Dashputre*
+
+* Restore `ActionController::Parameters` support to
`ActiveJob::Arguments.serialize`.
+
+ *Bernie Chiu*
+
+* Restore `HashWithIndifferentAccess` support to
`ActiveJob::Arguments.deserialize`.
+
+ *Gannon McGibbon*
+
+* Include deserialized arguments in job instances returned from
+ `assert_enqueued_with` and `assert_performed_with`
+
+ *Alan Wu*
+
+* Increment execution count before deserialize arguments.
+
+ Currently, the execution count increments after deserializes arguments.
+ Therefore, if an error occurs with deserialize, it retries indefinitely.
+
+ *Yuji Yaginuma*
+
+
## Rails 5.2.1.1 (November 27, 2018) ##
* Do not deserialize GlobalID objects that were not generated by Active Job.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_job/arguments.rb
new/lib/active_job/arguments.rb
--- old/lib/active_job/arguments.rb 2018-11-27 21:12:22.000000000 +0100
+++ new/lib/active_job/arguments.rb 2018-12-04 19:12:08.000000000 +0100
@@ -61,14 +61,14 @@
when Array
argument.map { |arg| serialize_argument(arg) }
when ActiveSupport::HashWithIndifferentAccess
- result = serialize_hash(argument)
- result[WITH_INDIFFERENT_ACCESS_KEY] = serialize_argument(true)
- result
+ serialize_indifferent_hash(argument)
when Hash
symbol_keys = argument.each_key.grep(Symbol).map(&:to_s)
result = serialize_hash(argument)
result[SYMBOL_KEYS_KEY] = symbol_keys
result
+ when -> (arg) { arg.respond_to?(:permitted?) }
+ serialize_indifferent_hash(argument.to_h)
else
raise SerializationError.new("Unsupported argument type:
#{argument.class.name}")
end
@@ -136,8 +136,17 @@
end
end
+ def serialize_indifferent_hash(indifferent_hash)
+ result = serialize_hash(indifferent_hash)
+ result[WITH_INDIFFERENT_ACCESS_KEY] = serialize_argument(true)
+ result
+ end
+
def transform_symbol_keys(hash, symbol_keys)
- hash.transform_keys do |key|
+ # NOTE: HashWithIndifferentAccess#transform_keys always
+ # returns stringified keys with indifferent access
+ # so we call #to_h here to ensure keys are symbolized.
+ hash.to_h.transform_keys do |key|
if symbol_keys.include?(key)
key.to_sym
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_job/execution.rb
new/lib/active_job/execution.rb
--- old/lib/active_job/execution.rb 2018-11-27 21:12:22.000000000 +0100
+++ new/lib/active_job/execution.rb 2018-12-04 19:12:08.000000000 +0100
@@ -31,11 +31,11 @@
#
# MyJob.new(*args).perform_now
def perform_now
+ # Guard against jobs that were persisted before we started counting
executions by zeroing out nil counters
+ self.executions = (executions || 0) + 1
+
deserialize_arguments_if_needed
run_callbacks :perform do
- # Guard against jobs that were persisted before we started counting
executions by zeroing out nil counters
- self.executions = (executions || 0) + 1
-
perform(*arguments)
end
rescue => exception
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_job/gem_version.rb
new/lib/active_job/gem_version.rb
--- old/lib/active_job/gem_version.rb 2018-11-27 21:12:22.000000000 +0100
+++ new/lib/active_job/gem_version.rb 2018-12-04 19:12:08.000000000 +0100
@@ -9,8 +9,8 @@
module VERSION
MAJOR = 5
MINOR = 2
- TINY = 1
- PRE = "1"
+ TINY = 2
+ PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_job/test_helper.rb
new/lib/active_job/test_helper.rb
--- old/lib/active_job/test_helper.rb 2018-11-27 21:12:22.000000000 +0100
+++ new/lib/active_job/test_helper.rb 2018-12-04 19:12:08.000000000 +0100
@@ -300,11 +300,12 @@
def assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil)
original_enqueued_jobs_count = enqueued_jobs.count
expected = { job: job, args: args, at: at, queue: queue }.compact
- serialized_args = serialize_args_for_assertion(expected)
+ expected_args = prepare_args_for_assertion(expected)
yield
in_block_jobs = enqueued_jobs.drop(original_enqueued_jobs_count)
matching_job = in_block_jobs.find do |in_block_job|
- serialized_args.all? { |key, value| value == in_block_job[key] }
+ deserialized_job = deserialize_args_for_assertion(in_block_job)
+ expected_args.all? { |key, value| value == deserialized_job[key] }
end
assert matching_job, "No enqueued job found with #{expected}"
instantiate_job(matching_job)
@@ -324,11 +325,12 @@
def assert_performed_with(job: nil, args: nil, at: nil, queue: nil)
original_performed_jobs_count = performed_jobs.count
expected = { job: job, args: args, at: at, queue: queue }.compact
- serialized_args = serialize_args_for_assertion(expected)
+ expected_args = prepare_args_for_assertion(expected)
perform_enqueued_jobs { yield }
in_block_jobs = performed_jobs.drop(original_performed_jobs_count)
matching_job = in_block_jobs.find do |in_block_job|
- serialized_args.all? { |key, value| value == in_block_job[key] }
+ deserialized_job = deserialize_args_for_assertion(in_block_job)
+ expected_args.all? { |key, value| value == deserialized_job[key] }
end
assert matching_job, "No performed job found with #{expected}"
instantiate_job(matching_job)
@@ -420,15 +422,21 @@
end
end
- def serialize_args_for_assertion(args)
- args.dup.tap do |serialized_args|
- serialized_args[:args] =
ActiveJob::Arguments.serialize(serialized_args[:args]) if serialized_args[:args]
- serialized_args[:at] = serialized_args[:at].to_f if
serialized_args[:at]
+ def prepare_args_for_assertion(args)
+ args.dup.tap do |arguments|
+ arguments[:at] = arguments[:at].to_f if arguments[:at]
+ end
+ end
+
+ def deserialize_args_for_assertion(job)
+ job.dup.tap do |new_job|
+ new_job[:args] = ActiveJob::Arguments.deserialize(new_job[:args]) if
new_job[:args]
end
end
def instantiate_job(payload)
- job = payload[:job].new(*payload[:args])
+ args = ActiveJob::Arguments.deserialize(payload[:args])
+ job = payload[:job].new(*args)
job.scheduled_at = Time.at(payload[:at]) if payload.key?(:at)
job.queue_name = payload[:queue]
job
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-11-27 21:12:22.000000000 +0100
+++ new/metadata 2018-12-04 19:12:08.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activejob
version: !ruby/object:Gem::Version
- version: 5.2.1.1
+ version: 5.2.2
platform: ruby
authors:
- David Heinemeier Hansson
autorequire:
bindir: bin
cert_chain: []
-date: 2018-11-27 00:00:00.000000000 Z
+date: 2018-12-04 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: activesupport
@@ -16,14 +16,14 @@
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 5.2.1.1
+ version: 5.2.2
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 5.2.1.1
+ version: 5.2.2
- !ruby/object:Gem::Dependency
name: globalid
requirement: !ruby/object:Gem::Requirement
@@ -86,8 +86,8 @@
licenses:
- MIT
metadata:
- source_code_uri: https://github.com/rails/rails/tree/v5.2.1.1/activejob
- changelog_uri:
https://github.com/rails/rails/blob/v5.2.1.1/activejob/CHANGELOG.md
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.2/activejob
+ changelog_uri:
https://github.com/rails/rails/blob/v5.2.2/activejob/CHANGELOG.md
post_install_message:
rdoc_options: []
require_paths: