phenix 0.5.0 → 1.0.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/version.rb +1 -1
  3. data/lib/phenix.rb +12 -1
  4. metadata +15 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8a6d184cc302af58c4999abc2d14d41581274174852043d3883d8b7d85bde01
4
- data.tar.gz: 8e643a589dc723a08571e7f696e44a3d990679fced72f993e3af550b86fcc226
3
+ metadata.gz: 47a229b6de3443a5e8f572382ab1bb8600a4f1e9383c37f0283fffcd57a087bf
4
+ data.tar.gz: 4251712df756ee74b9caae72353c9f7e0b6aa0a92690b3efa700c9037692d037
5
5
  SHA512:
6
- metadata.gz: eec4e9212932bfdfe45188cdd32b932e256e69882558d9f5d574e78a8e43afbfa637e0a21995b5e0398e6d1b610c226da13d5d4b2228f98a28ff19f72956b2df
7
- data.tar.gz: 324287fd3089d3622d09b2fd44d46cc1009e3e2bb40d9f8e0b145c677efbea8a91fc5670275242f22042fdd549c4fbfeff4fecd3d21941f2d77fb04c3c4f1b30
6
+ metadata.gz: 8b51d7893f9e264814a39c2228d6ac6a4eff7add76727c1d29e61240996dc909bca0de5fdf790b46e31246acb9a90614e024c8625fa7b16cf0f6331c6ea99a3c
7
+ data.tar.gz: af507ea35341614a845082df406d3b040c9fb1b5ca31f5d510677b3194855c4d4bb5f61403dad35c1d68bfbe72c0e10312a20fcf11af5da98ebb9241aedc1887
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Phenix
3
- VERSION = '0.5.0'
3
+ VERSION = '1.0.0'
4
4
  end
data/lib/phenix.rb CHANGED
@@ -64,7 +64,18 @@ module Phenix
64
64
  end
65
65
 
66
66
  def for_each_database
67
- ActiveRecord::Base.configurations.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)
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.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Schambacher
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2021-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,34 +30,34 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '4.2'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '6.0'
36
+ version: '7.1'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '3.2'
43
+ version: '4.2'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '6.0'
46
+ version: '7.1'
47
47
  - !ruby/object:Gem::Dependency
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
@@ -72,20 +72,6 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '3.4'
75
- - !ruby/object:Gem::Dependency
76
- name: wwtd
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: bump
91
77
  requirement: !ruby/object:Gem::Requirement
@@ -128,7 +114,7 @@ dependencies:
128
114
  - - ">="
129
115
  - !ruby/object:Gem::Version
130
116
  version: '0'
131
- description:
117
+ description:
132
118
  email:
133
119
  - pschambacher@zendesk.com
134
120
  executables: []
@@ -140,7 +126,7 @@ files:
140
126
  homepage: https://github.com/zendesk/phenix
141
127
  licenses: []
142
128
  metadata: {}
143
- post_install_message:
129
+ post_install_message:
144
130
  rdoc_options: []
145
131
  require_paths:
146
132
  - lib
@@ -155,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
141
  - !ruby/object:Gem::Version
156
142
  version: '0'
157
143
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 2.7.6
160
- signing_key:
144
+ rubygems_version: 3.1.6
145
+ signing_key:
161
146
  specification_version: 4
162
147
  summary: Read a dynamic database.yml file and allow you to drop/create the database
163
148
  on demand.