frank-cucumber 0.9.5.pre4 → 0.9.5.pre5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  INSTALL_PATH = /./
2
2
 
3
- FRANK_LDFLAGS = -all_load -ObjC -framework CFNetwork -lShelley -lFrank
3
+ FRANK_LDFLAGS = -all_load -ObjC -framework CFNetwork -framework Security -lShelley -lFrank
4
4
  GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = FRANKIFIED
Binary file
@@ -210,7 +210,7 @@ module FrankHelper
210
210
  :operation => operation_map
211
211
  )
212
212
 
213
- return Gateway.evaluate_frankly_response( res, "app_exec #{method_name}" )
213
+ return Gateway.evaluate_frankly_response( res, "app_exec #{method_sig}" )
214
214
  end
215
215
 
216
216
  # Ask Frank to execute an arbitrary Objective-C method on each view which matches the specified selector.
@@ -2,8 +2,38 @@ module Frank
2
2
  module Cucumber
3
3
 
4
4
  module KeyboardHelper
5
- def type_into_keyboard(text_to_type)
6
- text_to_type = text_to_type+"\n" unless text_to_type.end_with?("\n")
5
+ # Ask Frank to press a sequence of keys on the iOS keyboard.
6
+ #
7
+ # @note The keyboard must be fully visible on the device before calling this method.
8
+ #
9
+ # The "/b" control character is interpreted as a request to press the 'Delete' key.
10
+ #
11
+ # An implicit return is appended to the key sequence, unless you explicitly specify otherwise by setting the :append_return option to false.
12
+ #
13
+ # @example
14
+ # # press the X, -, Y, and z keys on the
15
+ # # iOS keyboard, then press return
16
+ # type_into_keyboard("X-Yz")
17
+ #
18
+ # # press the 1, 2, and 3 keys on the
19
+ # # iOS keyboard, but don't press return afterwards
20
+ # type_into_keyboard("123", :append_return => false)
21
+ #
22
+ # # press the 1, 2, and 3 keys on the
23
+ # # iOS keyboard, but don't press return afterwards
24
+ # type_into_keyboard("123", :append_return => false)
25
+ #
26
+ # # press Delete twice, then type "foo"
27
+ # type_into_keyboard("\b\bfoo")
28
+ #
29
+ def type_into_keyboard(text_to_type, options = {})
30
+ options = {
31
+ :append_return => true
32
+ }.merge(options)
33
+
34
+ if( options[:append_return] )
35
+ text_to_type = text_to_type+"\n" unless text_to_type.end_with?("\n")
36
+ end
7
37
  res = frank_server.send_post(
8
38
  'type_into_keyboard',
9
39
  :text_to_type => text_to_type
@@ -1,5 +1,5 @@
1
1
  module Frank
2
2
  module Cucumber
3
- VERSION = "0.9.5.pre4"
3
+ VERSION = "0.9.5.pre5"
4
4
  end
5
5
  end
@@ -51,6 +51,16 @@ describe "frank keyboard helper" do
51
51
  the_helper.type_into_keyboard("existing newline\n")
52
52
  end
53
53
 
54
+ it "doesn't add a trailing newline if asked explicitly not to" do
55
+ the_helper.mock_frank_server.send_post.with_any_args do |endpoint,payload|
56
+ payload.must_equal( {:text_to_type => "text without newline"} )
57
+
58
+ successful_response
59
+ end
60
+
61
+ the_helper.type_into_keyboard("text without newline", :append_return => false)
62
+ end
63
+
54
64
  it 'raises an exception if the server responds negatively' do
55
65
  failure_message = <<-EOS
56
66
  {
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: 0.9.5.pre4
4
+ version: 0.9.5.pre5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-14 00:00:00.000000000 Z
13
+ date: 2012-07-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cucumber
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &70201991417460 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,15 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
25
+ version_requirements: *70201991417460
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: rspec
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &70201991416820 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,31 +33,21 @@ dependencies:
38
33
  version: '2.0'
39
34
  type: :runtime
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '2.0'
36
+ version_requirements: *70201991416820
47
37
  - !ruby/object:Gem::Dependency
48
38
  name: sim_launcher
49
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &70201991416040 !ruby/object:Gem::Requirement
50
40
  none: false
51
41
  requirements:
52
- - - '='
42
+ - - =
53
43
  - !ruby/object:Gem::Version
54
44
  version: 0.3.8
55
45
  type: :runtime
56
46
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - '='
61
- - !ruby/object:Gem::Version
62
- version: 0.3.8
47
+ version_requirements: *70201991416040
63
48
  - !ruby/object:Gem::Dependency
64
49
  name: i18n
65
- requirement: !ruby/object:Gem::Requirement
50
+ requirement: &70201991415420 !ruby/object:Gem::Requirement
66
51
  none: false
67
52
  requirements:
68
53
  - - ! '>='
@@ -70,15 +55,10 @@ dependencies:
70
55
  version: '0'
71
56
  type: :runtime
72
57
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
58
+ version_requirements: *70201991415420
79
59
  - !ruby/object:Gem::Dependency
80
60
  name: plist
81
- requirement: !ruby/object:Gem::Requirement
61
+ requirement: &70201991430820 !ruby/object:Gem::Requirement
82
62
  none: false
83
63
  requirements:
84
64
  - - ! '>='
@@ -86,15 +66,10 @@ dependencies:
86
66
  version: '0'
87
67
  type: :runtime
88
68
  prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
69
+ version_requirements: *70201991430820
95
70
  - !ruby/object:Gem::Dependency
96
71
  name: json
97
- requirement: !ruby/object:Gem::Requirement
72
+ requirement: &70201991430220 !ruby/object:Gem::Requirement
98
73
  none: false
99
74
  requirements:
100
75
  - - ! '>='
@@ -102,15 +77,10 @@ dependencies:
102
77
  version: '0'
103
78
  type: :runtime
104
79
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
80
+ version_requirements: *70201991430220
111
81
  - !ruby/object:Gem::Dependency
112
82
  name: dnssd
113
- requirement: !ruby/object:Gem::Requirement
83
+ requirement: &70201991429120 !ruby/object:Gem::Requirement
114
84
  none: false
115
85
  requirements:
116
86
  - - ! '>='
@@ -118,15 +88,10 @@ dependencies:
118
88
  version: '0'
119
89
  type: :runtime
120
90
  prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
91
+ version_requirements: *70201991429120
127
92
  - !ruby/object:Gem::Dependency
128
93
  name: thor
129
- requirement: !ruby/object:Gem::Requirement
94
+ requirement: &70201991427520 !ruby/object:Gem::Requirement
130
95
  none: false
131
96
  requirements:
132
97
  - - ! '>='
@@ -134,15 +99,10 @@ dependencies:
134
99
  version: '0'
135
100
  type: :runtime
136
101
  prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
102
+ version_requirements: *70201991427520
143
103
  - !ruby/object:Gem::Dependency
144
104
  name: xcodeproj
145
- requirement: !ruby/object:Gem::Requirement
105
+ requirement: &70201991426100 !ruby/object:Gem::Requirement
146
106
  none: false
147
107
  requirements:
148
108
  - - ! '>='
@@ -150,15 +110,10 @@ dependencies:
150
110
  version: '0'
151
111
  type: :runtime
152
112
  prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - ! '>='
157
- - !ruby/object:Gem::Version
158
- version: '0'
113
+ version_requirements: *70201991426100
159
114
  - !ruby/object:Gem::Dependency
160
115
  name: rr
161
- requirement: !ruby/object:Gem::Requirement
116
+ requirement: &70201991424400 !ruby/object:Gem::Requirement
162
117
  none: false
163
118
  requirements:
164
119
  - - ! '>='
@@ -166,15 +121,10 @@ dependencies:
166
121
  version: '0'
167
122
  type: :development
168
123
  prerelease: false
169
- version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
- requirements:
172
- - - ! '>='
173
- - !ruby/object:Gem::Version
174
- version: '0'
124
+ version_requirements: *70201991424400
175
125
  - !ruby/object:Gem::Dependency
176
126
  name: yard
177
- requirement: !ruby/object:Gem::Requirement
127
+ requirement: &70201991436800 !ruby/object:Gem::Requirement
178
128
  none: false
179
129
  requirements:
180
130
  - - ! '>='
@@ -182,15 +132,10 @@ dependencies:
182
132
  version: '0'
183
133
  type: :development
184
134
  prerelease: false
185
- version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
- requirements:
188
- - - ! '>='
189
- - !ruby/object:Gem::Version
190
- version: '0'
135
+ version_requirements: *70201991436800
191
136
  - !ruby/object:Gem::Dependency
192
137
  name: pry
193
- requirement: !ruby/object:Gem::Requirement
138
+ requirement: &70201991435100 !ruby/object:Gem::Requirement
194
139
  none: false
195
140
  requirements:
196
141
  - - ! '>='
@@ -198,15 +143,10 @@ dependencies:
198
143
  version: '0'
199
144
  type: :development
200
145
  prerelease: false
201
- version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
- requirements:
204
- - - ! '>='
205
- - !ruby/object:Gem::Version
206
- version: '0'
146
+ version_requirements: *70201991435100
207
147
  - !ruby/object:Gem::Dependency
208
148
  name: pry-debugger
209
- requirement: !ruby/object:Gem::Requirement
149
+ requirement: &70201991433920 !ruby/object:Gem::Requirement
210
150
  none: false
211
151
  requirements:
212
152
  - - ! '>='
@@ -214,12 +154,7 @@ dependencies:
214
154
  version: '0'
215
155
  type: :development
216
156
  prerelease: false
217
- version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
- requirements:
220
- - - ! '>='
221
- - !ruby/object:Gem::Version
222
- version: '0'
157
+ version_requirements: *70201991433920
223
158
  description: Use cucumber to test native iOS apps via Frank
224
159
  email:
225
160
  - gems@thepete.net
@@ -323,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
258
  version: 1.3.1
324
259
  requirements: []
325
260
  rubyforge_project:
326
- rubygems_version: 1.8.24
261
+ rubygems_version: 1.8.10
327
262
  signing_key:
328
263
  specification_version: 3
329
264
  summary: Use cucumber to test native iOS apps via Frank
@@ -331,4 +266,3 @@ test_files:
331
266
  - test/keyboard_helper_test.rb
332
267
  - test/launcher_test.rb
333
268
  - test/test_helper.rb
334
- has_rdoc: