active_record_host_pool 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Zendesk
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -10,9 +10,9 @@ never support the concept of one server connection sharing multiple dbs.
10
10
 
11
11
  ## Installation
12
12
 
13
- $ gem install active_record_host_pooling
13
+ $ gem install active_record_host_pool
14
14
 
15
- and make sure to require 'active\_record\_host\_pooling' in some way.
15
+ and make sure to require 'active\_record\_host\_pool' in some way.
16
16
 
17
17
 
18
18
  ## Copyright
@@ -15,6 +15,10 @@ module ActiveRecordHostPool
15
15
  @cx
16
16
  end
17
17
 
18
+ def __setobj__(cx)
19
+ @cx = cx
20
+ end
21
+
18
22
  def unproxied
19
23
  @cx
20
24
  end
@@ -20,6 +20,12 @@ module ActiveRecordHostPool
20
20
  _connection_pool
21
21
  end
22
22
 
23
+ def __setobj__(spec)
24
+ @spec = spec
25
+ @config = spec.config.with_indifferent_access
26
+ end
27
+
28
+
23
29
  def connection(*args)
24
30
  cx = _connection_pool.connection(*args)
25
31
  _connection_proxy_for(cx, @config[:database])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_host_pool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben Osheroff
@@ -15,13 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-02 00:00:00 -07:00
18
+ date: 2011-07-07 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: activerecord
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
26
  - - ~>
@@ -32,12 +31,12 @@ dependencies:
32
31
  - 3
33
32
  - 5
34
33
  version: 2.3.5
34
+ prerelease: false
35
35
  type: :runtime
36
- version_requirements: *id001
36
+ requirement: *id001
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rake
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
42
  - - ">="
@@ -46,12 +45,26 @@ dependencies:
46
45
  segments:
47
46
  - 0
48
47
  version: "0"
48
+ prerelease: false
49
49
  type: :development
50
- version_requirements: *id002
50
+ requirement: *id002
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: bundler
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
53
62
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
63
+ type: :development
64
+ requirement: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: mocha
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
55
68
  none: false
56
69
  requirements:
57
70
  - - ">="
@@ -60,12 +73,42 @@ dependencies:
60
73
  segments:
61
74
  - 0
62
75
  version: "0"
76
+ prerelease: false
63
77
  type: :development
64
- version_requirements: *id003
78
+ requirement: *id004
65
79
  - !ruby/object:Gem::Dependency
66
- name: shoulda
80
+ name: mysql
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
67
90
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
91
+ type: :development
92
+ requirement: *id005
93
+ - !ruby/object:Gem::Dependency
94
+ name: activerecord-jdbcmysql-adapter
95
+ version_requirements: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ hash: 17
101
+ segments:
102
+ - 1
103
+ - 0
104
+ - 3
105
+ version: 1.0.3
106
+ prerelease: false
107
+ type: :development
108
+ requirement: *id006
109
+ - !ruby/object:Gem::Dependency
110
+ name: ruby-debug
111
+ version_requirements: &id007 !ruby/object:Gem::Requirement
69
112
  none: false
70
113
  requirements:
71
114
  - - ">="
@@ -74,12 +117,42 @@ dependencies:
74
117
  segments:
75
118
  - 0
76
119
  version: "0"
120
+ prerelease: false
77
121
  type: :development
78
- version_requirements: *id004
122
+ requirement: *id007
79
123
  - !ruby/object:Gem::Dependency
80
- name: mocha
124
+ name: ruby-debug19
125
+ version_requirements: &id008 !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ hash: 3
131
+ segments:
132
+ - 0
133
+ version: "0"
134
+ prerelease: false
135
+ type: :development
136
+ requirement: *id008
137
+ - !ruby/object:Gem::Dependency
138
+ name: activerecord
139
+ version_requirements: &id009 !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ~>
143
+ - !ruby/object:Gem::Version
144
+ hash: 9
145
+ segments:
146
+ - 2
147
+ - 3
148
+ - 5
149
+ version: 2.3.5
81
150
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
151
+ type: :runtime
152
+ requirement: *id009
153
+ - !ruby/object:Gem::Dependency
154
+ name: rake
155
+ version_requirements: &id010 !ruby/object:Gem::Requirement
83
156
  none: false
84
157
  requirements:
85
158
  - - ">="
@@ -88,12 +161,26 @@ dependencies:
88
161
  segments:
89
162
  - 0
90
163
  version: "0"
164
+ prerelease: false
91
165
  type: :development
92
- version_requirements: *id005
166
+ requirement: *id010
93
167
  - !ruby/object:Gem::Dependency
94
- name: ruby-debug
168
+ name: bundler
169
+ version_requirements: &id011 !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ hash: 3
175
+ segments:
176
+ - 0
177
+ version: "0"
95
178
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
179
+ type: :development
180
+ requirement: *id011
181
+ - !ruby/object:Gem::Dependency
182
+ name: shoulda
183
+ version_requirements: &id012 !ruby/object:Gem::Requirement
97
184
  none: false
98
185
  requirements:
99
186
  - - ">="
@@ -102,8 +189,37 @@ dependencies:
102
189
  segments:
103
190
  - 0
104
191
  version: "0"
192
+ prerelease: false
105
193
  type: :development
106
- version_requirements: *id006
194
+ requirement: *id012
195
+ - !ruby/object:Gem::Dependency
196
+ name: mocha
197
+ version_requirements: &id013 !ruby/object:Gem::Requirement
198
+ none: false
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ hash: 3
203
+ segments:
204
+ - 0
205
+ version: "0"
206
+ prerelease: false
207
+ type: :development
208
+ requirement: *id013
209
+ - !ruby/object:Gem::Dependency
210
+ name: ruby-debug
211
+ version_requirements: &id014 !ruby/object:Gem::Requirement
212
+ none: false
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ hash: 3
217
+ segments:
218
+ - 0
219
+ version: "0"
220
+ prerelease: false
221
+ type: :development
222
+ requirement: *id014
107
223
  description: ""
108
224
  email:
109
225
  - ben@gimbo.net
@@ -111,14 +227,16 @@ executables: []
111
227
 
112
228
  extensions: []
113
229
 
114
- extra_rdoc_files: []
115
-
230
+ extra_rdoc_files:
231
+ - LICENSE
232
+ - README.md
116
233
  files:
234
+ - README.md
235
+ - lib/active_record_host_pool.rb
117
236
  - lib/active_record_host_pool/connection_adapter_mixin.rb
118
237
  - lib/active_record_host_pool/connection_proxy.rb
119
238
  - lib/active_record_host_pool/pool_proxy.rb
120
- - lib/active_record_host_pool.rb
121
- - README.md
239
+ - LICENSE
122
240
  - test/database.yml
123
241
  - test/helper.rb
124
242
  - test/schema.rb