calabash-cucumber 0.9.104 → 0.9.105
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/calabash-ios +2 -0
- data/bin/calabash-ios-generate.rb +3 -3
- data/bin/calabash-ios-helpers.rb +2 -2
- data/bin/calabash-ios-setup.rb +3 -17
- data/bin/calabash-ios-sim.rb +44 -0
- data/doc/calabash-ios-help.txt +0 -9
- data/lib/calabash-cucumber/version.rb +1 -1
- data/scripts/data/clients.plist +0 -0
- metadata +3 -2
data/Gemfile.lock
CHANGED
data/bin/calabash-ios
CHANGED
@@ -18,9 +18,9 @@ def calabash_scaffold
|
|
18
18
|
FileUtils.mv "#{@features_dir}/irb_ios5.sh", "."
|
19
19
|
|
20
20
|
msg("Info") do
|
21
|
-
puts "
|
22
|
-
puts "
|
23
|
-
puts "
|
21
|
+
puts "Features subdirectory created. \n"
|
22
|
+
puts "Make sure you've build your -cal scheme in XCode and "
|
23
|
+
puts "try executing \n\ncucumber"
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
data/bin/calabash-ios-helpers.rb
CHANGED
@@ -25,10 +25,10 @@ def print_usage
|
|
25
25
|
downloads latest compatible version of calabash.framework
|
26
26
|
check (EXPERIMENTAL) [opt path to .ipa/.app]?
|
27
27
|
check whether an app or ipa is linked with calabash.framework
|
28
|
-
submit [ipapath] [secret] [opt_features path]?
|
29
|
-
submits an ipa and features folder to www.lesspainful.com
|
30
28
|
sim locale [lang] [regional]?
|
31
29
|
change locale and regional settings in all iOS Simulators
|
30
|
+
sim location [on|off] [bundleid]?
|
31
|
+
set allow location on/off for current project or bundleid
|
32
32
|
sim reset
|
33
33
|
reset content and settings in all iOS Simulators
|
34
34
|
sim acc
|
data/bin/calabash-ios-setup.rb
CHANGED
@@ -24,7 +24,7 @@ end
|
|
24
24
|
|
25
25
|
def calabash_setup(args)
|
26
26
|
puts "Checking if Xcode is running..."
|
27
|
-
res = `ps x -o pid,command | grep -v grep | grep
|
27
|
+
res = `ps x -o pid,command | grep -v grep | grep Contents/MacOS/Xcode`
|
28
28
|
if res==""
|
29
29
|
puts "Xcode not running."
|
30
30
|
project_name, project_path, xpath = find_project_files(args)
|
@@ -49,22 +49,8 @@ def calabash_setup(args)
|
|
49
49
|
|
50
50
|
else
|
51
51
|
puts "Xcode is running. We'll be changing the project file so we'd better stop it."
|
52
|
-
puts "
|
53
|
-
|
54
|
-
if (answer == 'yes' or answer == 'y')
|
55
|
-
res.split("\n").each do |line|
|
56
|
-
pid = line.split(" ")[0]
|
57
|
-
if system("kill #{pid}")
|
58
|
-
puts "Stopped XCode. Retrying... "
|
59
|
-
calabash_setup(args)
|
60
|
-
else
|
61
|
-
puts "Killing Xcode seemed to fail :( Aborting..."
|
62
|
-
end
|
63
|
-
end
|
64
|
-
else
|
65
|
-
puts "Please stop Xcode and try again."
|
66
|
-
exit(0)
|
67
|
-
end
|
52
|
+
puts "Please stop XCode and run setup again"
|
53
|
+
exit(0)
|
68
54
|
end
|
69
55
|
end
|
70
56
|
|
data/bin/calabash-ios-sim.rb
CHANGED
@@ -26,6 +26,50 @@ def calabash_sim_accessibility
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
|
30
|
+
def calabash_sim_location(args)
|
31
|
+
|
32
|
+
if args.length == 0
|
33
|
+
print_usage
|
34
|
+
exit 0
|
35
|
+
end
|
36
|
+
on_off = args.shift
|
37
|
+
if args.length == 0
|
38
|
+
print_usage
|
39
|
+
exit 0
|
40
|
+
end
|
41
|
+
bundle_id = args.shift
|
42
|
+
|
43
|
+
|
44
|
+
dirs = Dir.glob(File.join(File.expand_path("~/Library"),"Application Support","iPhone Simulator","*.*","Library","Caches","locationd"))
|
45
|
+
dirs.each do |sim_dir|
|
46
|
+
existing_path = "#{sim_dir}/clients.plist"
|
47
|
+
if File.exist?(existing_path)
|
48
|
+
plist_path = existing_path
|
49
|
+
else
|
50
|
+
plist_path = File.expand_path("#{@script_dir}/data/clients.plist")
|
51
|
+
end
|
52
|
+
|
53
|
+
plist = CFPropertyList::List.new(:file => plist_path)
|
54
|
+
hash = CFPropertyList.native_types(plist.value)
|
55
|
+
|
56
|
+
app_hash = hash[bundle_id]
|
57
|
+
if not app_hash
|
58
|
+
app_hash = hash[bundle_id] = {}
|
59
|
+
end
|
60
|
+
app_hash["BundleId"] = bundle_id
|
61
|
+
app_hash["Authorized"] = on_off == "on" ? true : false
|
62
|
+
app_hash["LocationTimeStarted"] = 0
|
63
|
+
|
64
|
+
##Plist edit the template
|
65
|
+
res_plist = CFPropertyList::List.new
|
66
|
+
res_plist.value = CFPropertyList.guess(hash)
|
67
|
+
res_plist.save(existing_path, CFPropertyList::List::FORMAT_BINARY)
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
|
29
73
|
def calabash_sim_locale(args)
|
30
74
|
|
31
75
|
prefs_path = File.expand_path("#{@script_dir}/data/.GlobalPreferences.plist")
|
data/doc/calabash-ios-help.txt
CHANGED
@@ -61,15 +61,6 @@ Usage: calabash-ios <command-name> [parameters]
|
|
61
61
|
build configurations. We check that Debug doesn't link with
|
62
62
|
calabash.framework but Calabash does.
|
63
63
|
|
64
|
-
submit [ipapath] [secret] [opt_features path]?
|
65
|
-
submits an ipa and features folder to www.lesspainful.com
|
66
|
-
[ipapath] should be a path to a build .ipa file which is
|
67
|
-
linked with calabash.framework. [secret] should be an account
|
68
|
-
secret created with your LessPainful account.
|
69
|
-
[op_features path] is optional (default is current working dir)
|
70
|
-
If specified it should be the path to the features folder
|
71
|
-
you want to send.
|
72
|
-
|
73
64
|
sim locale [lang] [regional]? Changes the regional settings
|
74
65
|
for the iOS Simulators. You must ensure the correct format
|
75
66
|
for the optional regional parameter, for example,
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.105
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- lib/calabash-cucumber/version.rb
|
254
254
|
- lib/calabash-cucumber/wait_helpers.rb
|
255
255
|
- scripts/data/.GlobalPreferences.plist
|
256
|
+
- scripts/data/clients.plist
|
256
257
|
- scripts/data/com.apple.Accessibility.plist
|
257
258
|
- scripts/reset_simulator.scpt
|
258
259
|
homepage: http://calaba.sh
|