calabash-cucumber 0.21.5 → 0.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/bin/calabash-ios +0 -2
- data/bin/calabash-ios-helpers.rb +0 -2
- data/bin/calabash-ios-setup.rb +0 -25
- data/bin/calabash-ios-sim.rb +7 -5
- data/dylibs/libCalabashDyn.dylib +0 -0
- data/dylibs/libCalabashDynSim.dylib +0 -0
- data/lib/calabash-cucumber/version.rb +1 -1
- data/staticlib/calabash.framework.zip +0 -0
- metadata +7 -12
- data/bin/frank-calabash +0 -93
- data/lib/frank-calabash.rb +0 -59
- data/scripts/calabash.xcconfig.erb +0 -1
- data/staticlib/libFrankCalabash.a +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4e3097103e22260226d39c0e0966a2ceea6e47d2def847672c6e5120f20b243e
|
4
|
+
data.tar.gz: 722249fab5b1aa00978f1fc93730a54782a68d1d48c5b2d5c4d496caa162eab6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8ac576dd7853f10a85feab4ea44d587c9f0d7b34572f86a25d7e76fe86851b20e8f1f6e3d5e0ad25e3aab465e3893336b63129c514b01d95c6708ecb4c4fb6
|
7
|
+
data.tar.gz: 4760dd6001778f470eb705cd0f0b59873690b0631911fe5aa9bb3c0dca813b0f32c70bc32eab0798c8f117c7cee05c4b33dccfee586a4eaeb1107b10686f60ab
|
data/bin/calabash-ios
CHANGED
data/bin/calabash-ios-helpers.rb
CHANGED
@@ -23,8 +23,6 @@ def print_usage
|
|
23
23
|
change locale and regional settings for an iOS Simulator
|
24
24
|
sim reset
|
25
25
|
reset content and settings in all iOS Simulators
|
26
|
-
sim acc
|
27
|
-
enable accessibility in all iOS Simulators
|
28
26
|
check [{<path to .ipa>|<path to .app>}]
|
29
27
|
check whether an app or ipa is linked with calabash.framework (EXPERIMENTAL)
|
30
28
|
setup [<path>]
|
data/bin/calabash-ios-setup.rb
CHANGED
@@ -2,28 +2,6 @@ require "calabash-cucumber/version"
|
|
2
2
|
require 'rexml/rexml'
|
3
3
|
require "rexml/document"
|
4
4
|
|
5
|
-
|
6
|
-
def detect_accessibility_support
|
7
|
-
dirs = Dir.glob(File.join(File.expand_path("~/Library"),"Application Support","iPhone Simulator","*.*","Library","Preferences"))
|
8
|
-
dirs.each do |sim_pref_dir|
|
9
|
-
fp = File.expand_path("#{sim_pref_dir}/com.apple.Accessibility.plist")
|
10
|
-
out = `defaults read "#{fp}" AXInspectorEnabled`
|
11
|
-
ax_inspector = out.split("\n")[0]=="0"
|
12
|
-
out = `defaults read "#{fp}" ApplicationAccessibilityEnabled`
|
13
|
-
app_acc = out.split("\n")[0]=="0"
|
14
|
-
if not(File.exists?(fp)) || ax_inspector == "0" || app_acc == "0"
|
15
|
-
msg("Warn") do
|
16
|
-
puts "Accessibility is not enabled for simulator: #{sim_pref_dir}"
|
17
|
-
puts "Enabled accessibility as described here:"
|
18
|
-
puts "https://github.com/calabash/calabash-ios/wiki/01-Getting-started-guide"
|
19
|
-
puts "Alternatively run command:"
|
20
|
-
puts "calabash-ios sim acc"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
5
|
def calabash_setup(args)
|
28
6
|
puts "Checking if Xcode is running..."
|
29
7
|
res = `ps x -o pid,command | grep -v grep | grep Contents/MacOS/Xcode`
|
@@ -34,9 +12,6 @@ def calabash_setup(args)
|
|
34
12
|
project_name, project_path, xpath = find_project_files(args)
|
35
13
|
setup_project(project_name, project_path, xpath)
|
36
14
|
|
37
|
-
calabash_sim_accessibility
|
38
|
-
detect_accessibility_support
|
39
|
-
|
40
15
|
msg("Setup done") do
|
41
16
|
|
42
17
|
puts "Please validate by running the -cal target"
|
data/bin/calabash-ios-sim.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
require "run_loop"
|
2
2
|
|
3
3
|
def quit_sim
|
4
|
-
RunLoop::
|
4
|
+
RunLoop::CoreSimulator.quit_simulator
|
5
5
|
end
|
6
6
|
|
7
7
|
def calabash_sim_reset
|
8
|
-
RunLoop::
|
9
|
-
|
8
|
+
xcode = RunLoop::Xcode.new
|
9
|
+
instruments = RunLoop::Instruments.new
|
10
|
+
simctl = RunLoop::Simctl.new
|
11
|
+
|
12
|
+
device = RunLoop::Device.detect_device({}, xcode, simctl, instruments)
|
10
13
|
|
11
|
-
|
12
|
-
RunLoop::SimControl.new.enable_accessibility_on_sims
|
14
|
+
RunLoop::CoreSimulator.erase(device)
|
13
15
|
end
|
14
16
|
|
15
17
|
def calabash_sim_locale(args)
|
data/dylibs/libCalabashDyn.dylib
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -132,20 +132,20 @@ dependencies:
|
|
132
132
|
requirements:
|
133
133
|
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version:
|
135
|
+
version: '3.0'
|
136
136
|
- - "<"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '4.0'
|
139
139
|
type: :runtime
|
140
140
|
prerelease: false
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '3.0'
|
146
146
|
- - "<"
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: '
|
148
|
+
version: '4.0'
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
150
|
name: json
|
151
151
|
requirement: !ruby/object:Gem::Requirement
|
@@ -390,7 +390,6 @@ email:
|
|
390
390
|
- karl@lesspainful.com
|
391
391
|
executables:
|
392
392
|
- calabash-ios
|
393
|
-
- frank-calabash
|
394
393
|
extensions: []
|
395
394
|
extra_rdoc_files: []
|
396
395
|
files:
|
@@ -403,7 +402,6 @@ files:
|
|
403
402
|
- bin/calabash-ios-helpers.rb
|
404
403
|
- bin/calabash-ios-setup.rb
|
405
404
|
- bin/calabash-ios-sim.rb
|
406
|
-
- bin/frank-calabash
|
407
405
|
- doc/calabash-ios-help.txt
|
408
406
|
- dylibs/libCalabashDyn.dylib
|
409
407
|
- dylibs/libCalabashDynSim.dylib
|
@@ -455,14 +453,11 @@ files:
|
|
455
453
|
- lib/calabash-cucumber/version.rb
|
456
454
|
- lib/calabash-cucumber/wait_helpers.rb
|
457
455
|
- lib/calabash/formatters/html.rb
|
458
|
-
- lib/frank-calabash.rb
|
459
456
|
- scripts/.irbrc
|
460
|
-
- scripts/calabash.xcconfig.erb
|
461
457
|
- scripts/data/clients.plist
|
462
458
|
- scripts/data/com.apple.Accessibility-5.1.plist
|
463
459
|
- scripts/data/com.apple.Accessibility.plist
|
464
460
|
- staticlib/calabash.framework.zip
|
465
|
-
- staticlib/libFrankCalabash.a
|
466
461
|
homepage: http://calaba.sh
|
467
462
|
licenses:
|
468
463
|
- EPL-1.0
|
@@ -483,7 +478,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
483
478
|
version: '0'
|
484
479
|
requirements: []
|
485
480
|
rubyforge_project:
|
486
|
-
rubygems_version: 2.
|
481
|
+
rubygems_version: 2.7.7
|
487
482
|
signing_key:
|
488
483
|
specification_version: 4
|
489
484
|
summary: Client for calabash-ios-server for automated functional testing on iOS
|
data/bin/frank-calabash
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'fileutils'
|
4
|
-
|
5
|
-
def print_usage
|
6
|
-
puts <<EOF
|
7
|
-
Usage: frank-calabash <command>
|
8
|
-
where <command> can be one of
|
9
|
-
install
|
10
|
-
installs Frank-Calabash by coping libFrankCalabash.a into
|
11
|
-
Frank/plugins/calabash
|
12
|
-
uninstall
|
13
|
-
uninstalls Frank.Calabash by removing Frank/plugins/calabash
|
14
|
-
console
|
15
|
-
starts the Frank console prepared for Calabash: use c = calabash_client to obtain a Calabash client. Use launch to launch using instruments.
|
16
|
-
EOF
|
17
|
-
end
|
18
|
-
|
19
|
-
FRANK_DIR = 'Frank'
|
20
|
-
PLUGIN_DIR = File.join(FRANK_DIR, 'plugins')
|
21
|
-
CAL_PLUGIN_DIR = File.join(PLUGIN_DIR, 'calabash')
|
22
|
-
XCCONFIG = File.join(File.dirname(__FILE__), '..', 'scripts', 'calabash.xcconfig.erb')
|
23
|
-
LIB_FRANK_CAL = File.join(File.dirname(__FILE__), '..', 'staticlib', 'libFrankCalabash.a')
|
24
|
-
|
25
|
-
def check_frank_exists
|
26
|
-
unless File.directory?(FRANK_DIR)
|
27
|
-
puts "Unable to find #{FRANK_DIR} directory (in #{Dir.pwd})"
|
28
|
-
puts "Please make sure you've run frank setup."
|
29
|
-
exit(false)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def install_frank_plugin
|
34
|
-
check_frank_exists
|
35
|
-
unless File.directory?(PLUGIN_DIR)
|
36
|
-
puts "Unable to find #{PLUGIN_DIR} directory (in #{Dir.pwd})"
|
37
|
-
puts "Please make sure you've running the latest version of Frank."
|
38
|
-
puts 'Try rerunning frank setup.'
|
39
|
-
exit(false)
|
40
|
-
end
|
41
|
-
if File.exist?(CAL_PLUGIN_DIR)
|
42
|
-
puts 'Clearing Calabash plugin...'
|
43
|
-
FileUtils.rm_f(CAL_PLUGIN_DIR)
|
44
|
-
end
|
45
|
-
puts "Creating directory #{CAL_PLUGIN_DIR}"
|
46
|
-
FileUtils.mkdir_p CAL_PLUGIN_DIR
|
47
|
-
FileUtils.cp([LIB_FRANK_CAL, XCCONFIG], CAL_PLUGIN_DIR)
|
48
|
-
puts "Copied files #{Dir[File.join(CAL_PLUGIN_DIR,'*')].join(', ')}"
|
49
|
-
puts "\nInstalled Frank-Calabash plugin."
|
50
|
-
puts 'Please rebuild using frank build.'
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
def uninstall_frank_plugin
|
55
|
-
check_frank_exists
|
56
|
-
if File.directory?(CAL_PLUGIN_DIR)
|
57
|
-
puts 'Found Calabash plugin...'
|
58
|
-
puts "Deleting #{CAL_PLUGIN_DIR}"
|
59
|
-
FileUtils.rm_f CAL_PLUGIN_DIR
|
60
|
-
puts 'Uninstalled Calabash plugin. Please rebuild.'
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def console
|
65
|
-
require 'frank-cucumber/console'
|
66
|
-
require 'frank-calabash'
|
67
|
-
require 'calabash-cucumber/operations'
|
68
|
-
require 'pry'
|
69
|
-
console = Frank::Console.new
|
70
|
-
console.extend ::Frank::Calabash
|
71
|
-
|
72
|
-
def console.embed(*args)
|
73
|
-
end
|
74
|
-
console.pry
|
75
|
-
end
|
76
|
-
|
77
|
-
unless ARGV.length == 1
|
78
|
-
print_usage
|
79
|
-
exit(false)
|
80
|
-
end
|
81
|
-
|
82
|
-
cmd = ARGV.shift
|
83
|
-
case cmd
|
84
|
-
when 'install'
|
85
|
-
install_frank_plugin
|
86
|
-
when 'uninstall'
|
87
|
-
uninstall_frank_plugin
|
88
|
-
when 'console'
|
89
|
-
console
|
90
|
-
else
|
91
|
-
puts "Unsupported command #{cmd}"
|
92
|
-
exit(false)
|
93
|
-
end
|
data/lib/frank-calabash.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
# stubs for documentation
|
2
|
-
require 'calabash-cucumber/core'
|
3
|
-
require 'calabash-cucumber/operations'
|
4
|
-
require 'calabash-cucumber/launcher'
|
5
|
-
|
6
|
-
# @!visibility private
|
7
|
-
module Calabash
|
8
|
-
module Cucumber
|
9
|
-
module Map
|
10
|
-
# @!visibility private
|
11
|
-
def raw_map(query, method_name, *method_args)
|
12
|
-
operation_map = {
|
13
|
-
:method_name => method_name,
|
14
|
-
:arguments => method_args
|
15
|
-
}
|
16
|
-
res = http({:method => :post, :path => 'cal_map'},
|
17
|
-
{:query => query, :operation => operation_map})
|
18
|
-
res = JSON.parse(res)
|
19
|
-
if res['outcome'] != 'SUCCESS'
|
20
|
-
screenshot_and_raise "map #{query}, #{method_name} failed because: #{res['reason']}\n#{res['details']}"
|
21
|
-
end
|
22
|
-
|
23
|
-
res
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
# @!visibility private
|
31
|
-
module Frank
|
32
|
-
# @!visibility private
|
33
|
-
module Calabash
|
34
|
-
# @!visibility private
|
35
|
-
def launch(options={})
|
36
|
-
launcher = ::Calabash::Cucumber::Launcher.launcher
|
37
|
-
#noinspection RubyResolve
|
38
|
-
options[:app] ||= File.expand_path('Frank/frankified_build/Frankified.app')
|
39
|
-
::Frank::Cucumber::FrankHelper.selector_engine = 'calabash_uispec'
|
40
|
-
|
41
|
-
launcher.relaunch(options)
|
42
|
-
end
|
43
|
-
|
44
|
-
# @!visibility private
|
45
|
-
def calabash_client
|
46
|
-
Client.new
|
47
|
-
end
|
48
|
-
|
49
|
-
# @!visibility private
|
50
|
-
module Operations
|
51
|
-
include ::Calabash::Cucumber::Operations
|
52
|
-
end
|
53
|
-
|
54
|
-
# @!visibility private
|
55
|
-
class Client
|
56
|
-
include Operations
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
CALABASH_LDFLAGS=-lFrankCalabash
|
Binary file
|