frank-cucumber 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- data/frank-cucumber.gemspec +1 -0
- data/frank-skeleton/libFrank.a +0 -0
- data/lib/frank-cucumber/core_frank_steps.rb +1 -1
- data/lib/frank-cucumber/frank_helper.rb +9 -8
- data/lib/frank-cucumber/frank_localize.rb +31 -0
- data/lib/frank-cucumber/localize.yml +21 -0
- data/lib/frank-cucumber/version.rb +1 -1
- metadata +25 -12
data/frank-cucumber.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_dependency( "cucumber" )
|
21
21
|
s.add_dependency( "rspec", [">=2.0"] )
|
22
22
|
s.add_dependency( "sim_launcher" )
|
23
|
+
s.add_dependency( "i18n" )
|
23
24
|
s.add_dependency( "plist" )
|
24
25
|
s.add_dependency( "json" ) # TODO: figure out how to be more permissive as to which JSON gems we allow
|
25
26
|
end
|
data/frank-skeleton/libFrank.a
CHANGED
Binary file
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'json'
|
3
|
+
require 'frank-cucumber/frank_localize'
|
3
4
|
|
4
5
|
module Frank module Cucumber
|
5
6
|
|
@@ -219,37 +220,37 @@ module FrankHelper
|
|
219
220
|
%x{osascript<<APPLESCRIPT
|
220
221
|
activate application "iPhone Simulator"
|
221
222
|
tell application "System Events"
|
222
|
-
click menu item "#{menu_label}" of menu "
|
223
|
+
click menu item "#{menu_label}" of menu "#{Localize.t(:hardware)}" of menu bar of process "#{Localize.t(:iphone_simulator)}"
|
223
224
|
end tell
|
224
225
|
APPLESCRIPT}
|
225
226
|
end
|
226
227
|
|
227
228
|
def press_home_on_simulator
|
228
|
-
simulator_hardware_menu_press
|
229
|
+
simulator_hardware_menu_press Localize.t(:home)
|
229
230
|
end
|
230
231
|
|
231
232
|
def rotate_simulator_left
|
232
|
-
simulator_hardware_menu_press
|
233
|
+
simulator_hardware_menu_press Localize.t(:rotate_left)
|
233
234
|
end
|
234
235
|
|
235
236
|
def rotate_simulator_right
|
236
|
-
simulator_hardware_menu_press
|
237
|
+
simulator_hardware_menu_press Localize.t(:rotate_right)
|
237
238
|
end
|
238
239
|
|
239
240
|
def shake_simulator
|
240
|
-
simulator_hardware_menu_press
|
241
|
+
simulator_hardware_menu_press Localize.t(:shake_gesture)
|
241
242
|
end
|
242
243
|
|
243
244
|
def simulate_memory_warning
|
244
|
-
simulator_hardware_menu_press
|
245
|
+
simulator_hardware_menu_press Localize.t(:simulate_memory_warning)
|
245
246
|
end
|
246
247
|
|
247
248
|
def toggle_call_status_bar
|
248
|
-
simulator_hardware_menu_press
|
249
|
+
simulator_hardware_menu_press Localize.t(:toggle_call_status_bar)
|
249
250
|
end
|
250
251
|
|
251
252
|
def simulate_hardware_keyboard
|
252
|
-
simulator_hardware_menu_press
|
253
|
+
simulator_hardware_menu_press Localize.t(:simulate_hardware_keyboard)
|
253
254
|
end
|
254
255
|
end
|
255
256
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'i18n'
|
2
|
+
|
3
|
+
module Frank
|
4
|
+
module Cucumber
|
5
|
+
module Localize
|
6
|
+
|
7
|
+
def self.system_locale
|
8
|
+
case ENV['LANG']
|
9
|
+
when /^fr_/
|
10
|
+
:fr
|
11
|
+
else
|
12
|
+
:en
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.load_translations
|
17
|
+
if I18n.backend.send(:translations).size == 0
|
18
|
+
I18n.locale = self.system_locale
|
19
|
+
I18n.load_path = [ File.join(File.dirname(__FILE__), 'localize.yml') ]
|
20
|
+
I18n.backend.load_translations
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.t(key)
|
25
|
+
self.load_translations
|
26
|
+
I18n.t(key)
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
en:
|
2
|
+
iphone_simulator: iPhone Simulator
|
3
|
+
hardware: Hardware
|
4
|
+
home: Home
|
5
|
+
rotate_left: Rotate Left
|
6
|
+
rotate_right: Rotate Right
|
7
|
+
shake_gesture: Shake Gesture
|
8
|
+
simulate_memory_warning: Simulate Memory Warning
|
9
|
+
toggle_in_call_status_bar: Toggle In-Call Status Bar
|
10
|
+
simulate_hardware_keyboard: Simulate Hardware Keyboard
|
11
|
+
|
12
|
+
fr:
|
13
|
+
iphone_simulator: Simulateur iOS
|
14
|
+
hardware: Matériel
|
15
|
+
home: Écran d’accueil
|
16
|
+
rotate_left: Rotation à gauche
|
17
|
+
rotate_right: Rotation à droite
|
18
|
+
shake_gesture: Secousse
|
19
|
+
simulate_memory_warning: Simuler un avertissement de mémoire
|
20
|
+
toggle_in_call_status_bar: Afficher/Masquer la barre d'état d'appel en cour
|
21
|
+
simulate_hardware_keyboard: Simuler un clavier matériel
|
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.8.
|
4
|
+
version: 0.8.8
|
5
5
|
prerelease:
|
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:
|
13
|
+
date: 2012-01-19 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cucumber
|
17
|
-
requirement: &
|
17
|
+
requirement: &70324880537740 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70324880537740
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &70324880536340 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70324880536340
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: sim_launcher
|
39
|
-
requirement: &
|
39
|
+
requirement: &70324880535140 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,21 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70324880535140
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: i18n
|
50
|
+
requirement: &70324880534020 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *70324880534020
|
48
59
|
- !ruby/object:Gem::Dependency
|
49
60
|
name: plist
|
50
|
-
requirement: &
|
61
|
+
requirement: &70324880532620 !ruby/object:Gem::Requirement
|
51
62
|
none: false
|
52
63
|
requirements:
|
53
64
|
- - ! '>='
|
@@ -55,10 +66,10 @@ dependencies:
|
|
55
66
|
version: '0'
|
56
67
|
type: :runtime
|
57
68
|
prerelease: false
|
58
|
-
version_requirements: *
|
69
|
+
version_requirements: *70324880532620
|
59
70
|
- !ruby/object:Gem::Dependency
|
60
71
|
name: json
|
61
|
-
requirement: &
|
72
|
+
requirement: &70324880531520 !ruby/object:Gem::Requirement
|
62
73
|
none: false
|
63
74
|
requirements:
|
64
75
|
- - ! '>='
|
@@ -66,7 +77,7 @@ dependencies:
|
|
66
77
|
version: '0'
|
67
78
|
type: :runtime
|
68
79
|
prerelease: false
|
69
|
-
version_requirements: *
|
80
|
+
version_requirements: *70324880531520
|
70
81
|
description: Use cucumber to test native iOS apps via Frank
|
71
82
|
email:
|
72
83
|
- gems@thepete.net
|
@@ -118,7 +129,9 @@ files:
|
|
118
129
|
- lib/frank-cucumber/color_helper.rb
|
119
130
|
- lib/frank-cucumber/core_frank_steps.rb
|
120
131
|
- lib/frank-cucumber/frank_helper.rb
|
132
|
+
- lib/frank-cucumber/frank_localize.rb
|
121
133
|
- lib/frank-cucumber/launcher.rb
|
134
|
+
- lib/frank-cucumber/localize.yml
|
122
135
|
- lib/frank-cucumber/version.rb
|
123
136
|
- test/launcher_test.rb
|
124
137
|
- test/test_helper.rb
|