activejob 5.0.0.beta1.1 → 5.0.0.beta2

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: c0ec545091e1e1eb81aa5d46bb6f43076687bbbe
4
- data.tar.gz: 6663382764fa4c81cf405b0cb466a368f59bde95
3
+ metadata.gz: dfa4cd8e13389288d3ab4fe31be121dbc91e7611
4
+ data.tar.gz: ebb8b8ff8363f658033da88a8081d9d1541e1f7d
5
5
  SHA512:
6
- metadata.gz: 7f874569af26ca0d646caeed6cac1c2b9ecc6b115ab62fcd01f5e5e46350b061292b8817e4d273a76f954337b4e2841d7f5f62aa0090f45db1a89e41012550e9
7
- data.tar.gz: 3f267b5f71d20a9148e316e4e67e0c6813a02927d6b441dc78a98a20922e2f7e26cc44400660efce2c0ceeb77573b7634bfb05ac59bc3b6ba60711a870d3e710
6
+ metadata.gz: c91edb9706c7df5606a61d015ea37efdd1c139798273055e63677716239115dc2da669a5055a3c8df7c0ba92363cd8df7bd29311c99bcd5a09f5856c36016c1e
7
+ data.tar.gz: c96357020e128cc7b7dd295bf6cfc75acf68a2da1806af609dea097ec8ff5e51b0f1663516be2bc5a587f07adc9b3e7c6258911d4ae868740a8e1e3343f6320c
@@ -1,8 +1,10 @@
1
- ## Rails 5.0.0.beta1 (December 18, 2015) ##
1
+ ## Rails 5.0.0.beta2 (February 01, 2016) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
+ ## Rails 5.0.0.beta1 (December 18, 2015) ##
7
+
6
8
  * Fixed serializing `:at` option for `assert_enqueued_with`
7
9
  and `assert_performed_with`.
8
10
 
@@ -31,7 +33,7 @@
31
33
 
32
34
  *Jean Boussier*
33
35
 
34
- * Include I18n.locale into job serialization/deserialization and use it around
36
+ * Include `I18n.locale` into job serialization/deserialization and use it around
35
37
  `perform`.
36
38
 
37
39
  Fixes #20799.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2015 David Heinemeier Hansson
1
+ Copyright (c) 2014-2016 David Heinemeier Hansson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2014-2015 David Heinemeier Hansson
2
+ # Copyright (c) 2014-2016 David Heinemeier Hansson
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ module ActiveJob
25
25
 
26
26
  # Raised when an unsupported argument type is set as a job argument. We
27
27
  # currently support NilClass, Fixnum, Float, String, TrueClass, FalseClass,
28
- # Bignum and objects that can be represented as GlobalIDs (ex: Active Record).
28
+ # Bignum, BigDecimal, and objects that can be represented as GlobalIDs (ex: Active Record).
29
29
  # Raised if you set the key for a Hash something else than a string or
30
30
  # a symbol. Also raised when trying to serialize an object which can't be
31
31
  # identified with a Global ID - such as an unpersisted Active Record model.
@@ -34,7 +34,7 @@ module ActiveJob
34
34
  module Arguments
35
35
  extend self
36
36
  # :nodoc:
37
- TYPE_WHITELIST = [ NilClass, Fixnum, Float, String, TrueClass, FalseClass, Bignum ]
37
+ TYPE_WHITELIST = [ NilClass, Fixnum, Float, String, TrueClass, FalseClass, Bignum, BigDecimal ]
38
38
 
39
39
  # Serializes a set of arguments. Whitelisted types are returned
40
40
  # as-is. Arrays/Hashes are serialized element by element.
@@ -8,7 +8,7 @@ module ActiveJob
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 0
11
- PRE = "beta1.1"
11
+ PRE = "beta2"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -27,7 +27,7 @@ module ActiveJob
27
27
  # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
28
28
  # | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
29
29
  # | Sneakers | Yes | Yes | No | Queue | Queue | No |
30
- # | Sucker Punch | Yes | Yes | No | No | No | No |
30
+ # | Sucker Punch | Yes | Yes | Yes | No | No | No |
31
31
  # | Active Job Async | Yes | Yes | Yes | No | No | No |
32
32
  # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
33
33
  #
@@ -5,12 +5,10 @@ module ActiveJob
5
5
  # == Sucker Punch adapter for Active Job
6
6
  #
7
7
  # Sucker Punch is a single-process Ruby asynchronous processing library.
8
- # It's girl_friday and DSL sugar on top of Celluloid. With Celluloid's
9
- # actor pattern, we can do asynchronous processing within a single process.
10
- # This reduces costs of hosting on a service like Heroku along with the
11
- # memory footprint of having to maintain additional jobs if hosting on
12
- # a dedicated server. All queues can run within a single Rails/Sinatra
13
- # process.
8
+ # This reduces the cost of of hosting on a service like Heroku along
9
+ # with the memory footprint of having to maintain additional jobs if
10
+ # hosting on a dedicated server. All queues can run within a
11
+ # single application (eg. Rails, Sinatra, etc.) process.
14
12
  #
15
13
  # Read more about Sucker Punch {here}[https://github.com/brandonhilkert/sucker_punch].
16
14
  #
@@ -19,11 +17,22 @@ module ActiveJob
19
17
  # Rails.application.config.active_job.queue_adapter = :sucker_punch
20
18
  class SuckerPunchAdapter
21
19
  def enqueue(job) #:nodoc:
22
- JobWrapper.new.async.perform job.serialize
20
+ if JobWrapper.respond_to?(:perform_async)
21
+ # sucker_punch 2.0 API
22
+ JobWrapper.perform_async job.serialize
23
+ else
24
+ # sucker_punch 1.0 API
25
+ JobWrapper.new.async.perform job.serialize
26
+ end
23
27
  end
24
28
 
25
29
  def enqueue_at(job, timestamp) #:nodoc:
26
- raise NotImplementedError, "This queueing backend does not support scheduling jobs. To see what features are supported go to http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html"
30
+ if JobWrapper.respond_to?(:perform_in)
31
+ delay = timestamp - Time.current.to_f
32
+ JobWrapper.perform_in delay, job.serialize
33
+ else
34
+ raise NotImplementedError, 'sucker_punch 1.0 does not support `enqueued_at`. Please upgrade to version ~> 2.0.0 to enable this behavior.'
35
+ end
27
36
  end
28
37
 
29
38
  class JobWrapper #:nodoc:
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: 5.0.0.beta1.1
4
+ version: 5.0.0.beta2
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: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-02-01 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: 5.0.0.beta1.1
19
+ version: 5.0.0.beta2
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: 5.0.0.beta1.1
26
+ version: 5.0.0.beta2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,8 +101,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: 1.3.1
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.5.1
104
+ rubygems_version: 2.5.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Job framework with pluggable queues.
108
108
  test_files: []
109
+ has_rdoc: