calabash-cucumber 0.21.5 → 0.22.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b7dfee76ce28e4b2e416e448dac9e7e23982c776
4
- data.tar.gz: 068aa05c346dd2246aa432ea2f14e401fcb98f04
2
+ SHA256:
3
+ metadata.gz: 326fe7b27808cd9ed0657c2d74e62ae6bae1c7162b60054e0fbff7d93d85d82a
4
+ data.tar.gz: 67fbb90ab864fbe889ef6f85a73255b1947bdadfbc27f91f25b4be7f9cd4a6c9
5
5
  SHA512:
6
- metadata.gz: eb268b9620002b1d5400254492682a19bc1e60eb973387faabe9b4097c5e35e2d0ea54834c275c27c99e3848bdaa288341218702e88c829730be247fe733dfaa
7
- data.tar.gz: faeec233cb862347585781cec66c866c0f6da97777435114d7ccd961babd92a1613b76467cfee1ef4300f9bf9bfb2b0ca872c6f09a276754bd53864886a38e54
6
+ metadata.gz: e0338e63050ddf15044c37b6c6fd8578874bf1999f846efabb8e096a3969ee06990915ab9a402766eff9408cd53fc0b829ea4b5e03d3fe1679d448849a3f5775
7
+ data.tar.gz: 6f1e61719df5febee9979947b556f2eaf4f6a6888e2bbd4f78b0e494e3a04fbf7462ba04a1df0f8e0d119c5444f8c4c35b232ecb474b44741cf9767898bfc4bc
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'fileutils'
4
- require 'cfpropertylist'
5
4
  require 'rexml/document'
6
5
 
7
-
8
6
  require File.join(File.dirname(__FILE__),"calabash-ios-helpers")
9
7
  require File.join(File.dirname(__FILE__),"calabash-ios-generate")
10
8
  require File.join(File.dirname(__FILE__),"calabash-ios-setup")
@@ -52,8 +50,6 @@ elsif cmd == 'sim'
52
50
 
53
51
  if subcmd == 'reset'
54
52
  calabash_sim_reset
55
- elsif subcmd == 'acc'
56
- calabash_sim_accessibility
57
53
  elsif subcmd == 'locale'
58
54
  calabash_sim_locale(ARGV)
59
55
  else
@@ -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>]
@@ -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"
@@ -1,15 +1,17 @@
1
1
  require "run_loop"
2
2
 
3
3
  def quit_sim
4
- RunLoop::SimControl.new.quit_sim
4
+ RunLoop::CoreSimulator.quit_simulator
5
5
  end
6
6
 
7
7
  def calabash_sim_reset
8
- RunLoop::SimControl.new.reset_sim_content_and_settings
9
- end
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
- def calabash_sim_accessibility
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)
@@ -6,7 +6,7 @@ module Calabash
6
6
 
7
7
  # @!visibility private
8
8
  def self.sim_dylib_basename
9
- "libCalabashDynSim.dylib"
9
+ "libCalabashSim.dylib"
10
10
  end
11
11
 
12
12
  # @!visibility private
@@ -16,7 +16,7 @@ module Calabash
16
16
 
17
17
  # @!visibility private
18
18
  def self.device_dylib_basename
19
- "libCalabashDyn.dylib"
19
+ "libCalabashARM.dylib"
20
20
  end
21
21
 
22
22
  # @!visibility private
@@ -3,10 +3,10 @@ module Calabash
3
3
 
4
4
  # @!visibility public
5
5
  # The Calabash iOS gem version.
6
- VERSION = "0.21.5"
6
+ VERSION = "0.22.2"
7
7
 
8
8
  # @!visibility public
9
9
  # The minimum required version of the Calabash embedded server.
10
- MIN_SERVER_VERSION = "0.21.5"
10
+ MIN_SERVER_VERSION = "0.22.2"
11
11
  end
12
12
  end
@@ -47,9 +47,9 @@ IRB.conf[:HISTORY_FILE] = ".irb-history"
47
47
 
48
48
  begin
49
49
  require "pry"
50
- Pry.config.history.should_save = true
51
- Pry.config.history.should_load = true
52
- Pry.config.history.file = ".pry-history"
50
+ Pry.config.history_save = true
51
+ Pry.config.history_load = true
52
+ Pry.config.history_file = ".pry-history"
53
53
  require "pry-nav"
54
54
  rescue LoadError => _
55
55
 
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.5
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-03 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: edn
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -98,20 +98,6 @@ dependencies:
98
98
  - - "<"
99
99
  - !ruby/object:Gem::Version
100
100
  version: '3.0'
101
- - !ruby/object:Gem::Dependency
102
- name: bundler
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '1.3'
108
- type: :runtime
109
- prerelease: false
110
- version_requirements: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - "~>"
113
- - !ruby/object:Gem::Version
114
- version: '1.3'
115
101
  - !ruby/object:Gem::Dependency
116
102
  name: clipboard
117
103
  requirement: !ruby/object:Gem::Requirement
@@ -132,20 +118,20 @@ dependencies:
132
118
  requirements:
133
119
  - - ">="
134
120
  - !ruby/object:Gem::Version
135
- version: 2.6.6
121
+ version: '4.2'
136
122
  - - "<"
137
123
  - !ruby/object:Gem::Version
138
- version: '3.0'
124
+ version: '5.0'
139
125
  type: :runtime
140
126
  prerelease: false
141
127
  version_requirements: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - ">="
144
130
  - !ruby/object:Gem::Version
145
- version: 2.6.6
131
+ version: '4.2'
146
132
  - - "<"
147
133
  - !ruby/object:Gem::Version
148
- version: '3.0'
134
+ version: '5.0'
149
135
  - !ruby/object:Gem::Dependency
150
136
  name: json
151
137
  requirement: !ruby/object:Gem::Requirement
@@ -390,7 +376,6 @@ email:
390
376
  - karl@lesspainful.com
391
377
  executables:
392
378
  - calabash-ios
393
- - frank-calabash
394
379
  extensions: []
395
380
  extra_rdoc_files: []
396
381
  files:
@@ -403,10 +388,9 @@ files:
403
388
  - bin/calabash-ios-helpers.rb
404
389
  - bin/calabash-ios-setup.rb
405
390
  - bin/calabash-ios-sim.rb
406
- - bin/frank-calabash
407
391
  - doc/calabash-ios-help.txt
408
- - dylibs/libCalabashDyn.dylib
409
- - dylibs/libCalabashDynSim.dylib
392
+ - dylibs/libCalabashARM.dylib
393
+ - dylibs/libCalabashSim.dylib
410
394
  - features-skeleton/sample.feature
411
395
  - features-skeleton/steps/sample_steps.rb
412
396
  - features-skeleton/support/01_launch.rb
@@ -455,19 +439,16 @@ files:
455
439
  - lib/calabash-cucumber/version.rb
456
440
  - lib/calabash-cucumber/wait_helpers.rb
457
441
  - lib/calabash/formatters/html.rb
458
- - lib/frank-calabash.rb
459
442
  - scripts/.irbrc
460
- - scripts/calabash.xcconfig.erb
461
443
  - scripts/data/clients.plist
462
444
  - scripts/data/com.apple.Accessibility-5.1.plist
463
445
  - scripts/data/com.apple.Accessibility.plist
464
446
  - staticlib/calabash.framework.zip
465
- - staticlib/libFrankCalabash.a
466
447
  homepage: http://calaba.sh
467
448
  licenses:
468
449
  - EPL-1.0
469
450
  metadata: {}
470
- post_install_message:
451
+ post_install_message:
471
452
  rdoc_options: []
472
453
  require_paths:
473
454
  - lib
@@ -482,9 +463,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
482
463
  - !ruby/object:Gem::Version
483
464
  version: '0'
484
465
  requirements: []
485
- rubyforge_project:
486
- rubygems_version: 2.6.14
487
- signing_key:
466
+ rubygems_version: 3.1.2
467
+ signing_key:
488
468
  specification_version: 4
489
469
  summary: Client for calabash-ios-server for automated functional testing on iOS
490
470
  test_files: []
@@ -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
Binary file
@@ -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