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 +4 -4
- data/lib/active_job.rb +1 -0
- data/lib/active_job/gem_version.rb +1 -1
- data/lib/activejob_backport.rb +1 -1
- data/lib/global_id/railtie.rb +27 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eebe673161a3643aab31c4262381ea00750b0ae3
|
4
|
+
data.tar.gz: ad0f246cec6a226d9c9928273a852b0f9be45f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af2c36a317899b45791a1421dab77195f9558d0169dd89a270c7d91ffea3d4a40a8c5ef5259dd87c749049c81069b42c56f8c3975abeac612493c53370bbc96a
|
7
|
+
data.tar.gz: c56cb6cd4fcf877683dc8ae08bfa0cd84da16d45cfd9186874a8c8de8f67944f0cb23ad4999cb6fb9f199b4ede14c1f7d1eabb5b8bfef880083d099c672da519
|
data/lib/active_job.rb
CHANGED
@@ -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
|
|
data/lib/activejob_backport.rb
CHANGED
@@ -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.
|
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-
|
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:
|