cucumber-rails 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber-rails (1.0.3)
4
+ cucumber-rails (1.0.4)
5
5
  capybara (>= 1.1.1)
6
6
  cucumber (~> 1.0.4)
7
7
  nokogiri (>= 1.5.0)
@@ -48,7 +48,7 @@ GEM
48
48
  rspec (>= 2.6.0)
49
49
  bcat (0.6.1)
50
50
  rack (~> 1.0)
51
- bcrypt-ruby (3.0.0)
51
+ bcrypt-ruby (3.0.1)
52
52
  bson (1.3.1)
53
53
  bson_ext (1.3.1)
54
54
  builder (3.0.0)
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [v1.0.4](https://github.com/cucumber/cucumber-rails/compare/v1.0.3...v1.0.4)
2
+
3
+ ### Bugfixes
4
+ * Active_record hook prevents features that access multiple database from running correctly ([#152](https://github.com/cucumber/cucumber-rails/issues/152) winnipegtransit)
5
+
1
6
  ## [v1.0.3](https://github.com/cucumber/cucumber-rails/compare/v1.0.2...v1.0.3)
2
7
 
3
8
  ### Bugfixes
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'cucumber-rails'
6
- s.version = '1.0.3'
6
+ s.version = '1.0.4'
7
7
  s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
8
8
  s.description = "Cucumber Generators and Runtime for Rails"
9
9
  s.summary = "#{s.name}-#{s.version}"
@@ -1,21 +1,27 @@
1
1
  if defined?(ActiveRecord::Base)
2
2
  class ActiveRecord::Base
3
- mattr_accessor :shared_connection
4
- @@shared_connection = nil
3
+ class_inheritable_accessor :shared_connection
5
4
 
6
5
  def self.connection
7
- @@shared_connection || retrieve_connection
6
+ self.shared_connection || retrieve_connection
8
7
  end
9
8
  end
10
-
9
+
11
10
  Before('@javascript') do
12
- # Forces all threads to share the same connection. This works on
13
- # Capybara because it starts the web server in a thread.
14
- ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
15
- end
11
+ # Forces all threads to share a connection on a per-model basis,
12
+ # as connections may vary per model as per establish_connection. This works
13
+ # on Capybara because it starts the web server in a thread.
14
+ ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
15
+ ActiveRecord::Base.descendants.each do |model|
16
+ model.shared_connection = model.connection
17
+ end
18
+ end
16
19
 
17
20
  Before('~@javascript') do
18
21
  # Do not use a shared connection unless we're in a @javascript scenario
19
22
  ActiveRecord::Base.shared_connection = nil
23
+ ActiveRecord::Base.descendants.each do |model|
24
+ model.shared_connection = nil
25
+ end
20
26
  end
21
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-09-11 00:00:00.000000000Z
14
+ date: 2011-09-12 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cucumber
18
- requirement: &2151850700 !ruby/object:Gem::Requirement
18
+ requirement: &2151828760 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 1.0.4
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2151850700
26
+ version_requirements: *2151828760
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
- requirement: &2151848220 !ruby/object:Gem::Requirement
29
+ requirement: &2151827200 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 1.5.0
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2151848220
37
+ version_requirements: *2151827200
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: capybara
40
- requirement: &2151846400 !ruby/object:Gem::Requirement
40
+ requirement: &2151826220 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 1.1.1
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2151846400
48
+ version_requirements: *2151826220
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: rails
51
- requirement: &2151844080 !ruby/object:Gem::Requirement
51
+ requirement: &2151824820 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 3.1.0
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *2151844080
59
+ version_requirements: *2151824820
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rake
62
- requirement: &2151842620 !ruby/object:Gem::Requirement
62
+ requirement: &2151823540 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 0.9.2
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *2151842620
70
+ version_requirements: *2151823540
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: bundler
73
- requirement: &2151841480 !ruby/object:Gem::Requirement
73
+ requirement: &2151821900 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 1.0.18
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2151841480
81
+ version_requirements: *2151821900
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: aruba
84
- requirement: &2151840620 !ruby/object:Gem::Requirement
84
+ requirement: &2151819900 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: 0.4.6
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *2151840620
92
+ version_requirements: *2151819900
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: sqlite3
95
- requirement: &2151839400 !ruby/object:Gem::Requirement
95
+ requirement: &2151818440 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: 1.3.4
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *2151839400
103
+ version_requirements: *2151818440
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: rspec
106
- requirement: &2151838600 !ruby/object:Gem::Requirement
106
+ requirement: &2151817480 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: 2.6.0
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2151838600
114
+ version_requirements: *2151817480
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rspec-rails
117
- requirement: &2151837880 !ruby/object:Gem::Requirement
117
+ requirement: &2151816760 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: 2.6.1
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *2151837880
125
+ version_requirements: *2151816760
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: factory_girl
128
- requirement: &2151836780 !ruby/object:Gem::Requirement
128
+ requirement: &2151816040 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: 2.1.0
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *2151836780
136
+ version_requirements: *2151816040
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: database_cleaner
139
- requirement: &2151835760 !ruby/object:Gem::Requirement
139
+ requirement: &2151815120 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,10 +144,10 @@ dependencies:
144
144
  version: 0.6.7
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *2151835760
147
+ version_requirements: *2151815120
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: mongoid
150
- requirement: &2151834580 !ruby/object:Gem::Requirement
150
+ requirement: &2151814420 !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
153
153
  - - ! '>='
@@ -155,10 +155,10 @@ dependencies:
155
155
  version: 2.2.0
156
156
  type: :development
157
157
  prerelease: false
158
- version_requirements: *2151834580
158
+ version_requirements: *2151814420
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: bson_ext
161
- requirement: &2151833620 !ruby/object:Gem::Requirement
161
+ requirement: &2151813820 !ruby/object:Gem::Requirement
162
162
  none: false
163
163
  requirements:
164
164
  - - ! '>='
@@ -166,10 +166,10 @@ dependencies:
166
166
  version: 1.3.1
167
167
  type: :development
168
168
  prerelease: false
169
- version_requirements: *2151833620
169
+ version_requirements: *2151813820
170
170
  - !ruby/object:Gem::Dependency
171
171
  name: turn
172
- requirement: &2151832380 !ruby/object:Gem::Requirement
172
+ requirement: &2151812700 !ruby/object:Gem::Requirement
173
173
  none: false
174
174
  requirements:
175
175
  - - ! '>='
@@ -177,10 +177,10 @@ dependencies:
177
177
  version: 0.8.2
178
178
  type: :development
179
179
  prerelease: false
180
- version_requirements: *2151832380
180
+ version_requirements: *2151812700
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: sass
183
- requirement: &2151831520 !ruby/object:Gem::Requirement
183
+ requirement: &2151811680 !ruby/object:Gem::Requirement
184
184
  none: false
185
185
  requirements:
186
186
  - - ! '>='
@@ -188,10 +188,10 @@ dependencies:
188
188
  version: 3.1.7
189
189
  type: :development
190
190
  prerelease: false
191
- version_requirements: *2151831520
191
+ version_requirements: *2151811680
192
192
  - !ruby/object:Gem::Dependency
193
193
  name: coffee-script
194
- requirement: &2151830520 !ruby/object:Gem::Requirement
194
+ requirement: &2151810780 !ruby/object:Gem::Requirement
195
195
  none: false
196
196
  requirements:
197
197
  - - ! '>='
@@ -199,10 +199,10 @@ dependencies:
199
199
  version: 2.2.0
200
200
  type: :development
201
201
  prerelease: false
202
- version_requirements: *2151830520
202
+ version_requirements: *2151810780
203
203
  - !ruby/object:Gem::Dependency
204
204
  name: uglifier
205
- requirement: &2151829260 !ruby/object:Gem::Requirement
205
+ requirement: &2151809080 !ruby/object:Gem::Requirement
206
206
  none: false
207
207
  requirements:
208
208
  - - ! '>='
@@ -210,10 +210,10 @@ dependencies:
210
210
  version: 1.0.3
211
211
  type: :development
212
212
  prerelease: false
213
- version_requirements: *2151829260
213
+ version_requirements: *2151809080
214
214
  - !ruby/object:Gem::Dependency
215
215
  name: jquery-rails
216
- requirement: &2151827860 !ruby/object:Gem::Requirement
216
+ requirement: &2151806820 !ruby/object:Gem::Requirement
217
217
  none: false
218
218
  requirements:
219
219
  - - ! '>='
@@ -221,10 +221,10 @@ dependencies:
221
221
  version: 1.0.14
222
222
  type: :development
223
223
  prerelease: false
224
- version_requirements: *2151827860
224
+ version_requirements: *2151806820
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: yard
227
- requirement: &2151827160 !ruby/object:Gem::Requirement
227
+ requirement: &2151806080 !ruby/object:Gem::Requirement
228
228
  none: false
229
229
  requirements:
230
230
  - - =
@@ -232,10 +232,10 @@ dependencies:
232
232
  version: 0.7.2
233
233
  type: :development
234
234
  prerelease: false
235
- version_requirements: *2151827160
235
+ version_requirements: *2151806080
236
236
  - !ruby/object:Gem::Dependency
237
237
  name: rdiscount
238
- requirement: &2151825760 !ruby/object:Gem::Requirement
238
+ requirement: &2151804860 !ruby/object:Gem::Requirement
239
239
  none: false
240
240
  requirements:
241
241
  - - =
@@ -243,10 +243,10 @@ dependencies:
243
243
  version: 1.6.8
244
244
  type: :development
245
245
  prerelease: false
246
- version_requirements: *2151825760
246
+ version_requirements: *2151804860
247
247
  - !ruby/object:Gem::Dependency
248
248
  name: bcat
249
- requirement: &2151825080 !ruby/object:Gem::Requirement
249
+ requirement: &2151803360 !ruby/object:Gem::Requirement
250
250
  none: false
251
251
  requirements:
252
252
  - - =
@@ -254,7 +254,7 @@ dependencies:
254
254
  version: 0.6.1
255
255
  type: :development
256
256
  prerelease: false
257
- version_requirements: *2151825080
257
+ version_requirements: *2151803360
258
258
  description: Cucumber Generators and Runtime for Rails
259
259
  email: cukes@googlegroups.com
260
260
  executables: []
@@ -359,7 +359,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
359
359
  version: '0'
360
360
  segments:
361
361
  - 0
362
- hash: -2324867846435926085
362
+ hash: -504813231812424176
363
363
  required_rubygems_version: !ruby/object:Gem::Requirement
364
364
  none: false
365
365
  requirements:
@@ -368,13 +368,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  version: '0'
369
369
  segments:
370
370
  - 0
371
- hash: -2324867846435926085
371
+ hash: -504813231812424176
372
372
  requirements: []
373
373
  rubyforge_project:
374
374
  rubygems_version: 1.8.6
375
375
  signing_key:
376
376
  specification_version: 3
377
- summary: cucumber-rails-1.0.3
377
+ summary: cucumber-rails-1.0.4
378
378
  test_files:
379
379
  - features/allow_rescue.feature
380
380
  - features/capybara_javascript_drivers.feature