superbot-runner 0.1.2 → 0.1.3

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
2
  SHA256:
3
- metadata.gz: '091ed939470e454cc64348d22d673b044817155156d8b64dac8aa741dfdfa144'
4
- data.tar.gz: 3d44e96b539001350b39650977b65cb5643a450f3d88d2a178b3f3cb692f2ada
3
+ metadata.gz: 0be967c2b3098d7cab4ca7aba618a0ed899296e30cce8f39df12a596f35ca80f
4
+ data.tar.gz: cf16e77ac90892eab5dcec5d03590a753de860336ba39138cfa72fec2101a7de
5
5
  SHA512:
6
- metadata.gz: a6e19bde47cef4b6ef5dcba5a8f654cb960cd329f78b8a6d6b91a21bf411f7c10c7eb7094c7f2b6795147ca88c3551fadd33b03a7ef99ffe8090accc62704af9
7
- data.tar.gz: 9263dd07a1dc49e8c0c55eabd253e61667838fa615af1023e94950547eedcf49c7761b10e0ab067a2486f81047b23e5e09c9f78947246ecb818adf191b902f4c
6
+ metadata.gz: 8502f217c152a9818af1cc4220d150b50f6dd8976f83b6f21ac41f68305076a11c3a85c8641917805158220d404f29c97c1af6fc267940324e264d1a3f226d24
7
+ data.tar.gz: d70c816c4e90970314356603e857c21871e47178082074aecd64cee3d03f799719b09d3f161e0194c621f83a113bcbaeef053f76e2eae517781f34a33b9a5ad7
@@ -1,7 +1,12 @@
1
+ PATH
2
+ remote: ../superbot-runner-side
3
+ specs:
4
+ superbot-runner-side (0.1.0)
5
+
1
6
  PATH
2
7
  remote: .
3
8
  specs:
4
- superbot-runner (0.1.2)
9
+ superbot-runner (0.1.3)
5
10
  superbot-runner-side
6
11
 
7
12
  GEM
@@ -19,22 +24,22 @@ GEM
19
24
  clamp (1.2.1)
20
25
  diff-lcs (1.3)
21
26
  excon (0.62.0)
22
- ffi (1.9.25)
27
+ ffi (1.10.0)
23
28
  io-like (0.3.0)
24
29
  kommando (0.1.2)
25
30
  launchy (2.4.3)
26
31
  addressable (~> 2.3)
27
32
  marcel (0.3.3)
28
33
  mimemagic (~> 0.3.2)
29
- mimemagic (0.3.2)
34
+ mimemagic (0.3.3)
30
35
  mini_portile2 (2.4.0)
31
36
  multipart-post (2.0.0)
32
37
  mustermann (1.0.3)
33
- nokogiri (1.9.1)
38
+ nokogiri (1.10.1)
34
39
  mini_portile2 (~> 2.4.0)
35
40
  public_suffix (3.0.3)
36
41
  rack (2.0.6)
37
- rack-protection (2.0.4)
42
+ rack-protection (2.0.5)
38
43
  rack
39
44
  rake (10.5.0)
40
45
  rspec (3.8.0)
@@ -54,31 +59,34 @@ GEM
54
59
  selenium-webdriver (3.141.0)
55
60
  childprocess (~> 0.5)
56
61
  rubyzip (~> 1.2, >= 1.2.2)
57
- sinatra (2.0.4)
62
+ sinatra (2.0.5)
58
63
  mustermann (~> 1.0)
59
64
  rack (~> 2.0)
60
- rack-protection (= 2.0.4)
65
+ rack-protection (= 2.0.5)
61
66
  tilt (~> 2.0)
62
67
  sinatra-silent (0.0.1)
63
- superbot (0.2.0)
68
+ superbot (0.3.1)
64
69
  clamp (= 1.2.1)
65
- kommando (~> 0.1)
70
+ kommando (= 0.1.2)
66
71
  launchy (= 2.4.3)
67
- sinatra (= 2.0.4)
72
+ sinatra (= 2.0.5)
68
73
  sinatra-silent (= 0.0.1)
