tenanfy 0.0.6 → 0.0.7

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: 4e02f8e4d2a850161a80bc0dfe192a739ae2c8e3
4
- data.tar.gz: 28fdbb0b97dbfac2ef508fea328eeef75b70afe5
3
+ metadata.gz: 85c62500154d550d5ff86498c72037952ee55c1b
4
+ data.tar.gz: e9c3fdb92396c975c91619cf97862642c181b398
5
5
  SHA512:
6
- metadata.gz: a32d42ac71a3eba4540c7b9f3d7684cd44d39ff08dbe964a7e9c7a18c97c7ec117c669edef1af5dc68ab0f9cd5fbb005b227f46669bf82ca85e31522f7ae4438
7
- data.tar.gz: d8a78b24a31ee877604650dfee851e18594915ed57bcf86c8a188a2a5bdde26553f27ed4da600e793fd99ed0fef5984e88cfe97af593ad38d7c0007dfd14b3e8
6
+ metadata.gz: 09005a519c83867edb1ee3671457d5fe8eb95424a505dedbfed2e84df0dc3d87a8deac4e0ae9885a8a97e26f3ab7b53161a64d716f3af3d2a699c0aa7da35fdf
7
+ data.tar.gz: 88970e4a96def998b592181a27a2119fa69d1a08edd08dcb243934a3f76db208ff58acf45d17fbcc727edc891ee456f266fcc8415ee95245531376c392f6ea4b
@@ -9,7 +9,7 @@ module Tenanfy
9
9
 
10
10
  private
11
11
 
12
- # Setups the current_tenant in the Thread.current
12
+ # Setups the current_tenant in the RequestStore.store
13
13
  # so it can be accessed by different contexts in the
14
14
  # same request
15
15
  #
@@ -17,13 +17,13 @@ module Tenanfy
17
17
  # this way there isn't any dead tenant hanging
18
18
  #
19
19
  def setup_tenant_thread
20
- Thread.current[:tenant] = current_tenant
20
+ RequestStore.store[:tenant] = current_tenant
21
21
  on_tenant_change
22
22
  prepend_tenant_theme
23
23
  yield
24
24
  ensure
25
25
  after_tenant_change
26
- Thread.current[:tenant] = nil
26
+ RequestStore.store[:tenant] = nil
27
27
  end
28
28
 
29
29
  # Adds the tenant theme in the controller view path
@@ -1,3 +1,3 @@
1
1
  module Tenanfy
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenanfy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Scolari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-05 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.25.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: request_store
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pg
43
57
  requirement: !ruby/object:Gem::Requirement