superbot-local 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8f44ce66100b20cf75adfaf93025176d128eed7cd7c90a6a3834c67902df16e
4
- data.tar.gz: f4088710073f70c1ee4872a77cd97431e21b911019a69a71aade7939bdf605ce
3
+ metadata.gz: 9b506a0327e7c885a51f771a20cd6daac15df92571b0e374b4432c4538431b66
4
+ data.tar.gz: 509ddfb0214473da08b3d856a685f16c0eea8ba7de094f7c917c42dd2e669e43
5
5
  SHA512:
6
- metadata.gz: 50b1802e96bdc86a500d8ba86273e1804f8e6bd9a1b41ef012ebbf9ecf823e63c605ec47bad50b469423c11bdcb87545458de883b3d7f34e15d47307a2dc9812
7
- data.tar.gz: fbaf25ca44a343e0780038f99b83d6763b39c570fe70ff87276e913764cfec9eeeb6bf3a2eb767cada503dcb49683186609f7643c3b38f3d7acca78b4df0937a
6
+ metadata.gz: 512f1bc9853f15baf764f4dc4327cc1ad755c0d70d1f751c6e1a0101556a73a82cf92dcbae2c9566d79eade917c20e3e25b87a643cd591b071f64a88a139caae
7
+ data.tar.gz: ec06604b5060c3bfd79d8d6f0fec2d24af8e5c1cca41b70ac91ccd1648dc9d15c01314139b76fa7a118877132321497f486f123e0072bea2d1819a883b8bd462
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in superbot-local.gemspec
6
6
  gemspec
7
+
8
+ unless ENV['SUPERBOT_USE_RUBYGEMS'] == "yes"
9
+ gem "superbot-capybara", path: "../superbot-capybara"
10
+ end
data/Gemfile.lock CHANGED
@@ -1,32 +1,71 @@
1
+ PATH
2
+ remote: ../superbot-capybara
3
+ specs:
4
+ superbot-capybara (1.0.2)
5
+ capybara (= 3.12.0)
6
+ cjsonci (= 0.2.0)
7
+ superbot-selenium-webdriver (= 1.0.1)
8
+
1
9
  PATH
2
10
  remote: .
3
11
  specs:
4
- superbot-local (0.1.3)
5
- superbot (= 0.1.7)
12
+ superbot-local (0.1.4)
13
+ superbot (~> 0.1.29)
14
+ superbot-capybara (~> 1.0.2)
6
15
 
7
16
  GEM
8
17
  remote: https://rubygems.org/
9
18
  specs:
10
19
  addressable (2.5.2)
11
20
  public_suffix (>= 2.0.2, < 4.0)
21
+ archive-zip (0.11.0)
22
+ io-like (~> 0.3.0)
12
23
  ast (2.4.0)
24
+ capybara (3.12.0)
25
+ addressable
26
+ mini_mime (>= 0.1.3)
27
+ nokogiri (~> 1.8)
28
+ rack (>= 1.6.0)
29
+ rack-test (>= 0.6.3)
30
+ regexp_parser (~> 1.2)
31
+ xpath (~> 3.2)
32
+ childprocess (0.9.0)
33
+ ffi (~> 1.0, >= 1.0.11)
34
+ chromedriver-helper (2.1.0)
35
+ archive-zip (~> 0.10)
36
+ nokogiri (~> 1.8)
37
+ cjsonci (0.2.0)
13
38
  clamp (1.2.1)
14
39
  diff-lcs (1.3)
40
+ excon (0.62.0)
41
+ ffi (1.9.25)
42
+ io-like (0.3.0)
15
43
  jaro_winkler (1.5.1)
16
44
  kommando (0.1.2)
17
45
  launchy (2.4.3)
18
46
  addressable (~> 2.3)
47
+ marcel (0.3.3)
48
+ mimemagic (~> 0.3.2)
49
+ mimemagic (0.3.2)
50
+ mini_mime (1.0.1)
51
+ mini_portile2 (2.3.0)
52
+ multipart-post (2.0.0)
19
53
  mustermann (1.0.3)
54
+ nokogiri (1.8.5)
55
+ mini_portile2 (~> 2.3.0)
20
56
  parallel (1.12.1)
21
57
  parser (2.5.1.2)
22
58
  ast (~> 2.4.0)
23
59
  powerpack (0.1.2)
24
60
  public_suffix (3.0.3)
25
- rack (2.0.5)
26
- rack-protection (2.0.3)
61
+ rack (2.0.6)
62
+ rack-protection (2.0.4)
27
63
  rack
64
+ rack-test (1.1.0)
65
+ rack (>= 1.0, < 3)
28
66
  rainbow (3.0.0)
29
67
  rake (10.5.0)
68
+ regexp_parser (1.3.0)
30
69
  rspec (3.8.0)
31
70
  rspec-core (~> 3.8.0)
32
71
  rspec-expectations (~> 3.8.0)
@@ -49,21 +88,38 @@ GEM
49
88
  ruby-progressbar (~> 1.7)
50
89
  unicode-display_width (~> 1.0, >= 1.0.1)
51
90
  ruby-progressbar (1.10.0)
52
- sinatra (2.0.3)
91
+ rubyzip (1.2.2)
92
+ selenium-webdriver (3.141.0)
93
+ childprocess (~> 0.5)
94
+ rubyzip (~> 1.2, >= 1.2.2)
95
+ sinatra (2.0.4)
53
96
  mustermann (~> 1.0)
54
97
  rack (~> 2.0)
55
- rack-protection (= 2.0.3)
98
+ rack-protection (= 2.0.4)
56
99
  tilt (~> 2.0)
57
100
  sinatra-silent (0.0.1)
58
- superbot (0.1.7)
101
+ superbot (0.1.29)
59
102
  clamp (= 1.2.1)
60
103
  kommando (~> 0.1)
61
104
  launchy (= 2.4.3)
62
- sinatra (= 2.0.3)
105
+ sinatra (= 2.0.4)
63
106
  sinatra-silent (= 0.0.1)
107
+ superbot-cloud (~> 0.1.19)
108
+ superbot-selenium-webdriver (~> 1.0.1)
109
+ superbot-teleport (~> 0.2.2)
64
110
  zaru (= 0.2.0)
65
- tilt (2.0.8)
111
+ superbot-cloud (0.1.19)
112
+ marcel (= 0.3.3)
113
+ multipart-post (= 2.0.0)
114
+ superbot-selenium-webdriver (1.0.1)
115
+ chromedriver-helper (= 2.1.0)
116
+ selenium-webdriver (= 3.141.0)
117
+ superbot-teleport (0.2.2)
118
+ excon
119
+ tilt (2.0.9)
66
120
  unicode-display_width (1.4.0)
121
+ xpath (3.2.0)
122
+ nokogiri (~> 1.8)
67
123
  zaru (0.2.0)
68
124
 
69
125
  PLATFORMS
@@ -74,7 +130,8 @@ DEPENDENCIES
74
130
  rake (~> 10.0)
75
131
  rspec (~> 3.0)
76
132
  rubocop (~> 0.53)
133
+ superbot-capybara!
77
134
  superbot-local!
78
135
 
79
136
  BUNDLED WITH
80
- 1.16.6
137
+ 1.17.1
data/exe/superbot-local CHANGED
@@ -11,4 +11,4 @@ STDOUT.sync = true
11
11
  require 'superbot'
12
12
  require 'superbot/local'
13
13
 
14
- Superbot::CLI::LocalCommand.run
14
+ Superbot::Local::CLI::RootCommand.run
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'selenium-webdriver'
4
+
5
+ module Superbot
6
+ module Local
7
+ module CLI
8
+ class EasyModeCommand < Clamp::Command
9
+ def execute
10
+ puts "Press [control+c] to exit"
11
+ open_step_editor
12
+ chromedriver_path = Chromedriver::Helper.new.binary_path
13
+ @chromedriver = Kommando.run_async "#{chromedriver_path} --silent --port=9515 --url-base=/wd/hub"
14
+ @web = Superbot::Web.run!(webdriver_type: 'local')
15
+ ensure
16
+ close_step_editor
17
+ end
18
+
19
+ private
20
+
21
+ def open_step_editor
22
+ options = ::Selenium::WebDriver::Chrome::Options.new
23
+ options.add_argument("app=#{Superbot::Local.step_editor_url}")
24
+ options.add_argument('no-sandbox')
25
+ @step_editor = ::Selenium::WebDriver.for :chrome, options: options
26
+ end
27
+
28
+ def close_step_editor
29
+ @chromedriver&.kill
30
+ @step_editor&.quit
31
+ @web&.quit!
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,11 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'local_command'
3
+ require_relative 'version_command'
4
+ require_relative 'easy_mode_command'
4
5
 
5
6
  module Superbot
6
- module CLI
7
- class RootCommand < Clamp::Command
8
- subcommand ['local'], "Show local commands", LocalCommand
7
+ module Local
8
+ module CLI
9
+ class RootCommand < Clamp::Command
10
+ subcommand ['version'], "Superbot local version", VersionCommand
11
+ subcommand ['easymode'], "Superbot UI test constructor", EasyModeCommand
12
+
13
+ def self.run
14
+ super
15
+ rescue StandardError => exc
16
+ warn exc.message
17
+ warn exc.backtrace.join("\n")
18
+ end
19
+ end
9
20
  end
10
21
  end
11
22
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Superbot
4
- module CLI
5
- module Local
4
+ module Local
5
+ module CLI
6
6
  class VersionCommand < Clamp::Command
7
7
  def execute
8
8
  puts Superbot::Local::VERSION
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Superbot
4
4
  module Local
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
@@ -32,8 +32,8 @@ 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.7"
36
- # spec.add_runtime_dependency "superbot-capybara", "~> 360.0", ">= 360.0.0"
35
+ spec.add_runtime_dependency "superbot", "~> 0.1.29"
36
+ spec.add_runtime_dependency "superbot-capybara", "~> 1.0.2"
37
37
 
38
38
  spec.add_development_dependency "bundler", "~> 1.16"
39
39
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbot-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
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-05 00:00:00.000000000 Z
11
+ date: 2018-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: superbot
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.7
19
+ version: 0.1.29
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.29
27
+ - !ruby/object:Gem::Dependency
28
+ name: superbot-capybara
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 0.1.7
40
+ version: 1.0.2
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -104,10 +118,9 @@ files:
104
118
  - exe/superbot-local
105
119
  - lib/superbot/local.rb
106
120
  - lib/superbot/local/cli.rb
107
- - lib/superbot/local/cli/local/easy_mode_command.rb
108
- - lib/superbot/local/cli/local/version_command.rb
109
- - lib/superbot/local/cli/local_command.rb
121
+ - lib/superbot/local/cli/easy_mode_command.rb
110
122
  - lib/superbot/local/cli/root_command.rb
123
+ - lib/superbot/local/cli/version_command.rb
111
124
  - lib/superbot/local/version.rb
112
125
  - mytest/main.rb
113
126
  - superbot-local.gemspec
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'selenium-webdriver'
4
- require 'superbot/cli/teleport_command'
5
-
6
- module Superbot
7
- module CLI
8
- module Local
9
- class EasyModeCommand < Clamp::Command
10
- def execute
11
- open_step_editor
12
- open_teleport
13
-
14
- puts "Press ENTER to exit"
15
-
16
- $stdin.gets
17
-
18
- ensure
19
- close_step_editor
20
- close_teleport
21
- end
22
-
23
- private
24
-
25
- def open_step_editor
26
- options = Selenium::WebDriver::Chrome::Options.new
27
- options.add_argument("app=#{Superbot::Local.step_editor_url}")
28
- options.add_argument('no-sandbox')
29
- @step_editor = Selenium::WebDriver.for :chrome, options: options
30
- end
31
-
32
- def close_step_editor
33
- @step_editor.quit
34
- end
35
-
36
- def open_teleport
37
- @teleport = Thread.new do
38
- Superbot::CLI::TeleportCommand.run(nil, [], context)
39
- end
40
- end
41
-
42
- def close_teleport
43
- @teleport.kill
44
- end
45
- end
46
- end
47
- end
48
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'local/version_command'
4
- require_relative 'local/easy_mode_command'
5
-
6
- module Superbot
7
- module CLI
8
- class LocalCommand < Clamp::Command
9
- subcommand ['version'], "Superbot local version", Local::VersionCommand
10
- subcommand ['easymode'], "Superbot UI test constructor", Local::EasyModeCommand
11
-
12
- def self.run
13
- super
14
- rescue StandardError => exc
15
- warn exc.message
16
- warn exc.backtrace.join("\n")
17
- end
18
- end
19
- end
20
- end