appium_console 2.10.0 → 2.11.0
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 +4 -4
- data/Rakefile +10 -0
- data/appium_console.gemspec +1 -1
- data/lib/appium_console.rb +7 -9
- data/lib/appium_console/version.rb +5 -4
- data/lib/cli.rb +7 -7
- data/lib/start.rb +3 -3
- data/release_notes.md +6 -0
- data/test/simple.rb +0 -2
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06b63b0e91986d5db30e192770008500ce5b421a
|
4
|
+
data.tar.gz: 2462f81bbfda77b5b167de18be6fc35c67048cc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06f7d208981d1b437d1c1f40c2d7a2187976c1bdd09fd2f3eeac8d97555ef7e01fd9dd662a38d5f90b1cbabb812c23a248d8130dde86caea1e65521aac19c7df
|
7
|
+
data.tar.gz: 9e961ad644e0370b83ac791757c8e6e509fa4de7a369f4c029b28b5acf58c5fbfce5ba6b19e0a41e759153c4f86b6fafaad7987b41a09d463ea71204dc1233fb
|
data/Rakefile
ADDED
data/appium_console.gemspec
CHANGED
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
# appium_lib version must match ruby console version.
|
27
27
|
s.add_runtime_dependency 'appium_lib', '~> 9.16'
|
28
|
-
s.add_runtime_dependency 'awesome_print', '~> 1.7'
|
29
28
|
s.add_runtime_dependency 'pry', '~> 0.12.0'
|
30
29
|
s.add_runtime_dependency 'bond', '~> 0.5'
|
31
30
|
s.add_runtime_dependency 'spec', '~> 5.3', '>= 5.3.1'
|
@@ -33,6 +32,7 @@ Gem::Specification.new do |s|
|
|
33
32
|
s.add_development_dependency 'rake', '~> 12.0'
|
34
33
|
s.add_development_dependency 'appium_thor', '~> 1.0', '>= 1.0.1'
|
35
34
|
s.add_development_dependency 'posix-spawn', '~> 0.3.11'
|
35
|
+
s.add_development_dependency 'rubocop', '0.61.0'
|
36
36
|
|
37
37
|
s.executables = [ 'arc' ]
|
38
38
|
s.files = `git ls-files`.split "\n"
|
data/lib/appium_console.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
require 'rubygems'
|
3
2
|
require 'pry'
|
4
3
|
require 'appium_lib'
|
5
|
-
require 'awesome_print'
|
6
4
|
|
7
5
|
# Silence gem warnings
|
8
6
|
Gem::Specification.class_eval do
|
9
|
-
def self.warn
|
10
|
-
end
|
7
|
+
def self.warn(args); end
|
11
8
|
end
|
12
9
|
|
13
10
|
module Appium
|
14
11
|
module Console
|
15
12
|
class << self
|
16
|
-
def setup
|
13
|
+
def setup(appium_txt_path)
|
17
14
|
Pry.send(:define_singleton_method, :pry_load_appium_txt) do |opts = {}|
|
18
15
|
verbose = opts.fetch :verbose, false
|
19
16
|
path = appium_txt_path
|
@@ -23,19 +20,20 @@ module Appium
|
|
23
20
|
Pry.send(:define_singleton_method, :reload) do
|
24
21
|
parsed = Pry.pry_load_appium_txt
|
25
22
|
return unless parsed && parsed[:appium_lib] && parsed[:appium_lib][:require]
|
23
|
+
|
26
24
|
requires = parsed[:appium_lib][:require]
|
27
25
|
requires.each do |file|
|
28
26
|
# If a page obj is deleted then load will error.
|
29
27
|
begin
|
30
28
|
load file
|
31
|
-
rescue
|
29
|
+
rescue LoadError => e
|
30
|
+
puts e.message
|
32
31
|
end
|
33
32
|
end
|
34
33
|
end
|
35
34
|
end
|
36
35
|
|
37
36
|
def start
|
38
|
-
AwesomePrint.pry!
|
39
37
|
start = File.expand_path 'start.rb', __dir__
|
40
38
|
cmd = ['-r', start]
|
41
39
|
|
@@ -45,14 +43,14 @@ module Appium
|
|
45
43
|
requires = parsed[:appium_lib][:require]
|
46
44
|
|
47
45
|
unless requires.empty?
|
48
|
-
load_files = requires.map {|f| %(require "#{f}";)}.join "\n"
|
46
|
+
load_files = requires.map { |f| %(require "#{f}";) }.join "\n"
|
49
47
|
cmd += ['-e', load_files]
|
50
48
|
end
|
51
49
|
|
52
50
|
$stdout.puts "pry #{cmd.join(' ')}"
|
53
51
|
end
|
54
52
|
|
55
|
-
Pry.hooks.add_hook(:after_session, 'Release session hook') do |output,
|
53
|
+
Pry.hooks.add_hook(:after_session, 'Release session hook') do |output, _binding, _pry|
|
56
54
|
output.puts 'Closing appium session...'
|
57
55
|
$driver.x
|
58
56
|
end
|
@@ -1,7 +1,8 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
# Define Appium module so version can be required directly.
|
3
2
|
module Appium; end unless defined? Appium
|
4
|
-
module Appium
|
5
|
-
|
6
|
-
|
3
|
+
module Appium
|
4
|
+
module Console
|
5
|
+
VERSION = '2.11.0'.freeze unless defined? ::Appium::Console::VERSION
|
6
|
+
DATE = '2018-12-28'.freeze unless defined? ::Appium::Console::DATE
|
7
|
+
end
|
7
8
|
end
|
data/lib/cli.rb
CHANGED
@@ -5,7 +5,7 @@ require 'appium_lib/version'
|
|
5
5
|
require 'erb'
|
6
6
|
require 'appium_console'
|
7
7
|
|
8
|
-
module Appium::CLI
|
8
|
+
module Appium::CLI # rubocop:disable Style/ClassAndModuleChildren
|
9
9
|
module Config
|
10
10
|
class << self
|
11
11
|
def default_appium_txt_path
|
@@ -13,20 +13,20 @@ module Appium::CLI
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def template(caps)
|
16
|
-
<<-
|
16
|
+
<<-TEMPLATE.gsub(/skip\s/, '')
|
17
17
|
[caps]
|
18
18
|
platformName = "#{caps[:platform_name]}"
|
19
|
-
#{
|
20
|
-
#{
|
19
|
+
#{caps[:platform_version] ? "platformVersion = \"#{caps[:platform_version]}\"" : 'skip'}
|
20
|
+
#{caps[:device_name] ? "deviceName = \"#{caps[:device_name]}\"" : 'skip'}
|
21
21
|
app = "#{caps[:path_to_app]}"
|
22
|
-
#{
|
23
|
-
#{
|
22
|
+
#{caps[:app_package] ? "appPackage = \"#{caps[:app_package]}\"" : 'skip'}
|
23
|
+
#{caps[:app_activity] ? "appActivity = \"#{caps[:app_activity]}\"" : 'skip'}
|
24
24
|
|
25
25
|
[appium_lib]
|
26
26
|
server_url = "http://127.0.0.1:4723/wd/hub"
|
27
27
|
sauce_username = ""
|
28
28
|
sauce_access_key = ""
|
29
|
-
|
29
|
+
TEMPLATE
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/lib/start.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
require 'rubygems'
|
3
2
|
require 'appium_lib'
|
4
3
|
|
@@ -24,10 +23,11 @@ begin
|
|
24
23
|
# set current_spec. fixes:
|
25
24
|
# NoMethodError: undefined method `assert_equal' for nil:NilClass
|
26
25
|
Minitest::Spec.new 'pry'
|
27
|
-
rescue
|
26
|
+
rescue StandardError => e
|
27
|
+
puts(e.message)
|
28
28
|
end
|
29
29
|
|
30
30
|
def reload
|
31
31
|
Pry.reload
|
32
32
|
nil
|
33
|
-
end
|
33
|
+
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v2.11.0 2018-12-28
|
2
|
+
|
3
|
+
- [22c0247](https://github.com/appium/ruby_console/commit/22c02479270a04dbc01a68caa5cd6b3eb6b10b14) Release 2.11.0
|
4
|
+
- [f39face](https://github.com/appium/ruby_console/commit/f39facebbbc71b968296b9ee869b3e1265c4c17c) Add rubocop remove awesomeprint (#97)
|
5
|
+
|
6
|
+
|
1
7
|
#### v2.10.0 2018-12-19
|
2
8
|
|
3
9
|
- [6b12201](https://github.com/appium/ruby_console/commit/6b12201e65333d27cf30006f19a8d793844834c4) Release 2.10.0
|
data/test/simple.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-12-
|
12
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appium_lib
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '9.16'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: awesome_print
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '1.7'
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "~>"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '1.7'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: pry
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,6 +135,20 @@ dependencies:
|
|
149
135
|
- - "~>"
|
150
136
|
- !ruby/object:Gem::Version
|
151
137
|
version: 0.3.11
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: rubocop
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - '='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.61.0
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - '='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 0.61.0
|
152
152
|
description: Appium Ruby Console.
|
153
153
|
email:
|
154
154
|
- code@bootstraponline.com
|
@@ -159,8 +159,10 @@ extensions: []
|
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
161
|
- ".gitignore"
|
162
|
+
- ".rubocop.yml"
|
162
163
|
- Gemfile
|
163
164
|
- LICENSE-2.0.txt
|
165
|
+
- Rakefile
|
164
166
|
- Thorfile
|
165
167
|
- appium_console.gemspec
|
166
168
|
- bin/arc
|