activejob 4.2.3 → 4.2.4.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activejob might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6f30a16facea1ee4a2c9f6b68e078d2e0df6759
4
- data.tar.gz: f2240b6a9a398d70da3614e4d45fa2c4fd09e3a4
3
+ metadata.gz: f016eb293bdc0030f2c1859c6695a0e6b667b1c3
4
+ data.tar.gz: 136dc5bc6220ae854ffe8a8e81d611288a445199
5
5
  SHA512:
6
- metadata.gz: 96c25a4149b02f2e3be09edf4486449f07c460f16368c44a07ea5c95515b4072fe8834c4fef774fdb8e4a0cd9aabb4401fec5612360e138bd8d6c501f08a0fd6
7
- data.tar.gz: c0c4ee614ef79f70b70fac1ee2bdad845467839d4abb7255f36fb9f84771bb61745e4735741ccfd71ba603976b0cd6203af2364e5fac9bb61bcca2c3830999db
6
+ metadata.gz: dd0d5381bd6ba8367bf0d495e09ec9621593c540c347ed2cc53f0433feb2fa67f3dcb978c9f43d5be2230f0d77c1d4dc2ae6c04b137bf62ec3ddf804dc507344
7
+ data.tar.gz: 9a435badb17ff2a9deb586c84d496aa3bf408542b6102330bbc886b81b0971d449a40afe689621393afafd91d58cac951cb5c854fc28a57ef48e2d795090bdf3
@@ -1,3 +1,12 @@
1
+ ## Rails 4.2.4 (August 14, 2015) ##
2
+
3
+ * Include I18n.locale into job serialization/deserialization and use it around
4
+ `perform`.
5
+
6
+ Fixes #20799.
7
+
8
+ *Johannes Opper*
9
+
1
10
  ## Rails 4.2.3 (June 25, 2015) ##
2
11
 
3
12
  * `assert_enqueued_jobs` and `assert_performed_jobs` in block form use the
@@ -5,6 +5,7 @@ require 'active_job/enqueuing'
5
5
  require 'active_job/execution'
6
6
  require 'active_job/callbacks'
7
7
  require 'active_job/logging'
8
+ require 'active_job/translation'
8
9
 
9
10
  module ActiveJob #:nodoc:
10
11
  # = Active Job
@@ -60,6 +61,7 @@ module ActiveJob #:nodoc:
60
61
  include Execution
61
62
  include Callbacks
62
63
  include Logging
64
+ include Translation
63
65
 
64
66
  ActiveSupport.run_load_hooks(:active_job, self)
65
67
  end
@@ -15,6 +15,9 @@ module ActiveJob
15
15
 
16
16
  # Queue in which the job will reside.
17
17
  attr_writer :queue_name
18
+
19
+ # I18n.locale to be used during the job.
20
+ attr_accessor :locale
18
21
  end
19
22
 
20
23
  # These methods will be included into any Active Job object, adding
@@ -26,6 +29,7 @@ module ActiveJob
26
29
  job.job_id = job_data['job_id']
27
30
  job.queue_name = job_data['queue_name']
28
31
  job.serialized_arguments = job_data['arguments']
32
+ job.locale = job_data['locale'] || I18n.locale
29
33
  job
30
34
  end
31
35
 
@@ -65,7 +69,8 @@ module ActiveJob
65
69
  'job_class' => self.class.name,
66
70
  'job_id' => job_id,
67
71
  'queue_name' => queue_name,
68
- 'arguments' => serialize_arguments(arguments)
72
+ 'arguments' => serialize_arguments(arguments),
73
+ 'locale' => I18n.locale
69
74
  }
70
75
  end
71
76
 
@@ -7,8 +7,8 @@ module ActiveJob
7
7
  module VERSION
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
- TINY = 3
11
- PRE = nil
10
+ TINY = 4
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -15,23 +15,22 @@ module ActiveJob
15
15
  #
16
16
  # === Backends Features
17
17
  #
18
- # | | Async | Queues | Delayed | Priorities | Timeout | Retries |
19
- # |-------------------|-------|--------|-----------|------------|---------|---------|
20
- # | Backburner | Yes | Yes | Yes | Yes | Job | Global |
21
- # | Delayed Job | Yes | Yes | Yes | Job | Global | Global |
22
- # | Qu | Yes | Yes | No | No | No | Global |
23
- # | Que | Yes | Yes | Yes | Job | No | Job |
24
- # | queue_classic | Yes | Yes | No* | No | No | No |
25
- # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
26
- # | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
27
- # | Sneakers | Yes | Yes | No | Queue | Queue | No |
28
- # | Sucker Punch | Yes | Yes | No | No | No | No |
29
- # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
18
+ # | | Async | Queues | Delayed | Priorities | Timeout | Retries |
19
+ # |-------------------|-------|--------|------------|------------|---------|---------|
20
+ # | Backburner | Yes | Yes | Yes | Yes | Job | Global |
21
+ # | Delayed Job | Yes | Yes | Yes | Job | Global | Global |
22
+ # | Qu | Yes | Yes | No | No | No | Global |
23
+ # | Que | Yes | Yes | Yes | Job | No | Job |
24
+ # | queue_classic | Yes | Yes | Yes* | No | No | No |
25
+ # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
26
+ # | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
27
+ # | Sneakers | Yes | Yes | No | Queue | Queue | No |
28
+ # | Sucker Punch | Yes | Yes | No | No | No | No |
29
+ # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
30
30
  #
31
31
  # NOTE:
32
- # queue_classic does not support Job scheduling. However you can implement this
33
- # yourself or you can use the queue_classic-later gem. See the documentation for
34
- # ActiveJob::QueueAdapters::QueueClassicAdapter.
32
+ # queue_classic supports job scheduling since version 3.1.
33
+ # For older versions you can use the queue_classic-later gem.
35
34
  #
36
35
  module QueueAdapters
37
36
  extend ActiveSupport::Autoload
@@ -0,0 +1,11 @@
1
+ module ActiveJob
2
+ module Translation #:nodoc:
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ around_perform do |job, block, _|
7
+ I18n.with_locale(job.locale, &block)
8
+ end
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.4.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.3
19
+ version: 4.2.4.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.3
26
+ version: 4.2.4.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,6 +74,7 @@ files:
74
74
  - lib/active_job/railtie.rb
75
75
  - lib/active_job/test_case.rb
76
76
  - lib/active_job/test_helper.rb
77
+ - lib/active_job/translation.rb
77
78
  - lib/active_job/version.rb
78
79
  - lib/rails/generators/job/job_generator.rb
79
80
  - lib/rails/generators/job/templates/job.rb
@@ -92,13 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
93
  version: 1.9.3
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
- - - ">="
96
+ - - ">"
96
97
  - !ruby/object:Gem::Version
97
- version: '0'
98
+ version: 1.3.1
98
99
  requirements: []
99
100
  rubyforge_project:
100
- rubygems_version: 2.4.5
101
+ rubygems_version: 2.4.7
101
102
  signing_key:
102
103
  specification_version: 4
103
104
  summary: Job framework with pluggable queues.
104
105
  test_files: []
106
+ has_rdoc: