dbhijacker 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 534c79458c53e9f6cd0a858a830ca956aa4589de
4
- data.tar.gz: 1a99b7b0f639f24b99a834b390031ee15c3d2508
3
+ metadata.gz: 966aefde0da55519c0a6f7138a3fe37fcffd82bd
4
+ data.tar.gz: 64dd3131653b3bf6bcae3ada058526bb0b952929
5
5
  SHA512:
6
- metadata.gz: 9185d392c8d2d3451fa3a693cac9e44a53dbffbecf67b2b57cba763f5894c6ab68463cc87a04a15120f339dc4d41b04610d95dd4c0725d8c0dff70876b592ce5
7
- data.tar.gz: 2e4e921fdcd69cf7d058664b0cf553138e6557a409c3619e234c0c58045d1278b111f5f94827383368ec6638332ea5eb5e99ce21520869a5e226b209d02aca72
6
+ metadata.gz: 79b6c3859bbd2d26dffc9f97a2a93c29df41d6588b41a8e19a25fcfb76de7849c323f73a5f1ef345662c79de5ab999367070358c5c2ecc92b93d0a8763b6c79b
7
+ data.tar.gz: cfaa5431f940684f06da86d316a9197591c0a72a04289a2681a54b87e0316de63d4ad98a1b8e4ffd2f29280bf3ed2de7fefd658c4ac481ef132a01c3cb8a8763
data/dbhijacker.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.10.0"
6
+ s.version = "0.10.1"
7
7
 
8
8
  s.license = "MIT"
9
9
 
@@ -20,7 +20,7 @@ module Hijacker::ControllerMethods
20
20
  # Returns 2-member array of the main database to connect to, and the sister
21
21
  # (sister will be nil if no master is found, which means we are on the master).
22
22
  def determine_databases
23
- Hijacker::RequestParser.new(request.env).determine_databases
23
+ Hijacker::RequestParser.from_request(request).determine_databases
24
24
  end
25
25
 
26
26
  def render_invalid_db
@@ -39,7 +39,7 @@ module Hijacker
39
39
  if client = env[HEADER_KEY]
40
40
  Hijacker::Database.find_master_and_sister_for(client)
41
41
  else
42
- RequestParser.new(env).determine_databases
42
+ RequestParser.from_env(env).determine_databases
43
43
  end
44
44
  end
45
45
  end
data/lib/hijacker.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'hijacker/active_record_ext'
2
- require 'hijacker/request_parser'
1
+ require_relative './hijacker/active_record_ext'
2
+ require_relative './hijacker/request_parser'
3
3
  require 'active_record'
4
4
  require 'action_controller'
5
5
  require 'set'
@@ -252,8 +252,8 @@ private
252
252
  end
253
253
  end
254
254
 
255
- require 'hijacker/database'
256
- require 'hijacker/alias'
257
- require 'hijacker/host'
258
- require 'hijacker/middleware'
259
- require 'hijacker/controller_methods'
255
+ require_relative './hijacker/database'
256
+ require_relative './hijacker/alias'
257
+ require_relative './hijacker/host'
258
+ require_relative './hijacker/middleware'
259
+ require_relative './hijacker/controller_methods'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbhijacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Xavier