frank-cucumber 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/frank-cucumber.gemspec +9 -9
- data/frank-skeleton/libCocoaAsyncSocket.a +0 -0
- data/frank-skeleton/libCocoaAsyncSocketMac.a +0 -0
- data/frank-skeleton/libCocoaHTTPServer.a +0 -0
- data/frank-skeleton/libCocoaHTTPServerMac.a +0 -0
- data/frank-skeleton/libCocoaLumberjack.a +0 -0
- data/frank-skeleton/libCocoaLumberjackMac.a +0 -0
- data/frank-skeleton/libFrank.a +0 -0
- data/frank-skeleton/libFrankMac.a +0 -0
- data/frank-skeleton/libShelley.a +0 -0
- data/frank-skeleton/libShelleyMac.a +0 -0
- data/lib/frank-cucumber/bonjour.rb +8 -3
- data/lib/frank-cucumber/cli.rb +18 -1
- data/lib/frank-cucumber/core_frank_steps.rb +5 -1
- data/lib/frank-cucumber/frank_helper.rb +4 -4
- data/lib/frank-cucumber/version.rb +1 -1
- metadata +36 -36
data/frank-cucumber.gemspec
CHANGED
@@ -20,15 +20,15 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
21
|
s.require_paths = ["lib"]
|
22
22
|
|
23
|
-
s.add_dependency( "cucumber" )
|
24
|
-
s.add_dependency( "rspec", ["
|
25
|
-
s.add_dependency( "sim_launcher", ["
|
26
|
-
s.add_dependency( "i18n" )
|
27
|
-
s.add_dependency( "plist" )
|
28
|
-
s.add_dependency( "json" ) # TODO: figure out how to be more permissive as to which JSON gems we allow
|
29
|
-
s.add_dependency( "dnssd" )
|
30
|
-
s.add_dependency( "thor" )
|
31
|
-
s.add_dependency( "xcodeproj", ["
|
23
|
+
s.add_dependency( "cucumber", ["~>1.3.10"] )
|
24
|
+
s.add_dependency( "rspec", ["~>2.14.1"] )
|
25
|
+
s.add_dependency( "sim_launcher", ["~>0.4.6"] )
|
26
|
+
s.add_dependency( "i18n", ["~>0.6.9"] )
|
27
|
+
s.add_dependency( "plist", ["~>3.1.0"] )
|
28
|
+
s.add_dependency( "json", ["1.8.1"] ) # TODO: figure out how to be more permissive as to which JSON gems we allow
|
29
|
+
s.add_dependency( "dnssd", ["~>2.0"] )
|
30
|
+
s.add_dependency( "thor", ["~>0.18.1"] )
|
31
|
+
s.add_dependency( "xcodeproj", ["~>0.14.1"] )
|
32
32
|
|
33
33
|
s.add_development_dependency( "rr" )
|
34
34
|
s.add_development_dependency( "yard" )
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/frank-skeleton/libFrank.a
CHANGED
Binary file
|
Binary file
|
data/frank-skeleton/libShelley.a
CHANGED
Binary file
|
Binary file
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'socket'
|
2
|
+
require 'ipaddr'
|
1
3
|
require 'timeout'
|
2
4
|
require 'uri'
|
3
5
|
|
@@ -27,8 +29,11 @@ class Bonjour
|
|
27
29
|
|
28
30
|
address = nil
|
29
31
|
addr_service.getaddrinfo r.target do |addrinfo|
|
30
|
-
|
31
|
-
|
32
|
+
ipaddr = (IPAddr.new(addrinfo.address) rescue nil)
|
33
|
+
if ipaddr != nil and ipaddr.family == Socket::AF_INET
|
34
|
+
address = addrinfo.address
|
35
|
+
break
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
debug "first address for #{r.target} is #{address}"
|
@@ -41,7 +46,7 @@ class Bonjour
|
|
41
46
|
|
42
47
|
DNSSD.browse! '_http._tcp.' do |reply|
|
43
48
|
debug 'got a reply'
|
44
|
-
if reply.name == FRANK_SERVICE_NAME
|
49
|
+
if reply.name == FRANK_SERVICE_NAME
|
45
50
|
address = found_a_frank(reply)
|
46
51
|
if address
|
47
52
|
debug "OK WE HAVE AN ADDRESS: #{address}"
|
data/lib/frank-cucumber/cli.rb
CHANGED
@@ -167,6 +167,7 @@ module Frank
|
|
167
167
|
desc "launch", "open the Frankified app in the simulator"
|
168
168
|
method_option :debug, :type => :boolean, :default => false
|
169
169
|
method_option :idiom, :banner => 'iphone|ipad', :type => :string, :default => (ENV['FRANK_SIM_IDIOM'] || 'iphone')
|
170
|
+
method_option :sdk, :type => :string, :default => nil
|
170
171
|
def launch
|
171
172
|
$DEBUG = options[:debug]
|
172
173
|
version = case options[:idiom].downcase
|
@@ -188,7 +189,7 @@ module Frank
|
|
188
189
|
|
189
190
|
say "LAUNCHING APP..."
|
190
191
|
|
191
|
-
launch_app(frankified_app_dir,
|
192
|
+
launch_app(frankified_app_dir, options[:sdk], version, false)
|
192
193
|
end
|
193
194
|
end
|
194
195
|
|
@@ -222,6 +223,18 @@ module Frank
|
|
222
223
|
end
|
223
224
|
end
|
224
225
|
|
226
|
+
desc "authorize", "Permanently authorize your frankified app, and all apps with the same bundle identifier, to use the Mac accessibility API on 10.9 or later. Requires administrator privileges."
|
227
|
+
def authorize
|
228
|
+
bundle_id = get_mac_bundle_id
|
229
|
+
run %Q|sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access values ('kTCCServiceAccessibility', '#{bundle_id}', 0, 1, 0, NULL);"|
|
230
|
+
end
|
231
|
+
|
232
|
+
desc "deauthorize", "Remove authorization for your frankified app, and all apps with the same bundle identifier, to use the Mac accessibility API on 10.9 or later. Requires administrator privileges."
|
233
|
+
def deauthorize
|
234
|
+
bundle_id = get_mac_bundle_id
|
235
|
+
run %Q|sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db "DELETE FROM access WHERE client = '#{bundle_id}'"|
|
236
|
+
end
|
237
|
+
|
225
238
|
private
|
226
239
|
|
227
240
|
def product_name
|
@@ -285,6 +298,10 @@ module Frank
|
|
285
298
|
end
|
286
299
|
end
|
287
300
|
|
301
|
+
def get_mac_bundle_id
|
302
|
+
bundle_id = `/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' Frank/frankified_build/Frankified.app/Contents/Info.plist`.chomp
|
303
|
+
end
|
304
|
+
|
288
305
|
end
|
289
306
|
end
|
290
307
|
|
@@ -223,7 +223,11 @@ Then /^switch "([^\"]*)" should be (on|off)$/ do |mark,expected_state|
|
|
223
223
|
switch_states = frankly_map( selector, "isOn" )
|
224
224
|
|
225
225
|
switch_states.each do |switch_state|
|
226
|
-
switch_state
|
226
|
+
if switch_state
|
227
|
+
[true, 1].should include expected_state
|
228
|
+
else
|
229
|
+
[false, 0].should include expected_state
|
230
|
+
end
|
227
231
|
end
|
228
232
|
end
|
229
233
|
|
@@ -127,11 +127,11 @@ module FrankHelper
|
|
127
127
|
# @raise an rspec exception if the assertion fails
|
128
128
|
# @see #element_exists, #check_element_does_not_exist
|
129
129
|
def check_element_exists( selector )
|
130
|
-
element_exists( selector ).should be_true
|
130
|
+
element_exists( selector ).should be_true, "Could not find element matching selector (#{selector})"
|
131
131
|
end
|
132
132
|
|
133
133
|
def check_element_exists_and_is_visible( selector )
|
134
|
-
element_is_not_hidden( selector ).should be_true
|
134
|
+
element_is_not_hidden( selector ).should be_true, "Could not find visible element matching selector (#{selector})"
|
135
135
|
end
|
136
136
|
|
137
137
|
# Assert whether there are no views in the current view heirarchy which match the specified selector.
|
@@ -139,11 +139,11 @@ module FrankHelper
|
|
139
139
|
# @raise an rspec exception if the assertion fails
|
140
140
|
# @see #element_exists, #check_element_exists
|
141
141
|
def check_element_does_not_exist( selector )
|
142
|
-
element_exists( selector ).should be_false
|
142
|
+
element_exists( selector ).should be_false, "Found element matching selector when it should not exist (#{selector})"
|
143
143
|
end
|
144
144
|
|
145
145
|
def check_element_does_not_exist_or_is_not_visible( selector )
|
146
|
-
element_is_not_hidden( selector ).should be_false
|
146
|
+
element_is_not_hidden( selector ).should be_false, "Found visible element matching selector when it should not be visible (#{selector})"
|
147
147
|
end
|
148
148
|
|
149
149
|
# Indicate whether there are any views in the current view heirarchy which contain the specified accessibility label.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frank-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,46 +10,46 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cucumber
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.3.10
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 1.3.10
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rspec
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
none: false
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: 2.14.1
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 2.14.1
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sim_launcher
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.4.6
|
55
55
|
type: :runtime
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.4.6
|
63
63
|
- !ruby/object:Gem::Dependency
|
@@ -65,97 +65,97 @@ dependencies:
|
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ~>
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
70
|
+
version: 0.6.9
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
78
|
+
version: 0.6.9
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: plist
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
none: false
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - ~>
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
86
|
+
version: 3.1.0
|
87
87
|
type: :runtime
|
88
88
|
prerelease: false
|
89
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: 3.1.0
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: json
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
100
|
-
- -
|
100
|
+
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: 1.8.1
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.8.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: dnssd
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
118
|
+
version: '2.0'
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ~>
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '0'
|
126
|
+
version: '2.0'
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: thor
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
none: false
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - ~>
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
134
|
+
version: 0.18.1
|
135
135
|
type: :runtime
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ~>
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
142
|
+
version: 0.18.1
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: xcodeproj
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - ~>
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.
|
150
|
+
version: 0.14.1
|
151
151
|
type: :runtime
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - ~>
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.
|
158
|
+
version: 0.14.1
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rr
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|