rails_multitenant 0.5.1 → 0.5.2

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: '0934514796a4abd1d808f13834e57a8bd5518652'
4
- data.tar.gz: 5a16cd56507b118219a22859d19b7c9b5c2a80d6
3
+ metadata.gz: 6b9fe0569d5f01e47660ec57042d83318edc210d
4
+ data.tar.gz: 8300b9d7e84a92b3c12151fd86fa4ff91f86a0a9
5
5
  SHA512:
6
- metadata.gz: f9fcfd6d79d3c610bdfef2342675c6060374186098ada4b3a695fa66be7ed50de1cc271a79fd796e5daba19a4774fc3940e04b7e695cfd89f29f960b3aebb2d3
7
- data.tar.gz: 37399384a6d6b550f17fc23b1acdfd466e5ea6ba7ddecf9f0b1de2495f97470ffd5f6290fd6e5b45e92c3274419326395378c993cf1e840fdc3e13ba03cc9f28
6
+ metadata.gz: 303571c168d24b6c5a7dd6953e492f51ee11483af8cfe6e722c7b5172f6afd4ec01c9a49901c46d49df9daae55868d9e1ffc225720c1b339d7ab15a20e491565
7
+ data.tar.gz: 954647829c698e0c0d57b69105efc0d044e2b6eafdd4ee3757edf6997854c2a56306208c9684e1bce70a1a0987a5e0c19e3490957add60e6d54a320942088c3d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.5.2
4
+ * Optimize `CurrentInstance.current` / `CurrentInstance.current_id` / `CurrentInstance.current=`
5
+ / `CurrentInstance.current_id=`.
6
+
3
7
  ### 0.5.1
4
8
  * Fix incorrect Rails version dependency in rubygems.org.
5
9
 
@@ -102,15 +102,18 @@ module RailsMultitenant
102
102
  end
103
103
 
104
104
  def current_instance_registry_id
105
+ return @current_instance_registry_id if @current_instance_registry_id
106
+
105
107
  key_class = respond_to?(:base_class) ? base_class : self
106
- "#{key_class.name.underscore}_id".to_sym
108
+ @current_instance_registry_id = "#{key_class.name.underscore}_id".to_sym
107
109
  end
108
110
 
109
111
  def current_instance_registry_obj
112
+ return @current_instance_registry_obj if @current_instance_registry_obj
113
+
110
114
  key_class = respond_to?(:base_class) ? base_class : self
111
- "#{key_class.name.underscore}_obj".to_sym
115
+ @current_instance_registry_obj = "#{key_class.name.underscore}_obj".to_sym
112
116
  end
113
-
114
117
  include RegistryDependentOn
115
118
  end
116
119
 
@@ -1,3 +1,3 @@
1
1
  module RailsMultitenant
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency 'coveralls'
26
26
  spec.add_development_dependency 'database_cleaner', '>= 1.2'
27
- spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'rake', '< 11.0'
28
28
  spec.add_development_dependency 'rspec', '~> 2'
29
29
  spec.add_development_dependency 'simplecov', '~> 0.7.1'
30
30
  spec.add_development_dependency 'sqlite3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_multitenant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Breault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-04 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,16 +96,16 @@ dependencies:
96
96
  name: rake
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ">="
99
+ - - "<"
100
100
  - !ruby/object:Gem::Version
101
- version: '0'
101
+ version: '11.0'
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ">="
106
+ - - "<"
107
107
  - !ruby/object:Gem::Version
108
- version: '0'
108
+ version: '11.0'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: rspec
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  requirements: []
204
204
  rubyforge_project:
205
- rubygems_version: 2.5.2
205
+ rubygems_version: 2.5.1
206
206
  signing_key:
207
207
  specification_version: 4
208
208
  summary: Automatically configures multiple tenants in a Rails environment