dbhijacker 0.5.1 → 0.5.2

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dbhijacker (0.4.7)
4
+ dbhijacker (0.5.2)
5
5
  rails (~> 2.3.14)
6
6
 
7
7
  GEM
data/hijacker.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{dbhijacker}
5
5
  s.homepage = "https://github.com/crystalcommerce/hijacker"
6
- s.version = "0.5.1"
6
+ s.version = "0.5.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Michael Xavier", "Donald Plummer", "Woody Peterson"]
data/lib/hijacker.rb CHANGED
@@ -87,7 +87,9 @@ module Hijacker
87
87
 
88
88
  @host_connections ||= {}
89
89
 
90
- existing_dbs = Host.all.inject(Set.new) do |acc, host|
90
+ aliases = Hijacker::Alias.all(:select => :name).map(&:name)
91
+
92
+ existing_dbs = Host.all.inject(Set.new(aliases)) do |acc, host|
91
93
  @host_connections[host.hostname] ||= Mysql2::Client.new(root_config.merge('host' => host.hostname))
92
94
  @host_connections[host.hostname].query("SHOW DATABASES").each do |row|
93
95
  acc << row['Database']
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbhijacker
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Xavier
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  requirements: []
196
196
 
197
197
  rubyforge_project:
198
- rubygems_version: 1.8.24
198
+ rubygems_version: 1.8.17
199
199
  signing_key:
200
200
  specification_version: 3
201
201
  summary: One application, multiple client databases