rails_multitenant 0.3.0 → 0.3.1

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: 316a055e8cc0d31080584671093b6dc56f022699
4
- data.tar.gz: 50c5641c12bd0d5b8e2c80b74a8c4a2b9aa10dc7
3
+ metadata.gz: 0d9d1830ec790f9afd698f90dab03a3758940e64
4
+ data.tar.gz: a2e30e84291bc0080fbf75be97b676f576e2347c
5
5
  SHA512:
6
- metadata.gz: 7008b9aeae0c543d437198f5e14037183e79a871579d966e0b8ca7b60c037697cdfa698f92666e9d4ba216ee5abb492156b5a9cf86675d6d975cb9f2e1cee5a9
7
- data.tar.gz: d98d65403a5f4bb5eaffbf20d265fd9755734567eff9df23d9cbcfde833fc981199011da8ef9dbbacaa6564f0b640c59452537b21874508998064dfdd0e44919
6
+ metadata.gz: db8809d3660df19cae83d21b9e39d6f816c85eef587890a04042c0bdeb36a0919a052158cef1fc47b59d4741b18d71f9209a17cb3191ec0796ee8efeac09a177
7
+ data.tar.gz: d188d1dbabb872fca6ec705714a704cbf3c87513d37fb88357f680637f8aba242519b460479042133f30819506e9f73127e584e57de6529f2bab98b3375422c3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.3.1 (unreleased)
4
+ * Fix strip_<entity>_scope
5
+
3
6
  ### 0.3.0
4
7
  * Modify `RailsMultitenant::GlobalContextRegistry#new_registry` to accept an arg
5
8
  specifying the new registry to set. The previous registry is still returned.
@@ -23,7 +23,7 @@ module RailsMultitenant
23
23
 
24
24
  default_scope { send(scope_sym) }
25
25
 
26
- define_method "strip_#{context_entity}_scope" do
26
+ scope "strip_#{context_entity}_scope", -> do
27
27
  unscope(where: context_entity_id_field)
28
28
  end
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module RailsMultitenant
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -26,6 +26,10 @@ describe ExternalItem do
26
26
  end
27
27
  end
28
28
 
29
+ it 'allows the organization scope to be removed' do
30
+ expect(ExternalItem.strip_external_organization_scope.count).to eq 3
31
+ end
32
+
29
33
  def as_external_org(id, &block)
30
34
  GlobalContextRegistry.with_isolated_registry(external_organization_id: id, &block)
31
35
  end
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.3.0
4
+ version: 0.3.1
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-01-26 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  requirements: []
200
200
  rubyforge_project:
201
- rubygems_version: 2.4.8
201
+ rubygems_version: 2.5.1
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: Automatically configures multiple tenants in a Rails environment