appium_console 0.0.30 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Rakefile +1 -0
- data/appium_console.gemspec +3 -4
- data/lib/appium_console.rb +43 -38
- data/lib/appium_console/version.rb +5 -3
- data/lib/start.rb +1 -3
- data/release_notes.md +6 -0
- metadata +4 -6
- data/test/helper.rb +0 -69
- data/test/test.rb +0 -20
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODYzMWQzMDc4MmZmOTEyNTc4MDIzNzZmNWEyZDljNWI0MjcwZjgzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGI5MzM2NjExYmFmMTRlNTlmZGUzMzIwNGQ3ZTY0M2MwOWM4OGMxYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2NkNmM0ZjIyZWZhYzgwNGE0OWVkNzdjNDBjY2FiZjA1NDRlMWVlZmJkYjRj
|
10
|
+
NTlmNjRjMTQ5ODA1YjhkMTY0ZDJiODBkNDBjYjllYzkwZTEyNTFkYmZlZDg5
|
11
|
+
ODYwOTdjMzdjNjFkYTIzMjQ3YTMzNTgxMTM2MjVhMjZmZTg5NzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzc5NWYxYTFlMjYxZGNlOWI4ZGJkOWNiNTc5ZDYzYjI2MWJhOWNmYzc3ZmNj
|
14
|
+
OGJlYTRkYzUxMmZiZjliYzhkODY0ZGUzZDAwOGIwZWM3NThlNDY4YjM2MDRk
|
15
|
+
MTY2OGYwYjA5ZTdiYjVmNjhhMzcwNjc3MDE5MTMzODJiNDZmZWE=
|
data/Rakefile
CHANGED
data/appium_console.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
2
|
def self.add_to_path path
|
4
3
|
path = File.expand_path "../#{path}/", __FILE__
|
5
4
|
|
@@ -15,8 +14,8 @@ Gem::Specification.new do |s|
|
|
15
14
|
s.required_ruby_version = '>= 1.9.3'
|
16
15
|
|
17
16
|
s.name = 'appium_console'
|
18
|
-
s.version =
|
19
|
-
s.date =
|
17
|
+
s.version = Appium::Console::VERSION
|
18
|
+
s.date = Appium::Console::DATE
|
20
19
|
s.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
21
20
|
s.description = s.summary = 'Ruby console for use with Appium'
|
22
21
|
s.description += '.' # avoid identical warning
|
@@ -25,7 +24,7 @@ Gem::Specification.new do |s|
|
|
25
24
|
s.require_paths = [ 'lib' ]
|
26
25
|
|
27
26
|
# appium_lib version must match ruby console version.
|
28
|
-
s.add_runtime_dependency 'appium_lib', ">= #{
|
27
|
+
s.add_runtime_dependency 'appium_lib', ">= #{Appium::Console::VERSION}"
|
29
28
|
s.add_runtime_dependency 'pry', '~> 0.9.12'
|
30
29
|
s.add_runtime_dependency 'toml', '~> 0.0.4'
|
31
30
|
s.add_development_dependency 'rake', '~> 10.0.3'
|
data/lib/appium_console.rb
CHANGED
@@ -3,41 +3,46 @@ require 'rubygems'
|
|
3
3
|
Gem::Specification.class_eval { def self.warn( args ); end }
|
4
4
|
require 'pry'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
6
|
+
module Appium; end unless defined? Appium
|
7
|
+
|
8
|
+
module Appium::Console
|
9
|
+
# Check for env vars in .txt
|
10
|
+
toml = File.join Dir.pwd, 'appium.txt'
|
11
|
+
|
12
|
+
class Env
|
13
|
+
def initialize data
|
14
|
+
@data = data
|
15
|
+
end
|
16
|
+
|
17
|
+
def update *args
|
18
|
+
args.each do |name|
|
19
|
+
var = data[name]
|
20
|
+
ENV[name] = var if var
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
if File.exists? toml
|
26
|
+
require 'toml'
|
27
|
+
require 'ap'
|
28
|
+
puts "Loading #{toml}"
|
29
|
+
|
30
|
+
# bash requires A="OK"
|
31
|
+
# toml requires A = "OK"
|
32
|
+
#
|
33
|
+
# A="OK" => A = "OK"
|
34
|
+
data = File.read(toml).gsub /([^\s])\=(")/, "\\1 = \\2"
|
35
|
+
data = TOML::Parser.new(data).parsed
|
36
|
+
ap data
|
37
|
+
|
38
|
+
env = Env.new data
|
39
|
+
env.update 'APP_PATH', 'APP_APK', 'APP_PACKAGE', 'APP_ACTIVITY', 'APP_WAIT_ACTIVITY'
|
40
|
+
end
|
41
|
+
|
42
|
+
require 'appium_lib'
|
43
|
+
|
44
|
+
start = File.expand_path '../start.rb', __FILE__
|
45
|
+
cmd = ['-r', start]
|
46
|
+
$stdout.puts 'pry ' + cmd.join(' ')
|
47
|
+
Pry::CLI.parse_options cmd
|
48
|
+
end # module Appium::Console
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
module
|
3
|
-
|
4
|
-
|
2
|
+
# Define Appium module so version can be required directly.
|
3
|
+
module Appium; end unless defined? Appium
|
4
|
+
module Appium::Console
|
5
|
+
VERSION = '0.3.0' unless defined? ::Appium::Console::VERSION
|
6
|
+
DATE = '2013-04-25' unless defined? ::Appium::Console::DATE
|
5
7
|
end
|
data/lib/start.rb
CHANGED
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v0.0.30 2013-04-16
|
2
|
+
|
3
|
+
- [af1dd74](https://github.com/appium/ruby_console/commit/af1dd74f254c512c9b63a013570638eb13adbe91) Release 0.0.30
|
4
|
+
- [2b3961d](https://github.com/appium/ruby_console/commit/2b3961d6d1938693acb71e2de84a45db73f686e7) Update release notes
|
5
|
+
|
6
|
+
|
1
7
|
#### v0.0.29 2013-04-15
|
2
8
|
|
3
9
|
- [f3251c8](https://github.com/appium/ruby_console/commit/f3251c819e85f5d8fabd3f9a30a3de4307d38098) Release 0.0.29
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0
|
19
|
+
version: 0.3.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: 0.0
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,9 +91,7 @@ files:
|
|
91
91
|
- osx.md
|
92
92
|
- readme.md
|
93
93
|
- release_notes.md
|
94
|
-
- test/helper.rb
|
95
94
|
- test/simple.rb
|
96
|
-
- test/test.rb
|
97
95
|
homepage: https://github.com/appium/ruby_console
|
98
96
|
licenses:
|
99
97
|
- http://www.apache.org/licenses/LICENSE-2.0.txt
|
data/test/helper.rb
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'appium_lib'
|
5
|
-
|
6
|
-
# gem install minitest minitest-reporters
|
7
|
-
require 'minitest/autorun'
|
8
|
-
# Format the report
|
9
|
-
require 'minitest/reporters'
|
10
|
-
|
11
|
-
# rename test, change end message.
|
12
|
-
# https://github.com/CapnKernul/minitest-reporters/blob/master/lib/minitest/reporters/progress_reporter.rb
|
13
|
-
module MiniTest
|
14
|
-
module Reporters
|
15
|
-
class ProgressReporter
|
16
|
-
def error(suite, test, test_runner)
|
17
|
-
test = test.to_s.sub(/test_\d+_/, '').to_sym
|
18
|
-
wipe
|
19
|
-
print(red { 'ERROR' })
|
20
|
-
print_test_with_time(suite, test)
|
21
|
-
puts
|
22
|
-
print_info(test_runner.exception)
|
23
|
-
puts
|
24
|
-
|
25
|
-
self.color = RED
|
26
|
-
end
|
27
|
-
def after_suites(suites, type)
|
28
|
-
@progress.close
|
29
|
-
|
30
|
-
total_time = Time.now - runner.suites_start_time
|
31
|
-
|
32
|
-
wipe
|
33
|
-
puts
|
34
|
-
puts('Finished in %.2fs' % total_time)
|
35
|
-
tests = runner.test_count
|
36
|
-
asserts = runner.assertion_count
|
37
|
-
fails = runner.failures
|
38
|
-
errors = runner.errors
|
39
|
-
skips = runner.skips
|
40
|
-
print("%d test#{tests == 1 ? '' : 's'}#{(asserts == fails && fails == errors && errors == skips && skips == 0) ? '' : ', '}" % [tests])
|
41
|
-
print('%d assertions, ' % [runner.assertion_count]) unless asserts == 0
|
42
|
-
print(red { '%d failures, ' } % [runner.failures]) unless fails == 0
|
43
|
-
print(red { "%d error#{runner.errors == 1 ? '' : 's'}#{skips ? '' : ', '}" } % [errors]) unless errors == 0
|
44
|
-
print(yellow { '%d skips' } % runner.skips) unless skips == 0
|
45
|
-
puts
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
MiniTest::Reporters.use! MiniTest::Reporters::ProgressReporter.new
|
52
|
-
|
53
|
-
# Alter '# Run options:' from minitest-reports
|
54
|
-
# https://github.com/CapnKernul/minitest-reporters/blob/master/lib/minitest/reporter_runner.rb#L28
|
55
|
-
module MiniTest
|
56
|
-
class ReporterRunner < Unit
|
57
|
-
def _run_suites(suites, type)
|
58
|
-
test_order = @help.match /\-\-seed (\d+)/
|
59
|
-
# '# Run options: --seed 10181' => 'test order: 10181'
|
60
|
-
$stdout.puts "test order: #{test_order[1]}" if test_order
|
61
|
-
@suites_start_time = Time.now
|
62
|
-
count_tests!(suites, type)
|
63
|
-
trigger_callback(:before_suites, suites, type)
|
64
|
-
super(suites, type)
|
65
|
-
ensure
|
66
|
-
trigger_callback(:after_suites, suites, type)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
data/test/test.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
#
|
3
|
-
# run with
|
4
|
-
# ruby test.rb
|
5
|
-
|
6
|
-
require './helper.rb'
|
7
|
-
|
8
|
-
start_driver
|
9
|
-
|
10
|
-
describe 'test' do
|
11
|
-
it 'must sign in' do
|
12
|
-
# button('Sign In').click
|
13
|
-
# raise
|
14
|
-
end
|
15
|
-
it 'nop' do; end
|
16
|
-
it 'error' do; end
|
17
|
-
end
|
18
|
-
|
19
|
-
# Quit
|
20
|
-
x
|