superbot-local 0.1.2.rc2 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/bin/console +1 -0
- data/lib/superbot/local/cli/local/easy_mode_command.rb +4 -3
- data/lib/superbot/local/cli/local_command.rb +0 -2
- data/lib/superbot/local/version.rb +1 -1
- data/lib/superbot/local.rb +5 -0
- data/superbot-local.gemspec +1 -1
- metadata +6 -7
- data/lib/superbot/local/cli/local/run_command.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd1031bae78956bc188c20534b7ac9323940df9c2da4029a2d791a8a82dab42
|
4
|
+
data.tar.gz: 77889b6e194d17e630566c38cf5452afebcf816ce7c8af6660216444a06f9f76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e860415c63009a8581d46137d41d538db6a0f277a416fde4da4d273de210a020c408542cb89479d9d663881be1c7650e110b0134a44e8f1e9dcf4acea5ca89c8
|
7
|
+
data.tar.gz: 5563efd2dd66ddc7643a6ab1f406c2795b73fd1f0e5629748af369726290d97181e614986d3a4269707fd80683082ad9db6bc7675ca2153d421a40a31369758a
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbot-local (0.1.2
|
5
|
-
superbot (~> 0.1.4
|
4
|
+
superbot-local (0.1.2)
|
5
|
+
superbot (~> 0.1.4)
|
6
6
|
superbot-capybara (~> 360.0, >= 360.0.0)
|
7
7
|
|
8
8
|
GEM
|
@@ -83,7 +83,7 @@ GEM
|
|
83
83
|
rack-protection (= 2.0.3)
|
84
84
|
tilt (~> 2.0)
|
85
85
|
sinatra-silent (0.0.1)
|
86
|
-
superbot (0.1.4
|
86
|
+
superbot (0.1.4)
|
87
87
|
clamp (= 1.2.1)
|
88
88
|
kommando (~> 0.1)
|
89
89
|
launchy (= 2.4.3)
|
data/bin/console
CHANGED
@@ -7,12 +7,12 @@ module Superbot
|
|
7
7
|
module Local
|
8
8
|
class EasyModeCommand < Clamp::Command
|
9
9
|
def execute
|
10
|
-
web = Superbot::Web.new
|
10
|
+
web = Superbot::Web.new(webdriver_endpoint: Superbot.webdriver_endpoint('local'))
|
11
11
|
web.run_async_after_running!
|
12
12
|
|
13
13
|
puts "🤖 active"
|
14
14
|
puts ""
|
15
|
-
puts "Press
|
15
|
+
puts "Press ENTER to exit"
|
16
16
|
|
17
17
|
open_step_editor
|
18
18
|
|
@@ -26,7 +26,8 @@ module Superbot
|
|
26
26
|
|
27
27
|
def open_step_editor
|
28
28
|
options = Selenium::WebDriver::Chrome::Options.new
|
29
|
-
options.add_argument("app=#{Superbot::Local
|
29
|
+
options.add_argument("app=#{Superbot::Local.step_editor_url}")
|
30
|
+
options.add_argument('no-sandbox')
|
30
31
|
@step_editor = Selenium::WebDriver.for :chrome, options: options
|
31
32
|
end
|
32
33
|
|
@@ -1,13 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'local/version_command'
|
4
|
-
require_relative 'local/run_command'
|
5
4
|
require_relative 'local/easy_mode_command'
|
6
5
|
|
7
6
|
module Superbot
|
8
7
|
module CLI
|
9
8
|
class LocalCommand < Clamp::Command
|
10
|
-
subcommand ['run'], "Run tests from local directory", Local::RunCommand
|
11
9
|
subcommand ['version'], "Superbot local version", Local::VersionCommand
|
12
10
|
subcommand ['easymode'], "Superbot UI test constructor", Local::EasyModeCommand
|
13
11
|
|
data/lib/superbot/local.rb
CHANGED
data/superbot-local.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
33
|
spec.require_paths = ["lib"]
|
34
34
|
|
35
|
-
spec.add_runtime_dependency "superbot", "~> 0.1.4
|
35
|
+
spec.add_runtime_dependency "superbot", "~> 0.1.4"
|
36
36
|
spec.add_runtime_dependency "superbot-capybara", "~> 360.0", ">= 360.0.0"
|
37
37
|
|
38
38
|
spec.add_development_dependency "bundler", "~> 1.16"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbot-local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.2
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbots
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: superbot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.4
|
19
|
+
version: 0.1.4
|
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.1.4
|
26
|
+
version: 0.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: superbot-capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +125,6 @@ files:
|
|
125
125
|
- lib/superbot/local.rb
|
126
126
|
- lib/superbot/local/cli.rb
|
127
127
|
- lib/superbot/local/cli/local/easy_mode_command.rb
|
128
|
-
- lib/superbot/local/cli/local/run_command.rb
|
129
128
|
- lib/superbot/local/cli/local/version_command.rb
|
130
129
|
- lib/superbot/local/cli/local_command.rb
|
131
130
|
- lib/superbot/local/cli/root_command.rb
|
@@ -147,9 +146,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
146
|
version: '0'
|
148
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
148
|
requirements:
|
150
|
-
- - "
|
149
|
+
- - ">="
|
151
150
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
151
|
+
version: '0'
|
153
152
|
requirements: []
|
154
153
|
rubyforge_project:
|
155
154
|
rubygems_version: 2.7.6
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Superbot
|
4
|
-
module CLI
|
5
|
-
module Local
|
6
|
-
class RunCommand < Clamp::Command
|
7
|
-
include Superbot::Validations
|
8
|
-
|
9
|
-
parameter "PATH", "project directory" do |path|
|
10
|
-
validates_project_path path
|
11
|
-
end
|
12
|
-
|
13
|
-
def execute
|
14
|
-
script = File.read(File.join(path, 'main.rb'))
|
15
|
-
Superbot::Capybara::Runner.new.tap do |runner|
|
16
|
-
runner.run(script)
|
17
|
-
|
18
|
-
loop do
|
19
|
-
break if runner.finished
|
20
|
-
|
21
|
-
sleep 0.001
|
22
|
-
end
|
23
|
-
|
24
|
-
runner.kill_session
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|