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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 203d60eb7cde2315b36710c8e77542a0fe009b5d
4
- data.tar.gz: 6667b033b293b28f34f81ea9f4d3991aee49a7dd
2
+ SHA256:
3
+ metadata.gz: 4f9bec876a4f3fa00936a46c89514da147bd257c064e40752122e0270ee45137
4
+ data.tar.gz: 4e37d1398746befc54de7d1a42a102f668aadf4b95e80ec853d8a960f83bfd70
5
5
  SHA512:
6
- metadata.gz: 7d68acbbefa65bfb9f40c5d75c81ec55c61e710a73ef5d63c989153aedb42b23ec768b6f0ce0cca126e096b069244b695aa9dff92d4c40f04d98ebc803823588
7
- data.tar.gz: 8dc6dd1165347bda75cbcbcdfe6e717bf3f0918b2694a3316c4d7d1fe95d9a7a63e9cd378ef99b185dc39ce1990ef438d163850eb0183af6284a20ef221fb337
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
- (path == req.path || path =~ req.path) && (methods == :any || methods.include?(req.request_method))
96
+ path === req.path && (methods == :any || methods.include?(req.request_method))
97
97
  }
98
98
  end
99
99
 
@@ -1,4 +1,4 @@
1
1
  module MultiTenant
2
2
  # Gem version
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
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.0.0
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-02-19 00:00:00.000000000 Z
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: '5.2'
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: '5.2'
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.5.2.1
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