milia_activejob 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 86d7de9e59a285b5aed446ee049cf2283950e1ee
4
+ data.tar.gz: 7900f4c31ca7eb2e381f00c50f1f47411d08af77
5
+ SHA512:
6
+ metadata.gz: a7e07fae897d015412b62e24619d77544814204aa1706603987422052a35edf15adee590530b45f093d13eb73e50d3e37421b03a4648bd4e0235f024dd7155db
7
+ data.tar.gz: 917b70406741e1c89fa95d3cff882dbefc12042efaeb517a3114e438cc6328cc7102de9a26a2f719f9fcf4393e3d8474a27367d76450602cd376c81774ea2778
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in milia_activejob.gemspec
4
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2016 Stephen Kapp
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Milia::Activejob
2
+
3
+ Milia support for ActiveJob
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'milia_activejob'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install milia_activejob
20
+
21
+ ## Usage
22
+
23
+ Create a new initialization file active_job.rb in your project with the contents
24
+
25
+ ```ruby
26
+ class ActiveJob::Base
27
+ include Milia::ActiveJob
28
+ end
29
+ ```
30
+
31
+ You will need to restart your rails server for this to take effect.
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mort666/milia_activejob.
36
+
37
+ ## Copyright
38
+
39
+ Copyright (c) 2016 Stephen Kapp. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,2 @@
1
+ require "milia_activejob/active_job"
2
+ require "milia_activejob/version"
@@ -0,0 +1,17 @@
1
+ module Milia
2
+ module ActiveJob
3
+ extend ActiveSupport::Concern
4
+
5
+ class_methods do
6
+ def execute(job_data)
7
+ Tenant.set_current_tenant(job_data['milia_tenant']) do
8
+ super
9
+ end
10
+ end
11
+ end
12
+
13
+ def serialize
14
+ super.merge('milia_tenant' => Tenant.current_tenant.id)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ module Milia
2
+ module ActiveJob
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'milia_activejob/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "milia_activejob"
8
+ spec.version = Milia::ActiveJob::VERSION
9
+ spec.authors = ["Stephen Kapp"]
10
+ spec.email = ["mort666@virus.org"]
11
+
12
+ spec.summary = %q{ActiveJob support for Milia }
13
+ spec.description = %q{ActiveJob support for Milia Multi-Tenancy}
14
+ spec.homepage = "https://github.com/mort666/milia_activejob"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.10"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "minitest"
24
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: milia_activejob
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Stephen Kapp
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: ActiveJob support for Milia Multi-Tenancy
56
+ email:
57
+ - mort666@virus.org
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.md
65
+ - README.md
66
+ - Rakefile
67
+ - lib/milia_activejob.rb
68
+ - lib/milia_activejob/active_job.rb
69
+ - lib/milia_activejob/version.rb
70
+ - milia_activejob.gemspec
71
+ homepage: https://github.com/mort666/milia_activejob
72
+ licenses: []
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 2.4.3
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: ActiveJob support for Milia
94
+ test_files: []
95
+ has_rdoc: