dbhijacker 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c90889f2261a0bc334b4f397386a14f0830f8072
4
+ data.tar.gz: c568919019f38132fe1e1bff68c3f48d1aecd8d9
5
+ SHA512:
6
+ metadata.gz: 3f6808340f674aaa39808b9daa78709a0f9e818dfde021013d94809a6c5a192fb1680ecb46016896cae8c5e2d36b9a150f69f7d8ef6fa36a9f28d4d81b37ae69
7
+ data.tar.gz: e880f040e50e4c0791055df860034070a0920dc65724f7eb904db4a877bcb8934eb7e5a7bda03594847bcd7e0203bda8747ee6b74324b529b449de2e77b7fdce
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dbhijacker (0.9.1)
4
+ dbhijacker (0.9.2)
5
5
  rails (>= 2.3.14)
6
6
 
7
7
  GEM
@@ -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.9.1"
6
+ s.version = "0.9.2"
7
7
 
8
8
  s.license = "MIT"
9
9
 
@@ -41,6 +41,7 @@ module Hijacker
41
41
  sister_name = sister_name.downcase unless sister_name.nil?
42
42
 
43
43
  if already_connected?(target_name, sister_name)
44
+ run_after_hijack_callback
44
45
  return "Already connected to #{target_name}"
45
46
  end
46
47
 
@@ -66,7 +67,7 @@ module Hijacker
66
67
 
67
68
  reenable_query_caching
68
69
 
69
- self.config[:after_hijack].call if self.config[:after_hijack]
70
+ run_after_hijack_callback
70
71
  rescue
71
72
  if original_database.present?
72
73
  establish_connection_to_database(original_database)
@@ -240,6 +241,10 @@ private
240
241
  'host' => hostname,
241
242
  'port' => port)
242
243
  end
244
+
245
+ def self.run_after_hijack_callback
246
+ config[:after_hijack].call if config[:after_hijack]
247
+ end
243
248
  end
244
249
 
245
250
  require 'hijacker/database'
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbhijacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
5
- prerelease:
4
+ version: 0.9.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Xavier
@@ -16,113 +15,99 @@ dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rails
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: 2.3.14
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: 2.3.14
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: bundler
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - '>='
38
34
  - !ruby/object:Gem::Version
39
35
  version: '1.3'
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - '>='
46
41
  - !ruby/object:Gem::Version
47
42
  version: '1.3'
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: rake
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: 0.9.2
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: 0.9.2
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: rack-test
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - '>='
70
62
  - !ruby/object:Gem::Version
71
63
  version: 0.6.1
72
64
  type: :development
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - '>='
78
69
  - !ruby/object:Gem::Version
79
70
  version: 0.6.1
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: rack
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
- - - ! '>='
75
+ - - '>='
86
76
  - !ruby/object:Gem::Version
87
77
  version: 1.1.0
88
78
  type: :development
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
- - - ! '>='
82
+ - - '>='
94
83
  - !ruby/object:Gem::Version
95
84
  version: 1.1.0
96
85
  - !ruby/object:Gem::Dependency
97
86
  name: rspec
98
87
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
88
  requirements:
101
- - - ! '>='
89
+ - - '>='
102
90
  - !ruby/object:Gem::Version
103
91
  version: '2.8'
104
92
  type: :development
105
93
  prerelease: false
106
94
  version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
95
  requirements:
109
- - - ! '>='
96
+ - - '>='
110
97
  - !ruby/object:Gem::Version
111
98
  version: '2.8'
112
99
  - !ruby/object:Gem::Dependency
113
100
  name: sqlite3
114
101
  requirement: !ruby/object:Gem::Requirement
115
- none: false
116
102
  requirements:
117
- - - ! '>='
103
+ - - '>='
118
104
  - !ruby/object:Gem::Version
119
105
  version: 1.3.5
120
106
  type: :development
121
107
  prerelease: false
122
108
  version_requirements: !ruby/object:Gem::Requirement
123
- none: false
124
109
  requirements:
125
- - - ! '>='
110
+ - - '>='
126
111
  - !ruby/object:Gem::Version
127
112
  version: 1.3.5
128
113
  description: Allows a single Rails appliation to access many different databases
@@ -157,28 +142,27 @@ files:
157
142
  homepage: https://github.com/crystalcommerce/hijacker
158
143
  licenses:
159
144
  - MIT
145
+ metadata: {}
160
146
  post_install_message:
161
147
  rdoc_options:
162
148
  - --charset=UTF-8
163
149
  require_paths:
164
150
  - lib
165
151
  required_ruby_version: !ruby/object:Gem::Requirement
166
- none: false
167
152
  requirements:
168
- - - ! '>='
153
+ - - '>='
169
154
  - !ruby/object:Gem::Version
170
155
  version: '0'
171
156
  required_rubygems_version: !ruby/object:Gem::Requirement
172
- none: false
173
157
  requirements:
174
- - - ! '>='
158
+ - - '>='
175
159
  - !ruby/object:Gem::Version
176
160
  version: '0'
177
161
  requirements: []
178
162
  rubyforge_project:
179
- rubygems_version: 1.8.25
163
+ rubygems_version: 2.0.3
180
164
  signing_key:
181
- specification_version: 3
165
+ specification_version: 4
182
166
  summary: One application, multiple client databases
183
167
  test_files:
184
168
  - spec/hijacker/alias_spec.rb