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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f1a95abee93db19f4d05c95636d8c1ad1b75a39cba9795c83225c2264761714
4
- data.tar.gz: 7fc91f95945fbc53a0d4d3141aefe5acf5f0037ac1fa67b60abff95b38de11c7
3
+ metadata.gz: 84fbe4f5e88083d8a7c104b4cc9faf3c570aed519b63e40d8ee448ed02a7a5dd
4
+ data.tar.gz: adf8d9b6de1840e8f99c259e71c5e0459a3fcb20f6ae8d35902b9435468cfc06
5
5
  SHA512:
6
- metadata.gz: 5b8c20515406511a5c735932872ff79eff222228158e5bcbcd4d00720028d13fbac61137d0b5857b815c5225dcfb7c348983dab811c1567d038638a1b1d53123
7
- data.tar.gz: 5f9a88a3316ab7379c0b0315031b2f1564c382c4e6db8a219fb9d172d121eafd493df0bfb1e202b93632d01c77c585dc90b1b9f461c34db0010f9cdddd725eac
6
+ metadata.gz: 7c96996aea3649659dc19cfffc77d4f71934a2c73527736e7edc0f1ab1a8a09c14ec89e8598a9e7448dabee3f1b28eea367828f09322be074d2898a271a4a755
7
+ data.tar.gz: 3f1f0cbd54e5583ad318334cb8c839ba1f7dade0554e2f30acca797ddadfed1656bab15418ca9f6e0d8536484687404306fb5d8653017cb9ff1a7426926b9ffe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbot (0.1.25)
4
+ superbot (0.1.26)
5
5
  clamp (= 1.2.1)
6
6
  kommando (~> 0.1)
7
7
  launchy (= 2.4.3)
@@ -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.add_argument("force-dev-mode-highlighting")
24
- profile.add_extension(File.join(File.dirname(__dir__), '../..', 'bin', 'superside.crx'))
22
+ options.add_extension(File.join(File.dirname(__dir__), '../..', 'bin', 'superside.crx'))
23
+ browser = Selenium::WebDriver.for :chrome, options: options
25
24
 
26
- @superside = Selenium::WebDriver.for :chrome, options: options, profile: profile
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Superbot
4
- VERSION = "0.1.25"
4
+ VERSION = "0.1.26"
5
5
  end
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('TELEPORT_BIND_IP', "127.0.0.1")
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.25
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-03 00:00:00.000000000 Z
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp