toughguy 0.2.8 → 0.2.9

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: 455afb848105f624c48c038bb7f4861ee4ab430a
4
- data.tar.gz: b1cc52e6b73deaf3bd3f68ba30cbe77a3797f6ce
3
+ metadata.gz: 9f7ad533d184cf0ee760d74f327c2b525f49a867
4
+ data.tar.gz: 8abc273c731560967c174fba47213223a4144aef
5
5
  SHA512:
6
- metadata.gz: 18fd76232d199c8b41dc67327f65b0f2abab1c35b3378a53f4145ee14c9ee8946c0734282c48147ecc4bbd2890c6abc1e807fe841129032c640717a4ebe40bbe
7
- data.tar.gz: 70a115cd1c20335aff0109f12aa56e4b37d82878a06304ecb61dddc57549d418e529a440db3119922986dd92febb5ef5397e6f1e517074e94425d144cdaba28d
6
+ metadata.gz: 0e6a0a11a74e266c5d3edd012da73b82180efcc0e28b401b16006c6d6fa5eb8db6cda0bf2e21d10cd62262f59bce8fd0b1b2d453b49f39e776fab1b466c8d7d2
7
+ data.tar.gz: fce220d63891f62e72c6441304711408e77779ab4047de1a198b9d7dce811629ad2cedfdae13a045ee1532757eaeb2b2c5eb67d3392d2c4098c995670cd14c00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- toughguy (0.2.8)
4
+ toughguy (0.2.9)
5
5
  assistance (= 0.1.5)
6
6
  bson_ext (>= 1.8.0)
7
7
  mongo (>= 1.8.0)
@@ -282,10 +282,13 @@ module ToughGuy
282
282
  def database=(db)
283
283
  db = connection[db] if db.is_a?(String)
284
284
  @database = db
285
+ @connection = db.connection if db
285
286
  # update also for specialized model classes
286
287
  if self == ToughGuy::Model
287
- ToughGuy::MappedModel.database = db
288
- ToughGuy::SingletonModel.database = db
288
+ ToughGuy::MappedModel.database = @database
289
+ ToughGuy::MappedModel.connection = @connection
290
+ ToughGuy::SingletonModel.database = @database
291
+ ToughGuy::SingletonModel.connection = @connection
289
292
  end
290
293
  end
291
294
 
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module ToughGuy
3
- VERSION = '0.2.8'
3
+ VERSION = '0.2.9'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toughguy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner