activerecord-multi-tenant 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -28
  3. data/Appraisals +6 -49
  4. data/Gemfile.lock +77 -61
  5. data/gemfiles/active_record_5.2.gemfile +2 -1
  6. data/gemfiles/active_record_5.2.gemfile.lock +38 -38
  7. data/gemfiles/active_record_6.0.gemfile +1 -1
  8. data/gemfiles/active_record_6.0.gemfile.lock +95 -95
  9. data/gemfiles/rails_5.2.gemfile +2 -1
  10. data/gemfiles/rails_5.2.gemfile.lock +38 -38
  11. data/gemfiles/rails_6.0.gemfile +1 -1
  12. data/gemfiles/rails_6.0.gemfile.lock +95 -95
  13. data/lib/activerecord-multi-tenant/controller_extensions.rb +2 -6
  14. data/lib/activerecord-multi-tenant/copy_from_client.rb +2 -2
  15. data/lib/activerecord-multi-tenant/migrations.rb +2 -2
  16. data/lib/activerecord-multi-tenant/model_extensions.rb +3 -9
  17. data/lib/activerecord-multi-tenant/multi_tenant.rb +1 -0
  18. data/lib/activerecord-multi-tenant/query_rewriter.rb +22 -73
  19. data/lib/activerecord-multi-tenant/sidekiq.rb +2 -1
  20. data/lib/activerecord-multi-tenant/version.rb +1 -1
  21. data/spec/activerecord-multi-tenant/controller_extensions_spec.rb +19 -24
  22. data/spec/activerecord-multi-tenant/model_extensions_spec.rb +6 -30
  23. data/spec/activerecord-multi-tenant/query_rewriter_spec.rb +8 -0
  24. data/spec/activerecord-multi-tenant/sidekiq_spec.rb +4 -4
  25. data/spec/schema.rb +1 -4
  26. data/spec/spec_helper.rb +1 -6
  27. metadata +6 -14
  28. data/gemfiles/active_record_5.1.gemfile +0 -15
  29. data/gemfiles/active_record_5.1.gemfile.lock +0 -180
  30. data/gemfiles/rails_4.2.gemfile +0 -16
  31. data/gemfiles/rails_4.2.gemfile.lock +0 -175
  32. data/gemfiles/rails_5.0.gemfile +0 -15
  33. data/gemfiles/rails_5.0.gemfile.lock +0 -180
  34. data/gemfiles/rails_5.1.gemfile +0 -15
  35. data/gemfiles/rails_5.1.gemfile.lock +0 -180
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "activerecord", "~> 6.0.0"
6
+ gem "activerecord", "~> 6.0.3"
7
7
 
8
8
  gemspec path: "../"
@@ -1,165 +1,165 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-multi-tenant (1.0.4)
4
+ activerecord-multi-tenant (1.1.0)
5
5
  rails (>= 4.2)
6
6
  request_store (>= 1.0.5)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.0.0)
12
- actionpack (= 6.0.0)
11
+ actioncable (6.0.3.1)
12
+ actionpack (= 6.0.3.1)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (6.0.0)
16
- actionpack (= 6.0.0)
17
- activejob (= 6.0.0)
18
- activerecord (= 6.0.0)
19
- activestorage (= 6.0.0)
20
- activesupport (= 6.0.0)
15
+ actionmailbox (6.0.3.1)
16
+ actionpack (= 6.0.3.1)
17
+ activejob (= 6.0.3.1)
18
+ activerecord (= 6.0.3.1)
19
+ activestorage (= 6.0.3.1)
20
+ activesupport (= 6.0.3.1)
21
21
  mail (>= 2.7.1)