69
- superbot-cloud (~> 0.1.22)
70
- superbot-runner
71
- superbot-selenium-webdriver (~> 1.0.5)
72
- superbot-teleport (~> 0.2.3)
74
+ superbot-cloud (= 0.2.2)
75
+ superbot-record (= 0.1.0)
76
+ superbot-runner (= 0.1.2)
77
+ superbot-selenium-webdriver (= 1.0.5)
78
+ superbot-teleport (= 0.2.6)
73
79
  zaru (= 0.2.0)
74
- superbot-cloud (0.1.22)
80
+ superbot-cloud (0.2.2)
75
81
  marcel (= 0.3.3)
76
82
  multipart-post (= 2.0.0)
77
- superbot-runner-side (0.1.0)
83
+ superbot-record (0.1.0)
84
+ superbot-record-chrome
85
+ superbot-record-chrome (0.1.0)
78
86
  superbot-selenium-webdriver (1.0.5)
79
87
  chromedriver-helper (= 2.1.0)
80
88
  selenium-webdriver (= 3.141.0)
81
- superbot-teleport (0.2.3)
89
+ superbot-teleport (0.2.6)
82
90
  excon
83
91
  tilt (2.0.9)
84
92
  zaru (0.2.0)
@@ -90,8 +98,9 @@ DEPENDENCIES
90
98
  bundler (~> 1.17)
91
99
  rake (~> 10.0)
92
100
  rspec (~> 3.0)
93
- superbot (~> 0.2.0)
101
+ superbot (~> 0.3.1)
94
102
  superbot-runner!
103
+ superbot-runner-side!
95
104
 
96
105
  BUNDLED WITH
97
106
  1.17.1
@@ -7,34 +7,38 @@ module Superbot
7
7
 
8
8
  parameter "PATH", "path to test suite"
9
9
 
10
- option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'local' do |browser|
11
- validates_browser_type browser
12
- require_login unless browser == 'cloud'
13
- browser
14
- end
10
+ option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'local'
15
11
  option ['--region'], 'REGION', 'Region for remote webdriver'
16
12
  option ['--no-teleport'], :flag, 'Do not start teleport before running'
17
13
  option ['--org'], 'ORGANIZATION', 'Name of organization to take action', attribute_name: :organization
18
14
 
19
15
  def execute
20
- open_teleport unless no_teleport?
16
+ open_teleport
21
17
  sorted_files.each(&method(:run_test_file))
22
18
  ensure
23
- close_teleport unless no_teleport?
19
+ close_teleport
24
20
  end
25
21
 
26
22
  private
27
23
 
28
24
  def open_teleport
25
+ return if no_teleport?
26
+
29
27
  @teleport = Thread.new do
30
- Superbot::Web.run!(webdriver_type: browser, region: region, organization: organization)
28
+ Superbot::Teleport::CLI::RootCommand.new('teleport').run(teleport_options)
29
+ rescue StandardError => e
30
+ abort "Teleport error: #{e.message}"
31
31
  end
32
32
 
33
- if browser == 'local'
34
- chromedriver_path = Chromedriver::Helper.new.binary_path
35
- @chromedriver = Kommando.new "#{chromedriver_path} --silent --port=9515 --url-base=wd/hub"
36
- @chromedriver.run_async
37
- end
33
+ sleep 0.1 until @teleport.stop?
34
+ end
35
+
36
+ def teleport_options
37
+ {
38
+ '--browser' => browser,
39
+ '--region' => region,
40
+ '--org' => organization
41
+ }.compact.to_a.flatten
38
42
  end
39
43
 
40
44
  def sorted_files
@@ -58,8 +62,6 @@ module Superbot
58
62
  end
59
63
 
60
64
  def close_teleport
61
- sleep 1
62
- @chromedriver&.kill
63
65
  @teleport&.kill
64
66
  end
65
67
  end
@@ -1,5 +1,5 @@
1
1
  module Superbot
2
2
  module Runner
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "bundler", "~> 1.17"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.0"
29
- spec.add_development_dependency "superbot", "~> 0.2.0"
29
+ spec.add_development_dependency "superbot", "~> 0.3.1"
30
30
  end
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Superbt HQ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: superbot-runner-side
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.0
75
+ version: 0.3.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.2.0
82
+ version: 0.3.1
83
83
  description:
84
84
  email:
85
85
  executables: []