quke 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.config.example.yml +5 -0
- data/.rubocop.yml +22 -7
- data/lib/features/support/after_hook.rb +4 -5
- data/lib/quke.rb +2 -0
- data/lib/quke/configuration.rb +27 -4
- data/lib/quke/cuke_runner.rb +1 -0
- data/lib/quke/driver_registration.rb +8 -0
- data/lib/quke/version.rb +1 -1
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MGM4ZDRjZmIyMzU1YTJiNWVkMTdkNGFhZjg4ODljMmY3MjhlMTNlMg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ee55abf45e2247042f6ab7207eb0f05cf9c9a69a
|
4
|
+
data.tar.gz: 67af36388e38b89196fe81b2820cef2addb52300
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MTc0MzkxNDc3YTFlMzVmZTFjZWI4N2ZhMjdkNDgyZjBhMmE2YWI0NDYxZmU1
|
11
|
-
ZGMzNWYxZDQyNTY0ZTQxODU1MWE3OTU5MTk3ZWMxYTgwYTYzNjU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MjkyM2YxOThlODc4ZGMyY2Y1NGQ0ZjExMTJkNzBmYmVjNzA0MGMyODBkZTdh
|
14
|
-
MTBjOWMxODQ2Nzg4YTgyNWZjZTM2ZmYxMWNjZWIwODRhZWE2NGE0ODRmYWIy
|
15
|
-
NDViMzE1NDU4MzRhOWFiMTVhNTA2YTQ1ZGM3M2JlYzA3YzY0YmE=
|
6
|
+
metadata.gz: 6c1689c562bb410f24c9f0bfc92a110d44bbcd6ad99cbca81e3095bd4a295d9631d21e343a80cffd889fb414d0f15b5524469678f1fd1eb4796fb3be10d5df4e
|
7
|
+
data.tar.gz: bb72e45323ff4890a4914d5f58f74ca055ad532e1b63753fe03f200f2335296884801ee498a60b2beddde37c03f4fa8373829e39516428e4c48eb3cf53865b6e
|
data/.config.example.yml
CHANGED
@@ -20,6 +20,11 @@ driver: chrome
|
|
20
20
|
# default is 0
|
21
21
|
pause: 1
|
22
22
|
|
23
|
+
# Specify whether Quke should stop all tests once an error occurs. Useful in
|
24
|
+
# Continuous Integration (CI) environments where a quick Yes/No is preferable to
|
25
|
+
# a detailed response.
|
26
|
+
stop_on_error: 1
|
27
|
+
|
23
28
|
# If you select the browserstack driver, there are a number of options you
|
24
29
|
# can pass through to setup your browserstack tests, username and auth_key
|
25
30
|
# being the critical ones.
|
data/.rubocop.yml
CHANGED
@@ -26,14 +26,29 @@ AllCops:
|
|
26
26
|
Style/GlobalVars:
|
27
27
|
Enabled: false
|
28
28
|
|
29
|
-
# It is our opinion that
|
30
|
-
# permitted between the
|
29
|
+
# It is our opinion that code is easier to read if a white space is
|
30
|
+
# permitted between the initial declaration and the first statement. Ditto the
|
31
31
|
# last statement and the closing tag.
|
32
|
+
Style/EmptyLinesAroundModuleBody:
|
33
|
+
Enabled: false
|
32
34
|
Style/EmptyLinesAroundClassBody:
|
33
35
|
Enabled: false
|
36
|
+
Style/EmptyLinesAroundBlockBody:
|
37
|
+
Enabled: false
|
34
38
|
|
35
|
-
# It is our opinion that
|
36
|
-
#
|
37
|
-
#
|
38
|
-
|
39
|
-
|
39
|
+
# It is our opinion that in the specs 80 characters is too restrictive. Do to
|
40
|
+
# the nature of some statements that it can be both difficult, and make more
|
41
|
+
# simple statements complex if we are forced to split them over multiple lines.
|
42
|
+
# Therefore we have upped this limit to 120 chars in the specs only.
|
43
|
+
Metrics/LineLength:
|
44
|
+
Max: 120
|
45
|
+
Exclude:
|
46
|
+
- spec/quke/*.rb
|
47
|
+
|
48
|
+
# Rubocop appears to flag `describe` blocks which are longer than 25 lines.
|
49
|
+
# However it is our opinion that this is necessary in specs, for example when
|
50
|
+
# describing a class, the body of the describe may well exceed 25 lines.
|
51
|
+
# Therefore we have excluded this rule in the specs only.
|
52
|
+
Metrics/BlockLength:
|
53
|
+
Exclude:
|
54
|
+
- spec/quke/*.rb
|
@@ -6,14 +6,13 @@ After('~@nonweb') do |scenario|
|
|
6
6
|
$fail_count ||= 0
|
7
7
|
$fail_count = $fail_count + 1
|
8
8
|
|
9
|
-
# Tell Cucumber to quit after first failing scenario when
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# Experience has shown that should a major element of your service go
|
9
|
+
# Tell Cucumber to quit after first failing scenario when stop_on_error is
|
10
|
+
# true.
|
11
|
+
# Also experience has shown that should a major element of your service go
|
13
12
|
# down all your tests will start failing which means you can be swamped
|
14
13
|
# with output from `save_and_open_page`. Using a global count of the
|
15
14
|
# number of fails, if it hits 5 it will cause cucumber to close.
|
16
|
-
if Quke::Quke.config.
|
15
|
+
if Quke::Quke.config.stop_on_error || $fail_count >= 5
|
17
16
|
Cucumber.wants_to_quit = true
|
18
17
|
else
|
19
18
|
# If we're not using poltergiest and the scenario has failed, we want
|
data/lib/quke.rb
CHANGED
data/lib/quke/configuration.rb
CHANGED
@@ -5,9 +5,20 @@ module Quke #:nodoc:
|
|
5
5
|
# Manages all configuration for Quke.
|
6
6
|
class Configuration
|
7
7
|
|
8
|
-
|
8
|
+
# Access where the config file was loaded from for this instance of
|
9
|
+
# Quke::Configuration.
|
10
|
+
attr_reader :file_location
|
11
|
+
|
12
|
+
# Access the loaded config data object directly
|
13
|
+
attr_reader :data
|
9
14
|
|
10
15
|
class << self
|
16
|
+
# Class level setter for the location of the config file.
|
17
|
+
#
|
18
|
+
# There will only be one for each execution of Quke and it does not
|
19
|
+
# support reading from another during execution. Hence we write this to
|
20
|
+
# the class level and all instances of Quke::Configuration then inherit
|
21
|
+
# this value.
|
11
22
|
attr_writer :file_location
|
12
23
|
end
|
13
24
|
|
@@ -70,6 +81,17 @@ module Quke #:nodoc:
|
|
70
81
|
@data['pause']
|
71
82
|
end
|
72
83
|
|
84
|
+
# Return the value set for +stop_on_error+.
|
85
|
+
#
|
86
|
+
# Specify whether Quke should stop all tests once an error occurs. Useful in
|
87
|
+
# Continuous Integration (CI) environments where a quick Yes/No is
|
88
|
+
# preferable to a detailed response.
|
89
|
+
def stop_on_error
|
90
|
+
# This use of Yaml.load to convert a string to a boolean comes from
|
91
|
+
# http://stackoverflow.com/a/21804027/6117745
|
92
|
+
YAML.load(@data['stop_on_error'])
|
93
|
+
end
|
94
|
+
|
73
95
|
# Return the hash of +browserstack+ options.
|
74
96
|
#
|
75
97
|
# If you select the browserstack driver, there are a number of options you
|
@@ -130,9 +152,10 @@ module Quke #:nodoc:
|
|
130
152
|
def default_data!(data)
|
131
153
|
data.merge(
|
132
154
|
'features_folder' => (data['features'] || 'features').downcase.strip,
|
133
|
-
'app_host' =>
|
134
|
-
'driver' =>
|
135
|
-
'pause' =>
|
155
|
+
'app_host' => (data['app_host'] || '').downcase.strip,
|
156
|
+
'driver' => (data['driver'] || 'phantomjs').downcase.strip,
|
157
|
+
'pause' => (data['pause'] || '0').to_s.downcase.strip.to_i,
|
158
|
+
'stop_on_error' => (data['stop_on_error'] || 'false').to_s.downcase.strip
|
136
159
|
)
|
137
160
|
end
|
138
161
|
# rubocop:enable Metrics/AbcSize
|
data/lib/quke/cuke_runner.rb
CHANGED
@@ -5,6 +5,7 @@ module Quke #:nodoc:
|
|
5
5
|
# Handles executing Cucumber, including sorting the arguments we pass to it
|
6
6
|
class CukeRunner
|
7
7
|
|
8
|
+
# # Access the arguments used by Quke when it was executed
|
8
9
|
attr_reader :args
|
9
10
|
|
10
11
|
# When an instance of CukeRunner is initialized it will take the arguments
|
@@ -8,12 +8,20 @@ module Quke #:nodoc:
|
|
8
8
|
# Capybara.
|
9
9
|
class DriverRegistration
|
10
10
|
|
11
|
+
# Access the instance of Quke::Configuration passed to this instance of
|
12
|
+
# Quke::DriverRegistration when it was initialized.
|
11
13
|
attr_reader :config
|
12
14
|
|
15
|
+
# Instantiate an instance of Quke::DriverRegistration.
|
16
|
+
#
|
17
|
+
# It expects an instance of Quke::Configuration which will detail the driver
|
18
|
+
# to be used and any related options
|
13
19
|
def initialize(config)
|
14
20
|
@config = config
|
15
21
|
end
|
16
22
|
|
23
|
+
# When called registers the driver specified in the instance of
|
24
|
+
# Quke::Configuration currently being used by Quke.
|
17
25
|
def register
|
18
26
|
case @config.driver
|
19
27
|
when 'firefox'
|
data/lib/quke/version.rb
CHANGED
metadata
CHANGED
@@ -1,223 +1,223 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Cruikshanks
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.9'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec-expectations
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.4'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: poltergeist
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.10'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: selenium-webdriver
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.53'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.53'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: chromedriver-helper
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: site_prism
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '2.9'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2.9'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: launchy
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '2.4'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.4'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '1.12'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.12'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - ~>
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '10.5'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - ~>
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '10.5'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rdoc
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - ~>
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '4.2'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - ~>
|
164
|
+
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '4.2'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rspec
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - ~>
|
171
|
+
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '3.5'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - ~>
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '3.5'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: codeclimate-test-reporter
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - ~>
|
185
|
+
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0.6'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - ~>
|
192
|
+
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0.6'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: simplecov
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - ~>
|
199
|
+
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0.12'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - ~>
|
206
|
+
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0.12'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: github_changelog_generator
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - ~>
|
213
|
+
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '1.13'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - ~>
|
220
|
+
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '1.13'
|
223
223
|
description: Quke tries to simplify the process of writing and running acceptance
|
@@ -232,12 +232,12 @@ executables:
|
|
232
232
|
extensions: []
|
233
233
|
extra_rdoc_files: []
|
234
234
|
files:
|
235
|
-
- .codeclimate.yml
|
236
|
-
- .config.example.yml
|
237
|
-
- .gitignore
|
238
|
-
- .rspec
|
239
|
-
- .rubocop.yml
|
240
|
-
- .travis.yml
|
235
|
+
- ".codeclimate.yml"
|
236
|
+
- ".config.example.yml"
|
237
|
+
- ".gitignore"
|
238
|
+
- ".rspec"
|
239
|
+
- ".rubocop.yml"
|
240
|
+
- ".travis.yml"
|
241
241
|
- CHANGELOG.md
|
242
242
|
- Gemfile
|
243
243
|
- LICENSE
|
@@ -267,12 +267,12 @@ require_paths:
|
|
267
267
|
- lib
|
268
268
|
required_ruby_version: !ruby/object:Gem::Requirement
|
269
269
|
requirements:
|
270
|
-
- -
|
270
|
+
- - ">="
|
271
271
|
- !ruby/object:Gem::Version
|
272
272
|
version: '1.9'
|
273
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
274
274
|
requirements:
|
275
|
-
- -
|
275
|
+
- - ">="
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|