phenix 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/phenix.rb +12 -1
  3. data/lib/phenix/version.rb +1 -1
  4. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73bb5edaaa17d3a48ce97375413dea59b21592f08cb6dd2ae5219157d0911416
4
- data.tar.gz: 056cc514c7c85c06fd834474e2c0fd5e46c1f8a2a37ca8c7e1519809b08259b3
3
+ metadata.gz: 6579c2a43b814939fee5b7be5aaa1e4ab6e316b3c4e9dc735500c033bf4d43cb
4
+ data.tar.gz: d76b5c29e32c18bec0ba0e17a6e0c3a907db937c8bbaac7dcce469c754107893
5
5
  SHA512:
6
- metadata.gz: 33a7b5200cf40a397f382a8bd1311137a60ef41b06cb06f97c207bb523656484a21be4014608dbf3b09d1bbc5a62a0f12eba32f17a95effea09d78dc0d498a76
7
- data.tar.gz: 48bad380b3ecc342a804f16e4029e69a774e00bb30319db9fd13c31cc6d15da9b10f9f133ffa51dd6ac57c7e6166f29904b80598020e324f6ff02d8f805d364b
6
+ metadata.gz: 244b06ae752cfefdb33c15b2dd013950aed5d05c31ba651d8aba36aab319390e8f4e1853b0ee56f13a3095c2f908c00f3433f459d0945fd9ca4e4fddfe829fae
7
+ data.tar.gz: 1032af97f7da4fd21c98b1fb8dbd50f8a9b85597dbe23f5c973394b0f41f5c01dc30ed3af2e8e68d6fd83bdac79de34027abf436832460dbd6b0674773be096f
@@ -64,7 +64,18 @@ module Phenix
64
64
  end
65
65
 
66
66
  def for_each_database
67
- ActiveRecord::Base.configurations.to_h.each do |name, conf|
67
+ configuration_hashes = if ActiveRecord::VERSION::STRING < '6.1'
68
+ ActiveRecord::Base.configurations.to_h
69
+ else
70
+ # We need to get all the configurations and put them back into a hash
71
+ # indexed by the env_name and with configuration_hash as the value.
72
+ ActiveRecord::Base.configurations
73
+ .configurations
74
+ .map { |c| [c.env_name, c.configuration_hash.with_indifferent_access] }
75
+ .to_h
76
+ end
77
+
78
+ configuration_hashes.each do |name, conf|
68
79
  next if conf['database'].nil?
69
80
  next if Phenix.skip_database.call(name, conf)
70
81
  yield(name, conf)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Phenix
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phenix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Schambacher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-03 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -48,16 +48,16 @@ dependencies:
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '10.5'
53
+ version: 12.3.3
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '10.5'
60
+ version: 12.3.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  requirements: []
158
- rubygems_version: 3.0.3
158
+ rubygems_version: 3.1.2
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Read a dynamic database.yml file and allow you to drop/create the database