appium_console 2.10.0 → 2.14.0.rc1

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: 6f7f3c2ea9dadac7784c21e134154b57cc5d3a52
4
- data.tar.gz: 0ae3dce72a4ac061483ddf479aa537c4e23e0ad7
2
+ SHA256:
3
+ metadata.gz: 7183fb6cae52438f32d0441a569c7bd90be40988d070b49be7ab8927b8b12d95
4
+ data.tar.gz: 23d3f119d978f629e45e95b3b9aa2585aa34d5d356bc80bdc6fba2546836e976
5
5
  SHA512:
6
- metadata.gz: 549d3c6b7ad263301cfca51f075b34edf0ad001e02196c113ce6705921c8f69b937ca3cc6812037192ecd3222dc29e44cf0e6825748b197108f0fb4766b4af22
7
- data.tar.gz: 8d6140a70f246a5c376a829258df8f93c1f72a336eb5a8edfeb3718a1ba5d50e22c09bdb656b702953e9a5ebde74c3e7add15168bcf11f53612e244d4ea2a4fe
6
+ metadata.gz: bc08b6029096abf10419f7b393e77ceafd433f579d674ffabedc2824188d464123fe8dc31569ebe68c4ee7f0469ac79098d40b3ad7a18197203f53124f21d842
7
+ data.tar.gz: 3005cf7a5fab4a641218acc6522cd8fa2faa4ee18e3eb78f74bb02228291a48b522d24443ac93a41daacaae3a71abb4750109d91caf26af06db333974c2f40f9
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "11:00"
8
+ open-pull-requests-limit: 10
data/.rubocop.yml ADDED
@@ -0,0 +1,102 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+ Metrics/LineLength:
4
+ Max: 128
5
+ Metrics/MethodLength:
6
+ Enabled: false
7
+ Metrics/AbcSize:
8
+ Enabled: false
9
+ Style/Documentation:
10
+ Enabled: false
11
+ Style/GlobalVars:
12
+ Enabled: false
13
+ Layout/HeredocIndentation:
14
+ Enabled: false
15
+ Gemspec/DateAssignment: # new in 1.10
16
+ Enabled: true
17
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
18
+ Enabled: true
19
+ Layout/SpaceBeforeBrackets: # new in 1.7
20
+ Enabled: true
21
+ Lint/AmbiguousAssignment: # new in 1.7
22
+ Enabled: true
23
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
24
+ Enabled: true
25
+ Lint/AmbiguousRange: # new in 1.19
26
+ Enabled: true
27
+ Lint/DeprecatedConstants: # new in 1.8
28
+ Enabled: true
29
+ Lint/DuplicateBranch: # new in 1.3
30
+ Enabled: true
31
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
32
+ Enabled: true
33
+ Lint/EmptyBlock: # new in 1.1
34
+ Enabled: true
35
+ Lint/EmptyClass: # new in 1.3
36
+ Enabled: true
37
+ Lint/EmptyInPattern: # new in 1.16
38
+ Enabled: true
39
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
40
+ Enabled: true
41
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
42
+ Enabled: true
43
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
44
+ Enabled: true
45
+ Lint/NumberedParameterAssignment: # new in 1.9
46
+ Enabled: true
47
+ Lint/OrAssignmentToConstant: # new in 1.9
48
+ Enabled: true
49
+ Lint/RedundantDirGlobSort: # new in 1.8
50
+ Enabled: true
51
+ Lint/RequireRelativeSelfPath: # new in 1.22
52
+ Enabled: true
53
+ Lint/SymbolConversion: # new in 1.9
54
+ Enabled: true
55
+ Lint/ToEnumArguments: # new in 1.1
56
+ Enabled: true
57
+ Lint/TripleQuotes: # new in 1.9
58
+ Enabled: true
59
+ Lint/UnexpectedBlockArity: # new in 1.5
60
+ Enabled: true
61
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
62
+ Enabled: true
63
+ Security/IoMethods: # new in 1.22
64
+ Enabled: true
65
+ Style/ArgumentsForwarding: # new in 1.1
66
+ Enabled: true
67
+ Style/CollectionCompact: # new in 1.2
68
+ Enabled: true
69
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
70
+ Enabled: true
71
+ Style/EndlessMethod: # new in 1.8
72
+ Enabled: true
73
+ Style/HashConversion: # new in 1.10
74
+ Enabled: true
75
+ Style/HashExcept: # new in 1.7
76
+ Enabled: true
77
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
78
+ Enabled: true
79
+ Style/InPatternThen: # new in 1.16
80
+ Enabled: true
81
+ Style/MultilineInPatternThen: # new in 1.16
82
+ Enabled: true
83
+ Style/NegatedIfElseCondition: # new in 1.2
84
+ Enabled: true
85
+ Style/NilLambda: # new in 1.3
86
+ Enabled: true
87
+ Style/NumberedParameters: # new in 1.22
88
+ Enabled: true
89
+ Style/NumberedParametersLimit: # new in 1.22
90
+ Enabled: true
91
+ Style/QuotedSymbols: # new in 1.16
92
+ Enabled: true
93
+ Style/RedundantArgument: # new in 1.4
94
+ Enabled: true
95
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
96
+ Enabled: true
97
+ Style/SelectByRegexp: # new in 1.22
98
+ Enabled: true
99
+ Style/StringChars: # new in 1.12
100
+ Enabled: true
101
+ Style/SwapValues: # new in 1.1
102
+ Enabled: true
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'rubocop/rake_task'
4
+
5
+ desc('Execute RuboCop static code analysis')
6
+ RuboCop::RakeTask.new(:rubocop) do |t|
7
+ t.patterns = %w(lib test)
8
+ t.options = %w(-D)
9
+ t.fail_on_error = true
10
+ end
@@ -10,7 +10,7 @@ add_to_path 'lib'
10
10
  require 'appium_console/version'
11
11
 
12
12
  Gem::Specification.new do |s|
13
- s.required_ruby_version = '>= 2.2'
13
+ s.required_ruby_version = '>= 2.6'
14
14
 
15
15
  s.name = 'appium_console'
16
16
  s.version = Appium::Console::VERSION
@@ -24,15 +24,14 @@ Gem::Specification.new do |s|
24
24
  s.require_paths = [ 'lib' ]
25
25
 
26
26
  # appium_lib version must match ruby console version.
27
- s.add_runtime_dependency 'appium_lib', '~> 9.16'
28
- s.add_runtime_dependency 'awesome_print', '~> 1.7'
29
- s.add_runtime_dependency 'pry', '~> 0.12.0'
30
- s.add_runtime_dependency 'bond', '~> 0.5'
27
+ s.add_runtime_dependency 'appium_lib', '12.0.0.rc4'
28
+ s.add_runtime_dependency 'pry', '~> 0.14.0'
31
29
  s.add_runtime_dependency 'spec', '~> 5.3', '>= 5.3.1'
32
- s.add_runtime_dependency 'thor', '~> 0.19'
33
- s.add_development_dependency 'rake', '~> 12.0'
30
+ s.add_runtime_dependency 'thor', '>= 0.19', '< 2.0'
31
+ s.add_development_dependency 'rake', '~> 13.0'
34
32
  s.add_development_dependency 'appium_thor', '~> 1.0', '>= 1.0.1'
35
33
  s.add_development_dependency 'posix-spawn', '~> 0.3.11'
34
+ s.add_development_dependency 'rubocop', '1.22.3'
36
35
 
37
36
  s.executables = [ 'arc' ]
38
37
  s.files = `git ls-files`.split "\n"
@@ -1,7 +1,10 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  # Define Appium module so version can be required directly.
3
4
  module Appium; end unless defined? Appium
4
- module Appium::Console
5
- VERSION = '2.10.0' unless defined? ::Appium::Console::VERSION
6
- DATE = '2018-12-19' unless defined? ::Appium::Console::DATE
5
+ module Appium
6
+ module Console
7
+ VERSION = '2.14.0.rc1' unless defined? ::Appium::Console::VERSION
8
+ DATE = '2021-11-02' unless defined? ::Appium::Console::DATE
9
+ end
7
10
  end
@@ -1,19 +1,18 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'rubygems'
3
4
  require 'pry'
4
5
  require 'appium_lib'
5
- require 'awesome_print'
6
6
 
7
7
  # Silence gem warnings
8
8
  Gem::Specification.class_eval do
9
- def self.warn args
10
- end
9
+ def self.warn(args); end
11
10
  end
12
11
 
13
12
  module Appium
14
13
  module Console
15
14
  class << self
16
- def setup appium_txt_path
15
+ def setup(appium_txt_path)
17
16
  Pry.send(:define_singleton_method, :pry_load_appium_txt) do |opts = {}|
18
17
  verbose = opts.fetch :verbose, false
19
18
  path = appium_txt_path
@@ -23,19 +22,18 @@ module Appium
23
22
  Pry.send(:define_singleton_method, :reload) do
24
23
  parsed = Pry.pry_load_appium_txt
25
24
  return unless parsed && parsed[:appium_lib] && parsed[:appium_lib][:require]
25
+
26
26
  requires = parsed[:appium_lib][:require]
27
27
  requires.each do |file|
28
28
  # If a page obj is deleted then load will error.
29
- begin
30
- load file
31
- rescue # LoadError: cannot load such file
32
- end
29
+ load file
30
+ rescue LoadError => e
31
+ puts e.message
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, binding, pry|
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
data/lib/cli.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'thor'
3
5
  require 'appium_console/version'
@@ -5,7 +7,7 @@ require 'appium_lib/version'
5
7
  require 'erb'
6
8
  require 'appium_console'
7
9
 
8
- module Appium::CLI
10
+ module Appium::CLI # rubocop:disable Style/ClassAndModuleChildren
9
11
  module Config
10
12
  class << self
11
13
  def default_appium_txt_path
@@ -13,20 +15,18 @@ module Appium::CLI
13
15
  end
14
16
 
15
17
  def template(caps)
16
- <<-EOS.gsub(/skip\s/, '')
18
+ <<-TEMPLATE.gsub(/skip\s/, '')
17
19
  [caps]
18
20
  platformName = "#{caps[:platform_name]}"
19
- #{ caps[:platform_version] ? "platformVersion = \"#{caps[:platform_version]}\"" : 'skip' }
20
- #{ caps[:device_name] ? "deviceName = \"#{caps[:device_name]}\"" : 'skip' }
21
+ #{caps[:platform_version] ? "platformVersion = \"#{caps[:platform_version]}\"" : 'skip'}
22
+ #{caps[:device_name] ? "deviceName = \"#{caps[:device_name]}\"" : 'skip'}
21
23
  app = "#{caps[:path_to_app]}"
22
- #{ caps[:app_package] ? "appPackage = \"#{caps[:app_package]}\"" : 'skip' }
23
- #{ caps[:app_activity] ? "appActivity = \"#{caps[:app_activity]}\"" : 'skip' }
24
+ #{caps[:app_package] ? "appPackage = \"#{caps[:app_package]}\"" : 'skip'}
25
+ #{caps[:app_activity] ? "appActivity = \"#{caps[:app_activity]}\"" : 'skip'}
24
26
 
25
27
  [appium_lib]
26
28
  server_url = "http://127.0.0.1:4723/wd/hub"
27
- sauce_username = ""
28
- sauce_access_key = ""
29
- EOS
29
+ TEMPLATE
30
30
  end
31
31
  end
32
32
  end
@@ -39,7 +39,7 @@ sauce_access_key = ""
39
39
  automation_name: 'XCUITest',
40
40
  platform_name: 'iOS',
41
41
  device_name: 'iPhone Simulator',
42
- platform_version: '12.0',
42
+ platform_version: '15.0',
43
43
  path_to_app: '/path/to/app_bundle'
44
44
  )
45
45
  File.write(toml, template)
@@ -51,7 +51,7 @@ sauce_access_key = ""
51
51
  template = Config.template(
52
52
  automation_name: 'uiautomator2',
53
53
  platform_name: 'Android',
54
- device_name: 'Pixel 3',
54
+ device_name: 'Pixel 5',
55
55
  path_to_app: '/path/to/apk',
56
56
  app_package: 'com.package.example',
57
57
  app_activity: 'com.package.example.ExampleActivity'
data/lib/start.rb CHANGED
@@ -1,4 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'rubygems'
3
4
  require 'appium_lib'
4
5
 
@@ -24,10 +25,11 @@ begin
24
25
  # set current_spec. fixes:
25
26
  # NoMethodError: undefined method `assert_equal' for nil:NilClass
26
27
  Minitest::Spec.new 'pry'
27
- rescue
28
+ rescue StandardError => e
29
+ puts(e.message)
28
30
  end
29
31
 
30
32
  def reload
31
33
  Pry.reload
32
34
  nil
33
- end
35
+ end
data/release_notes.md CHANGED
@@ -1,3 +1,24 @@
1
+ #### v2.13.0 2021-01-25
2
+
3
+ - [f7e8d18](https://github.com/appium/ruby_console/commit/f7e8d1869e1ca09e0434c299dcbe126be79a7e15) Release 2.13.0
4
+ - [540c561](https://github.com/appium/ruby_console/commit/540c5616a55afabea20f272fe959dd32febb3f3b) chore: Update appium_console.gemspec (#105)
5
+ - [323c3d9](https://github.com/appium/ruby_console/commit/323c3d9fd2535b512d01639c021c93094b9f750b) Update rake requirement from ~> 12.0 to ~> 13.0 (#102)
6
+ - [b5f647f](https://github.com/appium/ruby_console/commit/b5f647faf7d81c0c8e8b297a1c875b7c1a2626db) Update thor requirement from ~> 0.19 to >= 0.19, < 2.0 (#101)
7
+ - [22d772e](https://github.com/appium/ruby_console/commit/22d772e41f3d71448b707b87ee76abfdb4526026) Update rubocop requirement from = 0.61.0 to = 0.68.1 (#103)
8
+
9
+
10
+ #### v2.12.0 2019-02-08
11
+
12
+ - [5ecc460](https://github.com/appium/ruby_console/commit/5ecc4600605da1a7167e1b279540145edcb07ad9) Release 2.12.0
13
+ - [d38e70b](https://github.com/appium/ruby_console/commit/d38e70bc40e230214719a1f7ea1dfb196f4873d2) bump ruby lib to 10.0+ (#99)
14
+
15
+
16
+ #### v2.11.0 2018-12-28
17
+
18
+ - [22c0247](https://github.com/appium/ruby_console/commit/22c02479270a04dbc01a68caa5cd6b3eb6b10b14) Release 2.11.0
19
+ - [f39face](https://github.com/appium/ruby_console/commit/f39facebbbc71b968296b9ee869b3e1265c4c17c) Add rubocop remove awesomeprint (#97)
20
+
21
+
1
22
  #### v2.10.0 2018-12-19
2
23
 
3
24
  - [6b12201](https://github.com/appium/ruby_console/commit/6b12201e65333d27cf30006f19a8d793844834c4) Release 2.10.0
data/test/simple.rb CHANGED
@@ -1,5 +1,5 @@
1
- # encoding: utf-8
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # run with
4
4
  # ruby my_test.rb
5
5
  #
metadata CHANGED
@@ -1,72 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.14.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
8
8
  - Kazuaki Matsuo
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-19 00:00:00.000000000 Z
12
+ date: 2021-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '9.16'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '9.16'
28
- - !ruby/object:Gem::Dependency
29
- name: awesome_print
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
18
+ - - '='
33
19
  - !ruby/object:Gem::Version
34
- version: '1.7'
20
+ version: 12.0.0.rc4
35
21
  type: :runtime
36
22
  prerelease: false
37
23
  version_requirements: !ruby/object:Gem::Requirement
38
24
  requirements:
39
- - - "~>"
25
+ - - '='
40
26
  - !ruby/object:Gem::Version
41
- version: '1.7'
27
+ version: 12.0.0.rc4
42
28
  - !ruby/object:Gem::Dependency
43
29
  name: pry
44
30
  requirement: !ruby/object:Gem::Requirement
45
31
  requirements:
46
32
  - - "~>"
47
33
  - !ruby/object:Gem::Version
48
- version: 0.12.0
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 0.12.0
56
- - !ruby/object:Gem::Dependency
57
- name: bond
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '0.5'
34
+ version: 0.14.0
63
35
  type: :runtime
64
36
  prerelease: false
65
37
  version_requirements: !ruby/object:Gem::Requirement
66
38
  requirements:
67
39
  - - "~>"
68
40
  - !ruby/object:Gem::Version
69
- version: '0.5'
41
+ version: 0.14.0
70
42
  - !ruby/object:Gem::Dependency
71
43
  name: spec
72
44
  requirement: !ruby/object:Gem::Requirement
@@ -91,30 +63,36 @@ dependencies:
91
63
  name: thor
92
64
  requirement: !ruby/object:Gem::Requirement
93
65
  requirements:
94
- - - "~>"
66
+ - - ">="
95
67
  - !ruby/object:Gem::Version
96
68
  version: '0.19'
69
+ - - "<"
70
+ - !ruby/object:Gem::Version
71
+ version: '2.0'
97
72
  type: :runtime
98
73
  prerelease: false
99
74
  version_requirements: !ruby/object:Gem::Requirement
100
75
  requirements:
101
- - - "~>"
76
+ - - ">="
102
77
  - !ruby/object:Gem::Version
103
78
  version: '0.19'
79
+ - - "<"
80
+ - !ruby/object:Gem::Version
81
+ version: '2.0'
104
82
  - !ruby/object:Gem::Dependency
105
83
  name: rake
106
84
  requirement: !ruby/object:Gem::Requirement
107
85
  requirements:
108
86
  - - "~>"
109
87
  - !ruby/object:Gem::Version
110
- version: '12.0'
88
+ version: '13.0'
111
89
  type: :development
112
90
  prerelease: false
113
91
  version_requirements: !ruby/object:Gem::Requirement
114
92
  requirements:
115
93
  - - "~>"
116
94
  - !ruby/object:Gem::Version
117
- version: '12.0'
95
+ version: '13.0'
118
96
  - !ruby/object:Gem::Dependency
119
97
  name: appium_thor
120
98
  requirement: !ruby/object:Gem::Requirement
@@ -149,6 +127,20 @@ dependencies:
149
127
  - - "~>"
150
128
  - !ruby/object:Gem::Version
151
129
  version: 0.3.11
130
+ - !ruby/object:Gem::Dependency
131
+ name: rubocop
132
+ requirement: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '='
135
+ - !ruby/object:Gem::Version
136
+ version: 1.22.3
137
+ type: :development
138
+ prerelease: false
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '='
142
+ - !ruby/object:Gem::Version
143
+ version: 1.22.3
152
144
  description: Appium Ruby Console.
153
145
  email:
154
146
  - code@bootstraponline.com
@@ -158,9 +150,12 @@ executables:
158
150
  extensions: []
159
151
  extra_rdoc_files: []
160
152
  files:
153
+ - ".github/dependabot.yml"
161
154
  - ".gitignore"
155
+ - ".rubocop.yml"
162
156
  - Gemfile
163
157
  - LICENSE-2.0.txt
158
+ - Rakefile
164
159
  - Thorfile
165
160
  - appium_console.gemspec
166
161
  - bin/arc
@@ -177,7 +172,7 @@ homepage: https://github.com/appium/ruby_console
177
172
  licenses:
178
173
  - http://www.apache.org/licenses/LICENSE-2.0.txt
179
174
  metadata: {}
180
- post_install_message:
175
+ post_install_message:
181
176
  rdoc_options: []
182
177
  require_paths:
183
178
  - lib
@@ -185,16 +180,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
180
  requirements:
186
181
  - - ">="
187
182
  - !ruby/object:Gem::Version
188
- version: '2.2'
183
+ version: '2.6'
189
184
  required_rubygems_version: !ruby/object:Gem::Requirement
190
185
  requirements:
191
- - - ">="
186
+ - - ">"
192
187
  - !ruby/object:Gem::Version
193
- version: '0'
188
+ version: 1.3.1
194
189
  requirements: []
195
- rubyforge_project:
196
- rubygems_version: 2.6.14
197
- signing_key:
190
+ rubygems_version: 3.2.15
191
+ signing_key:
198
192
  specification_version: 4
199
193
  summary: Appium Ruby Console
200
194
  test_files: []