dbhijacker 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dbhijacker (0.5.2)
4
+ dbhijacker (0.6.0)
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.2"
6
+ s.version = "0.6.0"
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"]
@@ -61,14 +61,9 @@ Gem::Specification.new do |s|
61
61
  spec/spec_helper.rb
62
62
  }
63
63
 
64
- if s.respond_to? :specification_version then
64
+ if s.respond_to?(:specification_version)
65
65
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
66
66
  s.specification_version = 3
67
-
68
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
69
- else
70
- end
71
- else
72
67
  end
73
68
  end
74
69
 
@@ -36,7 +36,8 @@ module Hijacker::ControllerMethods
36
36
  end
37
37
 
38
38
  def render_invalid_db
39
- render :text => "You do not appear to have an account with us (#{request.host})"
39
+ render :text => "You do not appear to have an account with us (#{request.host})",
40
+ :status => 404
40
41
  end
41
42
  end
42
43
  end
data/lib/hijacker.rb CHANGED
@@ -87,9 +87,7 @@ module Hijacker
87
87
 
88
88
  @host_connections ||= {}
89
89
 
90
- aliases = Hijacker::Alias.all(:select => :name).map(&:name)
91
-
92
- existing_dbs = Host.all.inject(Set.new(aliases)) do |acc, host|
90
+ existing_dbs = Host.all.inject(Set.new) do |acc, host|
93
91
  @host_connections[host.hostname] ||= Mysql2::Client.new(root_config.merge('host' => host.hostname))
94
92
  @host_connections[host.hostname].query("SHOW DATABASES").each do |row|
95
93
  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: 15
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
9
- - 2
10
- version: 0.5.2
8
+ - 6
9
+ - 0
10
+ version: 0.6.0
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.17
198
+ rubygems_version: 1.8.24
199
199
  signing_key:
200
200
  specification_version: 3
201
201
  summary: One application, multiple client databases