22
- actionmailer (6.0.0)
23
- actionpack (= 6.0.0)
24
- actionview (= 6.0.0)
25
- activejob (= 6.0.0)
22
+ actionmailer (6.0.3.1)
23
+ actionpack (= 6.0.3.1)
24
+ actionview (= 6.0.3.1)
25
+ activejob (= 6.0.3.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (6.0.0)
29
- actionview (= 6.0.0)
30
- activesupport (= 6.0.0)
31
- rack (~> 2.0)
28
+ actionpack (6.0.3.1)
29
+ actionview (= 6.0.3.1)
30
+ activesupport (= 6.0.3.1)
31
+ rack (~> 2.0, >= 2.0.8)
32
32
  rack-test (>= 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
- actiontext (6.0.0)
36
- actionpack (= 6.0.0)
37
- activerecord (= 6.0.0)
38
- activestorage (= 6.0.0)
39
- activesupport (= 6.0.0)
35
+ actiontext (6.0.3.1)
36
+ actionpack (= 6.0.3.1)
37
+ activerecord (= 6.0.3.1)
38
+ activestorage (= 6.0.3.1)
39
+ activesupport (= 6.0.3.1)
40
40
  nokogiri (>= 1.8.5)
41
- actionview (6.0.0)
42
- activesupport (= 6.0.0)
41
+ actionview (6.0.3.1)
42
+ activesupport (= 6.0.3.1)
43
43
  builder (~> 3.1)
44
44
  erubi (~> 1.4)
45
45
  rails-dom-testing (~> 2.0)
46
46
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
- activejob (6.0.0)
48
- activesupport (= 6.0.0)
47
+ activejob (6.0.3.1)
48
+ activesupport (= 6.0.3.1)
49
49
  globalid (>= 0.3.6)
50
- activemodel (6.0.0)
51
- activesupport (= 6.0.0)
52
- activerecord (6.0.0)
53
- activemodel (= 6.0.0)
54
- activesupport (= 6.0.0)
55
- activestorage (6.0.0)
56
- actionpack (= 6.0.0)
57
- activejob (= 6.0.0)
58
- activerecord (= 6.0.0)
50
+ activemodel (6.0.3.1)
51
+ activesupport (= 6.0.3.1)
52
+ activerecord (6.0.3.1)
53
+ activemodel (= 6.0.3.1)
54
+ activesupport (= 6.0.3.1)
55
+ activestorage (6.0.3.1)
56
+ actionpack (= 6.0.3.1)
57
+ activejob (= 6.0.3.1)
58
+ activerecord (= 6.0.3.1)
59
59
  marcel (~> 0.3.1)
60
- activesupport (6.0.0)
60
+ activesupport (6.0.3.1)
61
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
62
62
  i18n (>= 0.7, < 2)
63
63
  minitest (~> 5.1)
64
64
  tzinfo (~> 1.1)
65
- zeitwerk (~> 2.1, >= 2.1.8)
65
+ zeitwerk (~> 2.2, >= 2.2.2)
66
66
  appraisal (2.2.0)
67
67
  bundler
68
68
  rake
69
69
  thor (>= 0.14.0)
70
- builder (3.2.3)
71
- byebug (11.0.1)
70
+ builder (3.2.4)
71
+ byebug (11.1.3)
72
72
  coderay (1.1.2)
73
- concurrent-ruby (1.1.5)
73
+ concurrent-ruby (1.1.6)
74
74
  connection_pool (2.2.2)
75
- crass (1.0.4)
75
+ crass (1.0.6)
76
76
  diff-lcs (1.3)
77
77
  erubi (1.9.0)
78
78
  globalid (0.4.2)
79
79
  activesupport (>= 4.2.0)
80
- i18n (1.7.0)
80
+ i18n (1.8.2)
81
81
  concurrent-ruby (~> 1.0)
82
- loofah (2.3.0)
82
+ loofah (2.5.0)
83
83
  crass (~> 1.0.2)
84
84
  nokogiri (>= 1.5.9)
85
85
  mail (2.7.1)
86
86
  mini_mime (>= 0.1.1)
87
87
  marcel (0.3.3)
88
88
  mimemagic (~> 0.3.2)
89
- method_source (0.9.2)
90
- mimemagic (0.3.3)
89
+ method_source (1.0.0)
90
+ mimemagic (0.3.5)
91
91
  mini_mime (1.0.2)
92
92
  mini_portile2 (2.4.0)
93
- minitest (5.12.2)
93
+ minitest (5.14.1)
94
94
  nio4r (2.5.2)
95
- nokogiri (1.10.4)
95
+ nokogiri (1.10.9)
96
96
  mini_portile2 (~> 2.4.0)
97
- pg (1.1.4)
98
- pry (0.12.2)
99
- coderay (~> 1.1.0)
100
- method_source (~> 0.9.0)
101
- pry-byebug (3.7.0)
97
+ pg (1.2.3)
98
+ pry (0.13.1)
99
+ coderay (~> 1.1)
100
+ method_source (~> 1.0)
101
+ pry-byebug (3.9.0)
102
102
  byebug (~> 11.0)
103
- pry (~> 0.10)
104
- rack (2.0.7)
105
- rack-protection (2.0.7)
103
+ pry (~> 0.13.0)
104
+ rack (2.2.2)
105
+ rack-protection (2.0.8.1)
106
106
  rack
107
107
  rack-test (1.1.0)
108
108
  rack (>= 1.0, < 3)
109
- rails (6.0.0)
110
- actioncable (= 6.0.0)
111
- actionmailbox (= 6.0.0)
112
- actionmailer (= 6.0.0)
113
- actionpack (= 6.0.0)
114
- actiontext (= 6.0.0)
115
- actionview (= 6.0.0)
116
- activejob (= 6.0.0)
117
- activemodel (= 6.0.0)
118
- activerecord (= 6.0.0)
119
- activestorage (= 6.0.0)
120
- activesupport (= 6.0.0)
109
+ rails (6.0.3.1)
110
+ actioncable (= 6.0.3.1)
111
+ actionmailbox (= 6.0.3.1)
112
+ actionmailer (= 6.0.3.1)
113
+ actionpack (= 6.0.3.1)
114
+ actiontext (= 6.0.3.1)
115
+ actionview (= 6.0.3.1)
116
+ activejob (= 6.0.3.1)
117
+ activemodel (= 6.0.3.1)
118
+ activerecord (= 6.0.3.1)
119
+ activestorage (= 6.0.3.1)
120
+ activesupport (= 6.0.3.1)
121
121
  bundler (>= 1.3.0)
122
- railties (= 6.0.0)
122
+ railties (= 6.0.3.1)
123
123
  sprockets-rails (>= 2.0.0)
124
124
  rails-dom-testing (2.0.3)
125
125
  activesupport (>= 4.2.0)
126
126
  nokogiri (>= 1.6)
127
127
  rails-html-sanitizer (1.3.0)
128
128
  loofah (~> 2.3)
129
- railties (6.0.0)
130
- actionpack (= 6.0.0)
131
- activesupport (= 6.0.0)
129
+ railties (6.0.3.1)
130
+ actionpack (= 6.0.3.1)
131
+ activesupport (= 6.0.3.1)
132
132
  method_source
133
133
  rake (>= 0.8.7)
134
134
  thor (>= 0.20.3, < 2.0)
135
- rake (13.0.0)
136
- redis (4.1.3)
137
- request_store (1.4.1)
135
+ rake (13.0.1)
136
+ redis (4.1.4)
137
+ request_store (1.5.0)
138
138
  rack (>= 1.4)
139
139
  rspec (3.9.0)
140
140
  rspec-core (~> 3.9.0)
141
141
  rspec-expectations (~> 3.9.0)
142
142
  rspec-mocks (~> 3.9.0)
143
- rspec-core (3.9.0)
144
- rspec-support (~> 3.9.0)
145
- rspec-expectations (3.9.0)
143
+ rspec-core (3.9.2)
144
+ rspec-support (~> 3.9.3)
145
+ rspec-expectations (3.9.2)
146
146
  diff-lcs (>= 1.2.0, < 2.0)
147
147
  rspec-support (~> 3.9.0)
148
- rspec-mocks (3.9.0)
148
+ rspec-mocks (3.9.1)
149
149
  diff-lcs (>= 1.2.0, < 2.0)
150
150
  rspec-support (~> 3.9.0)
151
- rspec-rails (3.9.0)
152
- actionpack (>= 3.0)
153
- activesupport (>= 3.0)
154
- railties (>= 3.0)
155
- rspec-core (~> 3.9.0)
156
- rspec-expectations (~> 3.9.0)
157
- rspec-mocks (~> 3.9.0)
158
- rspec-support (~> 3.9.0)
159
- rspec-support (3.9.0)
160
- sidekiq (6.0.1)
151
+ rspec-rails (4.0.1)
152
+ actionpack (>= 4.2)
153
+ activesupport (>= 4.2)
154
+ railties (>= 4.2)
155
+ rspec-core (~> 3.9)
156
+ rspec-expectations (~> 3.9)
157
+ rspec-mocks (~> 3.9)
158
+ rspec-support (~> 3.9)
159
+ rspec-support (3.9.3)
160
+ sidekiq (6.0.7)
161
161
  connection_pool (>= 2.2.2)
162
- rack (>= 2.0.0)
162
+ rack (~> 2.0)
163
163
  rack-protection (>= 2.0.0)
164
164
  redis (>= 4.1.0)
165
165
  sprockets (4.0.0)
@@ -169,20 +169,20 @@ GEM
169
169
  actionpack (>= 4.0)
170
170
  activesupport (>= 4.0)
171
171
  sprockets (>= 3.0.0)
172
- thor (0.20.3)
172
+ thor (1.0.1)
173
173
  thread_safe (0.3.6)
174
- tzinfo (1.2.5)
174
+ tzinfo (1.2.7)
175
175
  thread_safe (~> 0.1)
176
- websocket-driver (0.7.1)
176
+ websocket-driver (0.7.2)
177
177
  websocket-extensions (>= 0.1.0)
178
178
  websocket-extensions (0.1.4)
179
- zeitwerk (2.2.0)
179
+ zeitwerk (2.3.0)
180
180
 
181
181
  PLATFORMS
182
182
  ruby
183
183
 
184
184
  DEPENDENCIES
185
- activerecord (~> 6.0.0)
185
+ activerecord (~> 6.0.3)
186
186
  activerecord-multi-tenant!
187
187
  appraisal
188
188
  pg
@@ -195,4 +195,4 @@ DEPENDENCIES
195
195
  thor
196
196
 
197
197
  BUNDLED WITH
198
- 1.17.3
198
+ 2.1.4
@@ -8,8 +8,9 @@ gem "i18n", "~> 0.9.5"
8
8
  gem "nokogiri", "~> 1.7.1"
9
9
  gem "nio4r", "~> 2.3.1"
10
10
  gem "sprockets", "~> 3.7.1"
11
- gem "byebug", "~> 9.0.6"
11
+ gem "byebug", "~> 11.0"
12
12
  gem "rake", "12.0.0"
13
13
  gem "redis", "3.3.3"
14
+ gem "pry-byebug", "3.9.0"
14
15
 
15
16
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-multi-tenant (1.0.4)
4
+ activerecord-multi-tenant (1.1.0)
5
5
  rails (>= 4.2)
6
6
  request_store (>= 1.0.5)
7
7
 
@@ -54,42 +54,42 @@ GEM
54
54
  rake
55
55
  thor (>= 0.14.0)
56
56
  arel (9.0.0)
57
- builder (3.2.3)
58
- byebug (9.0.6)
57
+ builder (3.2.4)
58
+ byebug (11.1.3)
59
59
  coderay (1.1.2)
60
- concurrent-ruby (1.1.5)
60
+ concurrent-ruby (1.1.6)
61
61
  connection_pool (2.2.2)
62
- crass (1.0.4)
62
+ crass (1.0.6)
63
63
  diff-lcs (1.3)
64
64
  erubi (1.9.0)
65
65
  globalid (0.4.2)
66
66
  activesupport (>= 4.2.0)
67
67
  i18n (0.9.5)
68
68
  concurrent-ruby (~> 1.0)
69
- loofah (2.3.0)
69
+ loofah (2.5.0)
70
70
  crass (~> 1.0.2)
71
71
  nokogiri (>= 1.5.9)
72
72
  mail (2.7.1)
73
73
  mini_mime (>= 0.1.1)
74
74
  marcel (0.3.3)
75
75
  mimemagic (~> 0.3.2)
76
- method_source (0.9.2)
77
- mimemagic (0.3.3)
76
+ method_source (1.0.0)
77
+ mimemagic (0.3.5)
78
78
  mini_mime (1.0.2)
79
79
  mini_portile2 (2.1.0)
80
- minitest (5.12.2)
80
+ minitest (5.14.1)
81
81
  nio4r (2.3.1)
82
82
  nokogiri (1.7.2)
83
83
  mini_portile2 (~> 2.1.0)
84
- pg (1.1.4)
85
- pry (0.12.2)
86
- coderay (~> 1.1.0)
87
- method_source (~> 0.9.0)
88
- pry-byebug (3.4.3)
89
- byebug (>= 9.0, < 9.1)
90
- pry (~> 0.10)
91
- rack (2.0.7)
92
- rack-protection (2.0.7)
84
+ pg (1.2.3)
85
+ pry (0.13.1)
86
+ coderay (~> 1.1)
87
+ method_source (~> 1.0)
88
+ pry-byebug (3.9.0)
89
+ byebug (~> 11.0)
90
+ pry (~> 0.13.0)
91
+ rack (2.2.2)
92
+ rack-protection (2.0.8.1)
93
93
  rack
94
94
  rack-test (1.1.0)
95
95
  rack (>= 1.0, < 3)
@@ -119,29 +119,29 @@ GEM
119
119
  thor (>= 0.19.0, < 2.0)
120
120
  rake (12.0.0)
121
121
  redis (3.3.3)
122
- request_store (1.4.1)
122
+ request_store (1.5.0)
123
123
  rack (>= 1.4)
124
124
  rspec (3.9.0)
125
125
  rspec-core (~> 3.9.0)
126
126
  rspec-expectations (~> 3.9.0)
127
127
  rspec-mocks (~> 3.9.0)
128
- rspec-core (3.9.0)
129
- rspec-support (~> 3.9.0)
130
- rspec-expectations (3.9.0)
128
+ rspec-core (3.9.2)
129
+ rspec-support (~> 3.9.3)
130
+ rspec-expectations (3.9.2)
131
131
  diff-lcs (>= 1.2.0, < 2.0)
132
132
  rspec-support (~> 3.9.0)
133
- rspec-mocks (3.9.0)
133
+ rspec-mocks (3.9.1)
134
134
  diff-lcs (>= 1.2.0, < 2.0)
135
135
  rspec-support (~> 3.9.0)
136
- rspec-rails (3.9.0)
137
- actionpack (>= 3.0)
138
- activesupport (>= 3.0)
139
- railties (>= 3.0)
140
- rspec-core (~> 3.9.0)
141
- rspec-expectations (~> 3.9.0)
142
- rspec-mocks (~> 3.9.0)
143
- rspec-support (~> 3.9.0)
144
- rspec-support (3.9.0)
136
+ rspec-rails (4.0.1)
137
+ actionpack (>= 4.2)
138
+ activesupport (>= 4.2)
139
+ railties (>= 4.2)
140
+ rspec-core (~> 3.9)
141
+ rspec-expectations (~> 3.9)
142
+ rspec-mocks (~> 3.9)
143
+ rspec-support (~> 3.9)
144
+ rspec-support (3.9.3)
145
145
  sidekiq (5.0.4)
146
146
  concurrent-ruby (~> 1.0)
147
147
  connection_pool (~> 2.2, >= 2.2.0)
@@ -154,11 +154,11 @@ GEM
154
154
  actionpack (>= 4.0)
155
155
  activesupport (>= 4.0)
156
156
  sprockets (>= 3.0.0)
157
- thor (0.20.3)
157
+ thor (1.0.1)
158
158
  thread_safe (0.3.6)
159
- tzinfo (1.2.5)
159
+ tzinfo (1.2.7)
160
160
  thread_safe (~> 0.1)
161
- websocket-driver (0.7.1)
161
+ websocket-driver (0.7.2)
162
162
  websocket-extensions (>= 0.1.0)
163
163
  websocket-extensions (0.1.4)
164
164
 
@@ -168,13 +168,13 @@ PLATFORMS
168
168
  DEPENDENCIES
169
169
  activerecord-multi-tenant!
170
170
  appraisal
171
- byebug (~> 9.0.6)
171
+ byebug (~> 11.0)
172
172
  i18n (~> 0.9.5)
173
173
  nio4r (~> 2.3.1)
174
174
  nokogiri (~> 1.7.1)
175
175
  pg
176
176
  pry
177
- pry-byebug
177
+ pry-byebug (= 3.9.0)
178
178
  rails (~> 5.2.0)
179
179
  rake (= 12.0.0)
180
180
  redis (= 3.3.3)
@@ -185,4 +185,4 @@ DEPENDENCIES
185
185
  thor
186
186
 
187
187
  BUNDLED WITH
188
- 1.17.3
188
+ 2.1.4