db-evolve 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tasks/db.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea154aecfe4a0ae8ae9975253ba9d140568caacf
|
4
|
+
data.tar.gz: ab4746847692403c025bd15ec1cc2480ca3dc3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 538855b9cdd6658d21054e37d00489f6518210fb2641a6acb38bf12a13baaa2baa84fae5bf76ec17a5e2970b72ff19c8bf0b439481f8848599062092c25bb37d
|
7
|
+
data.tar.gz: ed4b7536727c1e151841ea72426fff431e7709813dd1160e7f6a54441af1e6b6fe5ff2c33411df874004896f3e58e6aa6c4b27f2c8ebc52c93dfcc41e0d17307
|
data/lib/tasks/db.rb
CHANGED
@@ -54,16 +54,16 @@ def build_real_connection_config to_exec: false, noop: false
|
|
54
54
|
if to_exec
|
55
55
|
config_name = "#{Rails.env}_dbevolve"
|
56
56
|
if Rails.configuration.database_configuration[config_name].present?
|
57
|
-
config = Rails.configuration.database_configuration[config_name]
|
57
|
+
config = HashWithIndifferentAccess.new Rails.configuration.database_configuration[config_name]
|
58
58
|
else
|
59
|
-
config = ActiveRecord::Base.connection_config
|
59
|
+
config = HashWithIndifferentAccess.new ActiveRecord::Base.connection_config
|
60
60
|
unless $i_nagged || noop || Rails.env=='development'
|
61
61
|
puts "Your database.yml file does not contain an entry for '#{config_name}', so we're using '#{Rails.env}'. This works if your database user has permission to edit your schema, but this is not recommended outside of development. For more information visit: https://github.com/keredson/ruby-db-evolve/blob/master/README.md#schema-change-permissions"
|
62
62
|
$i_nagged = true
|
63
63
|
end
|
64
64
|
end
|
65
65
|
else
|
66
|
-
config = ActiveRecord::Base.connection_config
|
66
|
+
config = HashWithIndifferentAccess.new ActiveRecord::Base.connection_config
|
67
67
|
end
|
68
68
|
config.delete(:adapter)
|
69
69
|
config.delete(:pool)
|
@@ -130,7 +130,7 @@ def do_evolve(noop, yes, nowait)
|
|
130
130
|
config = build_real_connection_config to_exec: true
|
131
131
|
puts "Connecting to database:"
|
132
132
|
config.each do |k,v|
|
133
|
-
|
133
|
+
v = "*" * v.length if k.present? && k.to_s=='password'
|
134
134
|
puts "\t#{k} => #{v}"
|
135
135
|
end
|
136
136
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db-evolve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Anderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A diff/patch-esque tool to replace schema migrations in Ruby. See https://github.com/keredson/ruby-db-evolve
|
14
14
|
for details.
|