superbot-runner 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/superbot/runner/cli/root_command.rb +25 -9
- data/lib/superbot/runner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9579694ef5490b472722a15c57d2b27ad1304aad100c1967bbc2733d134af5ec
|
4
|
+
data.tar.gz: 7c8c96153aa96dcaa64a2c251db26a60215402620f165c38800153c87e3612df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3733e00247a9bcb1048ba482d551ce3b4b66abbc992d9680e928c871586f70a93a25c5a7bf6800b8475ffccb2a6912e52bf104dde2aacc97bc85242517f4fd17
|
7
|
+
data.tar.gz: 9c1a6c25f0894fe6c0209d3800a1f454c26a0539713ec8784b50cc8c0792848c534be85f3d7405e02327af35cd861754d9b9cc1eec33ae2a88c7d666fad53209
|
data/Gemfile.lock
CHANGED
@@ -5,7 +5,7 @@ module Superbot
|
|
5
5
|
include Superbot::Validations
|
6
6
|
include Superbot::Cloud::Validations
|
7
7
|
|
8
|
-
parameter "
|
8
|
+
parameter "PATH", "path to test suite"
|
9
9
|
|
10
10
|
option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'local' do |browser|
|
11
11
|
validates_browser_type browser
|
@@ -13,17 +13,13 @@ module Superbot
|
|
13
13
|
browser
|
14
14
|
end
|
15
15
|
option ['--region'], 'REGION', 'Region for remote webdriver'
|
16
|
+
option ['--no-teleport'], :flag, 'Do not start teleport before running'
|
16
17
|
|
17
18
|
def execute
|
18
|
-
open_teleport
|
19
|
-
|
20
|
-
file_extension = File.extname(recording)
|
21
|
-
case file_extension
|
22
|
-
when '.side' then Superbot::Runner::Side.run(recording)
|
23
|
-
else abort "#{file_extension} scripts are not supported yet"
|
24
|
-
end
|
19
|
+
open_teleport unless no_teleport?
|
20
|
+
sorted_files.each(&method(:run_test_file))
|
25
21
|
ensure
|
26
|
-
close_teleport
|
22
|
+
close_teleport unless no_teleport?
|
27
23
|
end
|
28
24
|
|
29
25
|
private
|
@@ -40,6 +36,26 @@ module Superbot
|
|
40
36
|
end
|
41
37
|
end
|
42
38
|
|
39
|
+
def sorted_files
|
40
|
+
if File.directory?(path)
|
41
|
+
Dir.glob(File.join(path, '*'))
|
42
|
+
.map! { |f| [f.gsub(path, ''), f] }
|
43
|
+
.sort
|
44
|
+
.map(&:last)
|
45
|
+
else
|
46
|
+
[path]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def run_test_file(test_file)
|
51
|
+
file_extension = File.extname(test_file)
|
52
|
+
puts "Running #{test_file}"
|
53
|
+
case file_extension
|
54
|
+
when '.side' then Superbot::Runner::Side.run(test_file)
|
55
|
+
else puts "#{file_extension} scripts are not supported yet"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
43
59
|
def close_teleport
|
44
60
|
sleep 1
|
45
61
|
@chromedriver&.kill
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbot-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbt HQ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: superbot-runner-side
|