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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tasks/db.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8abf7748fc2f2f9425e4d63c7656593de7fb889b
4
- data.tar.gz: 4a30a774c669bcc6493213269ec75b770ab1b579
3
+ metadata.gz: ea154aecfe4a0ae8ae9975253ba9d140568caacf
4
+ data.tar.gz: ab4746847692403c025bd15ec1cc2480ca3dc3a8
5
5
  SHA512:
6
- metadata.gz: 833c3994a6603bf1cb55f78d9432d67459c54274017dc33ea4c19ed1e48dd67772f3c036ff0f9e951a188896c93c2f890491c703fe6d6b5a91b22ca2a25e41e0
7
- data.tar.gz: a2725c132f67375b5c7e955f4da020dd4efb31c14ef5dff07a91f928f4f28aaae176f189252e1a5c7dfc08d8ae43ceceb391ab94ee9b2b5a535aaccc99463e86
6
+ metadata.gz: 538855b9cdd6658d21054e37d00489f6518210fb2641a6acb38bf12a13baaa2baa84fae5bf76ec17a5e2970b72ff19c8bf0b439481f8848599062092c25bb37d
7
+ data.tar.gz: ed4b7536727c1e151841ea72426fff431e7709813dd1160e7f6a54441af1e6b6fe5ff2c33411df874004896f3e58e6aa6c4b27f2c8ebc52c93dfcc41e0d17307
@@ -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].clone
57
+ config = HashWithIndifferentAccess.new Rails.configuration.database_configuration[config_name]
58
58
  else
59
- config = ActiveRecord::Base.connection_config.clone
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.clone
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
- next if k==:password
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.0
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-02-27 00:00:00.000000000 Z
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.