superbot 0.1.18 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -3
- data/bin/superside.crx +0 -0
- data/lib/superbot/cli/record_command.rb +30 -0
- data/lib/superbot/cli/root_command.rb +2 -0
- data/lib/superbot/cli/teleport_command.rb +17 -2
- data/lib/superbot/version.rb +1 -1
- data/superbot.gemspec +2 -1
- metadata +26 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b36ccc75da3fdce3be88c9781979a5347e0d94fcdccafcb587ccd354a0343a2
|
4
|
+
data.tar.gz: 36b4fb061ae89e4cbcc7dc98cd77103248bb24c255f72b85efe7b010867b75d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdee59f93d8f0209f5224682bf6ab687687c56f6cf3e7b28dad8fd589602a7d8d49e00d53c42764776bd2f0d2bab3c4aa86ffe91882ae3f8e9f14f0b3c8d723c
|
7
|
+
data.tar.gz: f20ebfe7e934ca618e29794aa5ee6aaa3f2bcfaa3bedd1e2afd1945a2972955bfa7e59fcd755120b25a42b7e3d34a5db91e73d8859b3ab07d5bce37faddeaae5
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbot (0.1.
|
4
|
+
superbot (0.1.20)
|
5
5
|
clamp (= 1.2.1)
|
6
6
|
kommando (~> 0.1)
|
7
7
|
launchy (= 2.4.3)
|
8
|
+
selenium-webdriver (~> 3.14, >= 3.14.0)
|
8
9
|
sinatra (= 2.0.3)
|
9
10
|
sinatra-silent (= 0.0.1)
|
10
|
-
superbot-cloud (~> 0.1.
|
11
|
+
superbot-cloud (~> 0.1.14)
|
11
12
|
zaru (= 0.2.0)
|
12
13
|
|
13
14
|
GEM
|
@@ -16,6 +17,8 @@ GEM
|
|
16
17
|
addressable (2.5.2)
|
17
18
|
public_suffix (>= 2.0.2, < 4.0)
|
18
19
|
ast (2.4.0)
|
20
|
+
childprocess (0.9.0)
|
21
|
+
ffi (~> 1.0, >= 1.0.11)
|
19
22
|
clamp (1.2.1)
|
20
23
|
coderay (1.1.2)
|
21
24
|
diff-lcs (1.3)
|
@@ -99,6 +102,10 @@ GEM
|
|
99
102
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
100
103
|
ruby-progressbar (1.9.0)
|
101
104
|
ruby_dep (1.5.0)
|
105
|
+
rubyzip (1.2.2)
|
106
|
+
selenium-webdriver (3.141.0)
|
107
|
+
childprocess (~> 0.5)
|
108
|
+
rubyzip (~> 1.2, >= 1.2.2)
|
102
109
|
shellany (0.0.1)
|
103
110
|
simplecov (0.16.1)
|
104
111
|
docile (~> 1.1)
|
@@ -111,7 +118,7 @@ GEM
|
|
111
118
|
rack-protection (= 2.0.3)
|
112
119
|
tilt (~> 2.0)
|
113
120
|
sinatra-silent (0.0.1)
|
114
|
-
superbot-cloud (0.1.
|
121
|
+
superbot-cloud (0.1.14)
|
115
122
|
marcel (= 0.3.3)
|
116
123
|
multipart-post (= 2.0.0)
|
117
124
|
thor (0.20.0)
|
data/bin/superside.crx
ADDED
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'selenium-webdriver'
|
4
|
+
|
5
|
+
module Superbot
|
6
|
+
module CLI
|
7
|
+
class RecordCommand < Clamp::Command
|
8
|
+
def execute
|
9
|
+
open_superside
|
10
|
+
|
11
|
+
puts "Press [enter] to exit"
|
12
|
+
|
13
|
+
$stdin.gets
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def open_superside
|
19
|
+
profile = Selenium::WebDriver::Chrome::Profile.new
|
20
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
21
|
+
options.add_argument("app=about:blank")
|
22
|
+
options.add_argument("no-sandbox")
|
23
|
+
options.add_argument("force-dev-mode-highlighting")
|
24
|
+
profile.add_extension(File.join(File.dirname(__dir__), '../..', 'bin', 'superside.crx'))
|
25
|
+
|
26
|
+
@superside = Selenium::WebDriver.for :chrome, options: options, profile: profile
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -4,6 +4,7 @@ require_relative "new_command"
|
|
4
4
|
require_relative "run_command"
|
5
5
|
require_relative "teleport_command"
|
6
6
|
require_relative "version_command"
|
7
|
+
require_relative "record_command"
|
7
8
|
|
8
9
|
module Superbot
|
9
10
|
module CLI
|
@@ -17,6 +18,7 @@ module Superbot
|
|
17
18
|
|
18
19
|
subcommand ["version"], "Show version information", VersionCommand
|
19
20
|
subcommand ["teleport"], "Open a teleport for superbots", TeleportCommand
|
21
|
+
subcommand ["record"], "Open browser with selenium ide pre-loaded", RecordCommand if ENV['SUPERBOT_FEAT_RECORD'] == 'true'
|
20
22
|
if ENV['SUPERBOT_FEAT_PROJECT'] == 'true'
|
21
23
|
subcommand ["new"], "Create a new project", NewCommand
|
22
24
|
subcommand ["run"], "Run a project", RunCommand
|
@@ -23,13 +23,28 @@ module Superbot
|
|
23
23
|
|
24
24
|
puts "", "🤖 Teleport is open ☁️ "
|
25
25
|
puts "", "Configure your webdriver to http://localhost:4567/wd/hub"
|
26
|
-
puts "", "Press [
|
26
|
+
puts "", "Press [control+c] to close teleport"
|
27
27
|
|
28
|
-
|
28
|
+
handle_keyboard_interrupt
|
29
29
|
ensure
|
30
30
|
close_teleport
|
31
31
|
end
|
32
32
|
|
33
|
+
def handle_keyboard_interrupt
|
34
|
+
@interrupted = false
|
35
|
+
|
36
|
+
trap "SIGINT" do
|
37
|
+
puts
|
38
|
+
puts "Command killed by keyboard interrupt"
|
39
|
+
@interrupted = true
|
40
|
+
exit 130
|
41
|
+
end
|
42
|
+
|
43
|
+
loop do
|
44
|
+
break if @interrupted
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
33
48
|
def close_teleport
|
34
49
|
@chromedriver&.kill
|
35
50
|
@web&.quit!
|
data/lib/superbot/version.rb
CHANGED
data/superbot.gemspec
CHANGED
@@ -38,7 +38,8 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_runtime_dependency "launchy", "2.4.3"
|
39
39
|
spec.add_runtime_dependency "sinatra-silent", "0.0.1"
|
40
40
|
spec.add_runtime_dependency "kommando", "~> 0.1"
|
41
|
-
spec.add_runtime_dependency "superbot-cloud", "~> 0.1.
|
41
|
+
spec.add_runtime_dependency "superbot-cloud", "~> 0.1.14"
|
42
|
+
spec.add_runtime_dependency "selenium-webdriver", "~> 3.14", ">= 3.14.0"
|
42
43
|
|
43
44
|
spec.add_development_dependency "bundler", "~> 1.16"
|
44
45
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbots
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -100,14 +100,34 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.1.
|
103
|
+
version: 0.1.14
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.14
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: selenium-webdriver
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.14'
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 3.14.0
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - "~>"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '3.14'
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 3.14.0
|
111
131
|
- !ruby/object:Gem::Dependency
|
112
132
|
name: bundler
|
113
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -273,12 +293,14 @@ files:
|
|
273
293
|
- bin/e2e
|
274
294
|
- bin/release
|
275
295
|
- bin/setup
|
296
|
+
- bin/superside.crx
|
276
297
|
- exe/superbot
|
277
298
|
- lib/superbot.rb
|
278
299
|
- lib/superbot/capybara/convert.rb
|
279
300
|
- lib/superbot/capybara/runner.rb
|
280
301
|
- lib/superbot/cli.rb
|
281
302
|
- lib/superbot/cli/new_command.rb
|
303
|
+
- lib/superbot/cli/record_command.rb
|
282
304
|
- lib/superbot/cli/root_command.rb
|
283
305
|
- lib/superbot/cli/run_command.rb
|
284
306
|
- lib/superbot/cli/teleport_command.rb
|