db-switch 0.2.0 → 0.2.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: 349594e5e378fb58e5c4d22c352218c7da091c91
4
- data.tar.gz: d01d7d462e99fe60d5bafcb982e42ce8e0022f13
3
+ metadata.gz: c65ba4f5b420e3e8cc86652c8608e65cc3175505
4
+ data.tar.gz: b5d1448c673c7448ce5b979cdc703103b7faa9b5
5
5
  SHA512:
6
- metadata.gz: b4db0e07aebed82b9a6288ca55900f062c39a4d8d848e2c3de52d9cb3bbf63bdc262c68d5ae0cc81799854e787436825989a5a987cf01e190f77623a9ce9aa5e
7
- data.tar.gz: bb4edc848a5eec04b88a5f5b9959d90da1b5699df578ad3ef82e063184ec4fbee859e88039758f7becdca6705c61c27eaca756762ccd1a3e4492c2613e0cf078
6
+ metadata.gz: 63e17f88dfbcc98f01910baaebd71f833e75475c0fca01d1d79c9c77a9eaf086b758390a4aab9430a81e3c404abe5e792019ad17d1bd9cabcab335615478a637
7
+ data.tar.gz: c42fce42ef334723335254aad66be169b059b02f3eb1d8474044965a77aafb5fd96ca3cc2794df7acc0a312b61bb4cf766c1d7985e0eed1b3fbb480fba694812
@@ -7,7 +7,7 @@ module DbSwitch
7
7
  if ActiveRecord::Base.connection_handler.connected?(connection_name.to_s).nil?
8
8
  db_config =
9
9
  ActiveRecord::Base.configurations[connection_name.to_s] ||
10
- connection_configurations[connection_name.to_s]
10
+ Rails.application.config.database_configuration[connection_name.to_s]
11
11
 
12
12
  if db_config && db_config[Rails.env.to_s]
13
13
  spec =
@@ -30,9 +30,5 @@ module DbSwitch
30
30
  def connection_specification_name
31
31
  db_switch_connection_name || super
32
32
  end
33
-
34
- def connection_configurations
35
- @connection_configurations ||= YAML.load_file(Rails.root.join('config/database.yml'))
36
- end
37
33
  end
38
34
  end
@@ -1,3 +1,3 @@
1
1
  module DbSwitch
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-switch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anjlab