stormtroopers 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,7 +41,9 @@ module Stormtroopers
41
41
  ensure
42
42
  if defined?(::Mongoid)
43
43
  ::Mongoid::IdentityMap.clear
44
- ::Mongoid.session(:default).disconnect
44
+ ::Mongoid.sessions.keys.each do |session_name|
45
+ ::Mongoid.session(session_name).disconnect
46
+ end
45
47
  end
46
48
  end
47
49
  end
@@ -1,3 +1,3 @@
1
1
  module Stormtroopers
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -94,6 +94,7 @@ describe Stormtroopers::Army do
94
94
  stub_const("Mongoid::IdentityMap", Class.new)
95
95
  Mongoid::IdentityMap.should_receive(:clear)
96
96
  mongoid_session = stub
97
+ Mongoid.should_receive(:sessions).and_return({default: mongoid_session})
97
98
  Mongoid.should_receive(:session).with(:default).and_return(mongoid_session)
98
99
  mongoid_session.should_receive(:disconnect)
99
100
  trooper = mock
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stormtroopers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-22 00:00:00.000000000 Z
13
+ date: 2012-11-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -110,12 +110,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  - - ! '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
+ segments:
114
+ - 0
115
+ hash: -456344668358757306
113
116
  required_rubygems_version: !ruby/object:Gem::Requirement
114
117
  none: false
115
118
  requirements:
116
119
  - - ! '>='
117
120
  - !ruby/object:Gem::Version
118
121
  version: '0'
122
+ segments:
123
+ - 0
124
+ hash: -456344668358757306
119
125
  requirements: []
120
126
  rubyforge_project:
121
127
  rubygems_version: 1.8.24
@@ -129,4 +135,3 @@ test_files:
129
135
  - spec/stormtroopers/manager_spec.rb
130
136
  - spec/stormtroopers/trooper/delayed_job_spec.rb
131
137
  - spec/stormtroopers/trooper_spec.rb
132
- has_rdoc: