acts_as_multi_tenant 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/multi_tenant/belongs_to_tenant.rb +2 -2
- data/lib/multi_tenant/middleware.rb +1 -1
- data/lib/multi_tenant/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4f9bec876a4f3fa00936a46c89514da147bd257c064e40752122e0270ee45137
|
4
|
+
data.tar.gz: 4e37d1398746befc54de7d1a42a102f668aadf4b95e80ec853d8a960f83bfd70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df02d6f79a2f0abe627ae2319acb6930cc8cd4043cec326b34da71ca5f704b64ab64c38a5e940bf342d6f39310463f3ca6e2eeb047481af3282052e57cdec9fe
|
7
|
+
data.tar.gz: fcd53a8bcb9bff89f16a5523d9175ba5ed6dbc0bb6399dd2a16312f5c4fbdeb867d6ff4373bf95dc28e6f3ca84ce8a79d8d955cd2432939dbf5a3ad686c5651a
|
@@ -15,8 +15,8 @@ module MultiTenant
|
|
15
15
|
# @param scope [Proc] (optional) Proc holding an Arel scope for the lookup - same that the normal `belongs_to` method accepts.
|
16
16
|
# @param options [Hash] (optional) Hash with association options - same that the normal `belongs_to` methods accepts.
|
17
17
|
#
|
18
|
-
def belongs_to_tenant(association_name, scope = nil, options
|
19
|
-
belongs_to association_name, scope, options
|
18
|
+
def belongs_to_tenant(association_name, scope = nil, **options)
|
19
|
+
belongs_to association_name, scope, **options
|
20
20
|
reflection = reflections[association_name.to_s]
|
21
21
|
unless reflection.klass.acts_as_tenant? or reflection.klass.proxies_to_tenant?
|
22
22
|
raise "`belongs_to_tenant :#{association_name}` failed because #{reflection.klass.name} has not used `acts_as_tenant` or `proxies_to_tenant`."
|
@@ -93,7 +93,7 @@ module MultiTenant
|
|
93
93
|
|
94
94
|
def path_matches?(req, paths)
|
95
95
|
paths.any? { |(path, methods)|
|
96
|
-
|
96
|
+
path === req.path && (methods == :any || methods.include?(req.request_method))
|
97
97
|
}
|
98
98
|
end
|
99
99
|
|
data/lib/multi_tenant/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_multi_tenant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '4.2'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '6.0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
version: '4.2'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '6.0'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rack
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.7.6
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: An ActiveRecord plugin for multi-tenant databases
|