activejob_backport 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32ac234a8ceaec414e0e0540d9dead3fc95b6d26
4
- data.tar.gz: 21270e33dd1f9463f0e9fc89c50ac74ab200a11e
3
+ metadata.gz: eebe673161a3643aab31c4262381ea00750b0ae3
4
+ data.tar.gz: ad0f246cec6a226d9c9928273a852b0f9be45f5d
5
5
  SHA512:
6
- metadata.gz: ce74deb02a3c74c5cca37de1eee7070e5c420132a0a8a49d46d07b39b2b2cef1fe9c9cc657eac0b10f4be37f59436d07e372b23636b1b9a8eec4981eca19d9c3
7
- data.tar.gz: d74fd56bcd46493bad63884fdd2b3389a6eab2d1c38bf77463d09aec520c49eb8355f17ad775f18d8081015d565c4b92189f9b51be5ac2fcb8c886a04fcbb48f
6
+ metadata.gz: af2c36a317899b45791a1421dab77195f9558d0169dd89a270c7d91ffea3d4a40a8c5ef5259dd87c749049c81069b42c56f8c3975abeac612493c53370bbc96a
7
+ data.tar.gz: c56cb6cd4fcf877683dc8ae08bfa0cd84da16d45cfd9186874a8c8de8f67944f0cb23ad4999cb6fb9f199b4ede14c1f7d1eabb5b8bfef880083d099c672da519
@@ -25,6 +25,7 @@ require 'active_support'
25
25
  require 'active_support/rails'
26
26
  require 'active_job/version'
27
27
  require 'global_id' if !defined?(GlobalId)
28
+ require 'global_id/railtie' if defined?(Rails)
28
29
  require 'active_job/railtie' if defined?(Rails)
29
30
  require 'active_support/core_ext/module/attribute_accessors'
30
31
 
@@ -7,7 +7,7 @@ module ActiveJob
7
7
  module VERSION
8
8
  MAJOR = 0
9
9
  MINOR = 0
10
- TINY = 2
10
+ TINY = 3
11
11
  PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -1 +1 @@
1
- require 'active_job'
1
+ require 'active_job' if !defined?(ActiveJob)
@@ -0,0 +1,27 @@
1
+ begin
2
+ require 'rails/railtie'
3
+ rescue LoadError
4
+ else
5
+ require 'global_id'
6
+ require 'active_support'
7
+ require 'active_support/core_ext/string/inflections'
8
+
9
+ class GlobalID
10
+ # = GlobalID Railtie
11
+ # Set up the signed GlobalID verifier and include Active Record support.
12
+ class Railtie < Rails::Railtie # :nodoc:
13
+ config.global_id = ActiveSupport::OrderedOptions.new
14
+
15
+ initializer 'global_id' do |app|
16
+ app.config.global_id.app ||= app.railtie_name.sub('_application', '').dasherize
17
+ GlobalID.app = app.config.global_id.app
18
+
19
+ ActiveSupport.on_load(:active_record) do
20
+ require 'global_id/identification'
21
+ send :include, GlobalID::Identification
22
+ end
23
+ end
24
+ end
25
+ end
26
+
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob_backport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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: 2014-09-15 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,6 +94,7 @@ files:
94
94
  - lib/global_id/global_id.rb
95
95
  - lib/global_id/identification.rb
96
96
  - lib/global_id/locator.rb
97
+ - lib/global_id/railtie.rb
97
98
  - lib/rails/generators/job/job_generator.rb
98
99
  - lib/rails/generators/job/templates/job.rb
99
100
  homepage: https://github.com/ankane/activejob_backport
@@ -121,4 +122,3 @@ signing_key:
121
122
  specification_version: 4
122
123
  summary: Job framework with pluggable queues.
123
124
  test_files: []
124
- has_rdoc: