rails_multisite 1.0.6 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails_multisite might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0faafc90d07852a9892bfee2c81ffdaa84ac1e8
4
- data.tar.gz: 7f087117db291104d5f4f614e5ceecba7fb911fc
3
+ metadata.gz: 958eecb6498ade6f581642320bf1e23c84dbc0ba
4
+ data.tar.gz: ed8b705c788f25a4d937aec1bae318e70aab7a12
5
5
  SHA512:
6
- metadata.gz: f184be2f2f9114524b75bd72be7def4880ec925c32f961c0a7a8bd3e8bc6430adf5e49bca58e954c5997b612bf1c1d6a9ab3f5c2018d26c07e208b7f537ac6d4
7
- data.tar.gz: c5754cd46b5fba345ff8fd1f4a7cc7a1c2b3ba46830c65d3090a761532df663ba3a6a6b0b42e74ea82b564c9cbb983a6aef1cc0af14c9a54e24ee775693d4cbc
6
+ metadata.gz: de54734d1edddcb516525bcd55b4906fc71c85a7a0e00832c7d88abe247ad2cffa98268c926c09600309633b13296e844f8eb7d86905c188558c8e0da9bf6940
7
+ data.tar.gz: 7d1ca0c110e48f18e99a31997ed6f4ba93f28629163e9f56753d3bc7e9d12620168add8af264fbfd5aba1b919c22dedca1da85758a924066bb7c5d13175190a0
@@ -24,13 +24,13 @@ module RailsMultisite
24
24
  handler = @@connection_handlers[spec]
25
25
  unless handler
26
26
  handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
27
- handler.establish_connection(ActiveRecord::Base, spec)
27
+ self.handler_establish_connection(handler, spec)
28
28
  @@connection_handlers[spec] = handler
29
29
  end
30
30
  else
31
31
  handler = @@default_connection_handler
32
32
  if !@@established_default
33
- handler.establish_connection(ActiveRecord::Base, spec)
33
+ self.handler_establish_connection(handler, spec)
34
34
  @@established_default = true
35
35
  end
36
36
  end
@@ -237,5 +237,15 @@ module RailsMultisite
237
237
  end
238
238
  end
239
239
 
240
+ private
241
+
242
+ def self.handler_establish_connection(handler, spec)
243
+ if Rails::VERSION::MAJOR >= 5
244
+ handler.establish_connection(spec.config)
245
+ else
246
+ handler.establish_connection(ActiveRecord::Base, spec)
247
+ end
248
+ end
249
+
240
250
  end
241
251
  end
@@ -1,3 +1,3 @@
1
1
  module RailsMultisite
2
- VERSION = "1.0.6"
2
+ VERSION = "1.1.0.rc1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_multisite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2017-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5'
22
+ version: '6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5'
32
+ version: '6'
33
33
  description: Multi tenancy support for Rails
34
34
  email:
35
35
  - sam.saffron@gmail.com
@@ -60,12 +60,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - ">="
63
+ - - ">"
64
64
  - !ruby/object:Gem::Version
65
- version: '0'
65
+ version: 1.3.1
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 2.5.2
68
+ rubygems_version: 2.6.11
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: Multi tenancy support for Rails