superbot 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/superbot/cli/record_command.rb +5 -4
- data/lib/superbot/cli/root_command.rb +1 -1
- data/lib/superbot/version.rb +1 -1
- data/lib/superbot/web.rb +1 -3
- 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: 84fbe4f5e88083d8a7c104b4cc9faf3c570aed519b63e40d8ee448ed02a7a5dd
|
|
4
|
+
data.tar.gz: adf8d9b6de1840e8f99c259e71c5e0459a3fcb20f6ae8d35902b9435468cfc06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c96996aea3649659dc19cfffc77d4f71934a2c73527736e7edc0f1ab1a8a09c14ec89e8598a9e7448dabee3f1b28eea367828f09322be074d2898a271a4a755
|
|
7
|
+
data.tar.gz: 3f1f0cbd54e5583ad318334cb8c839ba1f7dade0554e2f30acca797ddadfed1656bab15418ca9f6e0d8536484687404306fb5d8653017cb9ff1a7426926b9ffe
|
data/Gemfile.lock
CHANGED
|
@@ -16,14 +16,15 @@ module Superbot
|
|
|
16
16
|
private
|
|
17
17
|
|
|
18
18
|
def open_superside
|
|
19
|
-
profile = Selenium::WebDriver::Chrome::Profile.new
|
|
20
19
|
options = Selenium::WebDriver::Chrome::Options.new
|
|
21
20
|
options.add_argument("app=about:blank")
|
|
22
21
|
options.add_argument("no-sandbox")
|
|
23
|
-
options.
|
|
24
|
-
|
|
22
|
+
options.add_extension(File.join(File.dirname(__dir__), '../..', 'bin', 'superside.crx'))
|
|
23
|
+
browser = Selenium::WebDriver.for :chrome, options: options
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
# close browser window when extension is loaded
|
|
26
|
+
sleep 0.5
|
|
27
|
+
browser.close
|
|
27
28
|
end
|
|
28
29
|
end
|
|
29
30
|
end
|
|
@@ -17,7 +17,7 @@ module Superbot
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
subcommand ["version"], "Show version information", VersionCommand
|
|
20
|
-
subcommand ["teleport"], "Open a teleport for superbots", TeleportCommand
|
|
20
|
+
subcommand ["teleport"], "Open a teleport for superbots", TeleportCommand if ENV['SUPERBOT_FEAT_TELEPORT'] == 'true'
|
|
21
21
|
subcommand ["record"], "Open browser with selenium ide pre-loaded", RecordCommand if ENV['SUPERBOT_FEAT_RECORD'] == 'true'
|
|
22
22
|
if ENV['SUPERBOT_FEAT_PROJECT'] == 'true'
|
|
23
23
|
subcommand ["new"], "Create a new project", NewCommand
|
data/lib/superbot/version.rb
CHANGED
data/lib/superbot/web.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Superbot
|
|
|
11
11
|
class Web
|
|
12
12
|
def initialize(webdriver_type: 'cloud', region: nil)
|
|
13
13
|
@sinatra = Sinatra.new
|
|
14
|
-
@sinatra.set :bind, ENV.fetch('
|
|
14
|
+
@sinatra.set :bind, ENV.fetch('SUPERBOT_TELEPORT_BIND_ADDRESS', '127.0.0.1')
|
|
15
15
|
@sinatra.set :silent_sinatra, true
|
|
16
16
|
@sinatra.set :silent_webrick, true
|
|
17
17
|
@sinatra.set :silent_access_log, false
|
|
@@ -82,7 +82,6 @@ module Superbot
|
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
def remote_webdriver_request(type, path, query_string, body, new_headers)
|
|
85
|
-
start_time = Time.now
|
|
86
85
|
uri = URI.const_get(@request_settings[:scheme].upcase).build(
|
|
87
86
|
@request_settings.merge(
|
|
88
87
|
path: @request_settings[:path] + path,
|
|
@@ -109,7 +108,6 @@ module Superbot
|
|
|
109
108
|
http.read_timeout = Superbot.cloud_timeout
|
|
110
109
|
http.request(req)
|
|
111
110
|
end.tap do |response|
|
|
112
|
-
puts "Got response in #{Time.now - start_time} seconds"
|
|
113
111
|
output_response_errors(response)
|
|
114
112
|
end
|
|
115
113
|
end
|
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.26
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Superbots
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-12-
|
|
11
|
+
date: 2018-12-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: clamp
|