calabash-cucumber 0.9.96 → 0.9.100
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -1,17 +0,0 @@
|
|
1
|
-
CALABASH_COUNT = {:step_index => 0, :step_line => nil}
|
2
|
-
|
3
|
-
#TODO change this approach as it breaks scenario outlines
|
4
|
-
Before do |scenario|
|
5
|
-
begin
|
6
|
-
CALABASH_COUNT[:step_index] = 0
|
7
|
-
CALABASH_COUNT[:step_line] = scenario.raw_steps[CALABASH_COUNT[:step_index]].line
|
8
|
-
rescue Exception => e
|
9
|
-
puts "#{Time.now} - Exception:#{e}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
AfterStep do |scenario|
|
14
|
-
CALABASH_COUNT[:step_index] = CALABASH_COUNT[:step_index] + 1
|
15
|
-
raw = scenario.raw_steps[CALABASH_COUNT[:step_index]]
|
16
|
-
CALABASH_COUNT[:step_line] = raw.line unless raw.nil?
|
17
|
-
end
|
@@ -33,27 +33,45 @@ module Calabash
|
|
33
33
|
check_element_exists("view marked:'#{expected_mark}'")
|
34
34
|
end
|
35
35
|
|
36
|
-
def screenshot_and_raise(msg, prefix
|
37
|
-
|
36
|
+
def screenshot_and_raise(msg, options={:prefix => nil, :name => nil, :label => nil})
|
37
|
+
screenshot_embed(options)
|
38
38
|
raise(msg)
|
39
39
|
end
|
40
40
|
|
41
|
-
def fail(msg="Error. Check log for details.", prefix
|
42
|
-
screenshot_and_raise(msg,
|
41
|
+
def fail(msg="Error. Check log for details.", options={:prefix => nil, :name => nil, :label => nil})
|
42
|
+
screenshot_and_raise(msg, options)
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
|
46
|
+
def screenshot_embed(options={:prefix => nil, :name => nil, :label => nil})
|
47
|
+
path = screenshot(options)
|
48
|
+
embed(path, "image/png", options[:label] || File.basename(path))
|
49
|
+
end
|
50
|
+
|
51
|
+
def screenshot(options={:prefix => nil, :name => nil})
|
52
|
+
prefix = options[:prefix]
|
53
|
+
name = options[:name]
|
54
|
+
|
55
|
+
@@screenshot_count ||= 0
|
46
56
|
res = http({:method => :get, :path => 'screenshot'})
|
47
57
|
prefix = prefix || ENV['SCREENSHOT_PATH'] || ""
|
48
|
-
|
49
|
-
|
58
|
+
if name.nil?
|
59
|
+
name = "screenshot"
|
60
|
+
else
|
61
|
+
if File.extname(name).downcase == ".png"
|
62
|
+
name = name.split(".png")[0]
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
path = "#{prefix}#{name}_#{@@screenshot_count}.png"
|
50
67
|
File.open(path, 'wb') do |f|
|
51
68
|
f.write res
|
52
69
|
end
|
53
|
-
|
70
|
+
@@screenshot_count += 1
|
54
71
|
path
|
55
72
|
end
|
56
73
|
|
74
|
+
|
57
75
|
end
|
58
76
|
end
|
59
77
|
end
|
metadata
CHANGED
@@ -1,153 +1,151 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 243
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
- 100
|
10
|
+
version: 0.9.100
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Karl Krukow
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-08-27 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: cucumber
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: json
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
33
24
|
none: false
|
34
|
-
requirements:
|
35
|
-
- -
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
38
32
|
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: json
|
39
36
|
prerelease: false
|
40
|
-
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: CFPropertyList
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
49
38
|
none: false
|
50
|
-
requirements:
|
51
|
-
- -
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
54
46
|
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: CFPropertyList
|
55
50
|
prerelease: false
|
56
|
-
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
52
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - '='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 0.3.8
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
70
60
|
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: sim_launcher
|
71
64
|
prerelease: false
|
72
|
-
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
66
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
67
|
+
requirements:
|
68
|
+
- - "="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
- 3
|
74
|
+
- 8
|
77
75
|
version: 0.3.8
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: slowhandcuke
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
76
|
type: :runtime
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: slowhandcuke
|
87
80
|
prerelease: false
|
88
|
-
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
82
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 0.0.5
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
102
90
|
type: :runtime
|
91
|
+
version_requirements: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: location-one
|
103
94
|
prerelease: false
|
104
|
-
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
105
96
|
none: false
|
106
|
-
requirements:
|
97
|
+
requirements:
|
107
98
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 21
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
- 0
|
104
|
+
- 5
|
109
105
|
version: 0.0.5
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: httpclient
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 2.2.7
|
118
106
|
type: :runtime
|
107
|
+
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: httpclient
|
119
110
|
prerelease: false
|
120
|
-
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
121
112
|
none: false
|
122
|
-
requirements:
|
113
|
+
requirements:
|
123
114
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 9
|
117
|
+
segments:
|
118
|
+
- 2
|
119
|
+
- 2
|
120
|
+
- 7
|
125
121
|
version: 2.2.7
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: bundler
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ~>
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '1.1'
|
134
122
|
type: :runtime
|
123
|
+
version_requirements: *id007
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: bundler
|
135
126
|
prerelease: false
|
136
|
-
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
137
128
|
none: false
|
138
|
-
requirements:
|
129
|
+
requirements:
|
139
130
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 13
|
133
|
+
segments:
|
134
|
+
- 1
|
135
|
+
- 1
|
136
|
+
version: "1.1"
|
137
|
+
type: :runtime
|
138
|
+
version_requirements: *id008
|
139
|
+
description: calabash-cucumber drives tests for native iOS apps. You must link your app with calabash-ios-server framework to execute tests.
|
140
|
+
email:
|
145
141
|
- karl@lesspainful.com
|
146
|
-
executables:
|
142
|
+
executables:
|
147
143
|
- calabash-ios
|
148
144
|
extensions: []
|
145
|
+
|
149
146
|
extra_rdoc_files: []
|
150
|
-
|
147
|
+
|
148
|
+
files:
|
151
149
|
- .gitignore
|
152
150
|
- CHANGES.txt
|
153
151
|
- Gemfile
|
@@ -257,27 +255,36 @@ files:
|
|
257
255
|
- scripts/reset_simulator.scpt
|
258
256
|
homepage: http://calaba.sh
|
259
257
|
licenses: []
|
258
|
+
|
260
259
|
post_install_message:
|
261
260
|
rdoc_options: []
|
262
|
-
|
261
|
+
|
262
|
+
require_paths:
|
263
263
|
- lib
|
264
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
264
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
265
265
|
none: false
|
266
|
-
requirements:
|
267
|
-
- -
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
|
270
|
-
|
266
|
+
requirements:
|
267
|
+
- - ">="
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
hash: 3
|
270
|
+
segments:
|
271
|
+
- 0
|
272
|
+
version: "0"
|
273
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
274
|
none: false
|
272
|
-
requirements:
|
273
|
-
- -
|
274
|
-
- !ruby/object:Gem::Version
|
275
|
-
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
hash: 3
|
279
|
+
segments:
|
280
|
+
- 0
|
281
|
+
version: "0"
|
276
282
|
requirements: []
|
283
|
+
|
277
284
|
rubyforge_project:
|
278
|
-
rubygems_version: 1.8.
|
285
|
+
rubygems_version: 1.8.24
|
279
286
|
signing_key:
|
280
287
|
specification_version: 3
|
281
288
|
summary: Client for calabash-ios-server for automated functional testing on iOS
|
282
|
-
test_files:
|
289
|
+
test_files:
|
283
290
|
- features/step_definitions/calabash_steps.rb
|