superbot 0.1.8 → 0.1.9

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: e772b0c64120dbe7cecd03aa26896bf8a33e21f07328971792ba96aa64a076e7
4
- data.tar.gz: 21e1ef455fa034efa0a9f3fff304033adb2d2d9338099baeaf8a576cf8a0c1cc
3
+ metadata.gz: 9b92ae576ff82672508bbfe3d7620763df2fd2004a28f8da31a66d9ce1d470ea
4
+ data.tar.gz: 6e324743a0bbdbaa6f41cd31d70dabd9c67493dc8c034bc2f185a78103d4a3be
5
5
  SHA512:
6
- metadata.gz: 287417412fdb08e14ec4cc8e00b4bd1ddfefa8ddee8bfc2eeaad7131339a9f26a8b07d34553c5e73a529f42070f892424897afa1258ce4837f8c2f578e19710e
7
- data.tar.gz: 58c10b8151b46784bf9e1fde4b26af90e0cd4973b902fe7ef532237659209c0bee243488a1ff56f1230a14e52fb5fbb7fb808f252d9c3c3e7311ee705bed937c
6
+ metadata.gz: df458ef3f52997bf520e987d68ee07068c365add3bb19429928e0250d72e1fc048b7ecea68c78066248e11ffb9e0ae306ce291568d75b0ee408a5208395d6365
7
+ data.tar.gz: eb4a4e7e3358b4c03b56a0eec82467d1ab907a35bc3c70e98a0cbc187832dcaefafdf74055f29eecb6df77235c7468a8f12298f6bf2a24d9a5964ef2b73ef484
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbot (0.1.8)
4
+ superbot (0.1.9)
5
5
  clamp (= 1.2.1)
6
6
  kommando (~> 0.1)
7
7
  launchy (= 2.4.3)
@@ -11,7 +11,6 @@ module Superbot
11
11
  banner "superbot 🤖"
12
12
 
13
13
  subcommand ["new"], "Create a new project", NewCommand
14
- subcommand ["run"], "Run a project", RunCommand
15
14
  subcommand ["version"], "Show version information", VersionCommand
16
15
  subcommand ["teleport"], "Open a teleport for superbots", TeleportCommand
17
16
 
@@ -9,7 +9,7 @@ module Superbot
9
9
  validates_project_path path
10
10
  end
11
11
 
12
- option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'local' do |browser|
12
+ option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'cloud' do |browser|
13
13
  validates_browser_type browser
14
14
  end
15
15
  option ['--region'], 'REGION', 'Region for remote webdriver'
@@ -5,7 +5,7 @@ module Superbot
5
5
  class TeleportCommand < Clamp::Command
6
6
  include Superbot::Validations
7
7
 
8
- option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'local' do |browser|
8
+ option ['--browser'], 'BROWSER', "Browser type to use. Can be either local or cloud", default: 'cloud' do |browser|
9
9
  validates_browser_type browser
10
10
  end
11
11
  option ['--region'], 'REGION', 'Region for remote webdriver'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Superbot
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
data/lib/superbot/web.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  require "sinatra/base"
4
4
  require "sinatra/silent"
5
5
  require 'net/http'
6
- require 'selenium-webdriver'
7
6
 
8
7
  require_relative "capybara/convert"
9
8
  require_relative "capybara/runner"
@@ -61,17 +60,6 @@ module Superbot
61
60
  )
62
61
  status response.code
63
62
  headers instance.all_headers(response)
64
-
65
- if %w(cloud local_cloud).include?(webdriver_type) && verb == 'post' && request.path_info == '/wd/hub/session' && response.kind_of?(Net::HTTPSuccess)
66
- session_id = JSON.parse(response.body)['sessionId']
67
-
68
- puts "Opening screenshots stream..."
69
- options = Selenium::WebDriver::Chrome::Options.new
70
- options.add_argument("app=#{Superbot.screenshots_url(webdriver_type, session_id)}")
71
- options.add_argument('no-sandbox')
72
- ::Selenium::WebDriver.for :chrome, options: options
73
- end
74
-
75
63
  response.body
76
64
  rescue
77
65
  error_message = "Remote webdriver doesn't responding"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Superbots