superbot-cloud 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -13
- data/lib/superbot/cloud/api.rb +0 -1
- data/lib/superbot/cloud/cli/login_command.rb +2 -14
- data/lib/superbot/cloud/version.rb +1 -1
- data/superbot-cloud.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32ca8c61ab598e6e9bde5fd1e0e551daabed379a66e221c8e82be4c6c702a723
|
4
|
+
data.tar.gz: e034435538891ad9bec2f4b5538d19e3dee34294d69e36df01f4c0ba477d52b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a7614e9fbb75650f20e1177a6335ccba364cd46d39b65878b6cbfee94d65cd59628514dc18e0b9060c1bfa170ccef5ada695821229717ae465b9bbdd25cc66
|
7
|
+
data.tar.gz: f9e7f501faeee3c9fc5e6f5689164d6311bd889ee81bf36a4ec854f965b4099ac28f1eb693c1d961cf6692b0ee9528750056713cd1349a08937fd1e14041df09
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbot-cloud (0.2.
|
4
|
+
superbot-cloud (0.2.2)
|
5
5
|
marcel (= 0.3.3)
|
6
6
|
multipart-post (= 2.0.0)
|
7
7
|
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
clamp (1.2.1)
|
22
22
|
diff-lcs (1.3)
|
23
23
|
excon (0.62.0)
|
24
|
-
ffi (1.
|
24
|
+
ffi (1.10.0)
|
25
25
|
io-like (0.3.0)
|
26
26
|
jaro_winkler (1.5.1)
|
27
27
|
kommando (0.1.2)
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
mini_portile2 (2.4.0)
|
34
34
|
multipart-post (2.0.0)
|
35
35
|
mustermann (1.0.3)
|
36
|
-
nokogiri (1.
|
36
|
+
nokogiri (1.10.0)
|
37
37
|
mini_portile2 (~> 2.4.0)
|
38
38
|
parallel (1.12.1)
|
39
39
|
parser (2.5.1.2)
|
@@ -77,28 +77,28 @@ GEM
|
|
77
77
|
rack-protection (= 2.0.4)
|
78
78
|
tilt (~> 2.0)
|
79
79
|
sinatra-silent (0.0.1)
|
80
|
-
superbot (0.
|
80
|
+
superbot (0.3.0)
|
81
81
|
clamp (= 1.2.1)
|
82
|
-
kommando (
|
82
|
+
kommando (= 0.1.2)
|
83
83
|
launchy (= 2.4.3)
|
84
84
|
sinatra (= 2.0.4)
|
85
85
|
sinatra-silent (= 0.0.1)
|
86
|
-
superbot-cloud (
|
87
|
-
superbot-record
|
88
|
-
superbot-runner
|
89
|
-
superbot-selenium-webdriver (
|
90
|
-
superbot-teleport (
|
86
|
+
superbot-cloud (= 0.2.1)
|
87
|
+
superbot-record (= 0.1.0)
|
88
|
+
superbot-runner (= 0.1.2)
|
89
|
+
superbot-selenium-webdriver (= 1.0.5)
|
90
|
+
superbot-teleport (= 0.2.5)
|
91
91
|
zaru (= 0.2.0)
|
92
92
|
superbot-record (0.1.0)
|
93
93
|
superbot-record-chrome
|
94
94
|
superbot-record-chrome (0.1.0)
|
95
|
-
superbot-runner (0.1.
|
95
|
+
superbot-runner (0.1.2)
|
96
96
|
superbot-runner-side
|
97
97
|
superbot-runner-side (0.1.0)
|
98
98
|
superbot-selenium-webdriver (1.0.5)
|
99
99
|
chromedriver-helper (= 2.1.0)
|
100
100
|
selenium-webdriver (= 3.141.0)
|
101
|
-
superbot-teleport (0.2.
|
101
|
+
superbot-teleport (0.2.5)
|
102
102
|
excon
|
103
103
|
tilt (2.0.9)
|
104
104
|
unicode-display_width (1.4.0)
|
@@ -112,7 +112,7 @@ DEPENDENCIES
|
|
112
112
|
rake (~> 10.0)
|
113
113
|
rspec (~> 3.0)
|
114
114
|
rubocop (~> 0.53)
|
115
|
-
superbot
|
115
|
+
superbot (~> 0.3.0)
|
116
116
|
superbot-cloud!
|
117
117
|
|
118
118
|
BUNDLED WITH
|
data/lib/superbot/cloud/api.rb
CHANGED
@@ -7,7 +7,6 @@ module Superbot
|
|
7
7
|
module Api
|
8
8
|
BASE_URI = "#{Superbot::Cloud::BASE_URI}/api/v1"
|
9
9
|
ENDPOINT_MAP = {
|
10
|
-
login: { method: :post, endpoint: 'sessions' },
|
11
10
|
token: { method: :post, endpoint: 'token' },
|
12
11
|
organization_list: { method: :get, endpoint: 'organizations' },
|
13
12
|
test_list: { method: :get, endpoint: 'tests' },
|
@@ -7,11 +7,10 @@ module Superbot
|
|
7
7
|
module Cloud
|
8
8
|
module CLI
|
9
9
|
class LoginCommand < Clamp::Command
|
10
|
-
option ['-i', '--interactive'], :flag, 'interactive login from command line'
|
11
10
|
option ['-f', '--force'], :flag, 'force override current credentials'
|
12
11
|
|
13
12
|
def execute
|
14
|
-
return
|
13
|
+
return web_login if force? || Superbot::Cloud.credentials.nil?
|
15
14
|
|
16
15
|
begin
|
17
16
|
Superbot::Cloud::Api.request(:token)
|
@@ -19,21 +18,10 @@ module Superbot
|
|
19
18
|
puts "Logged in as #{user_creds[:username]} (#{user_creds[:email]})"
|
20
19
|
rescue SystemExit => e
|
21
20
|
abort unless e.message == 'Invalid credentials'
|
22
|
-
|
21
|
+
web_login
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
|
-
def proceed_to_login
|
27
|
-
interactive? ? console_login : web_login
|
28
|
-
end
|
29
|
-
|
30
|
-
def console_login
|
31
|
-
email = (print 'Email: '; $stdin.gets.rstrip)
|
32
|
-
password = (print 'Password: '; $stdin.gets.rstrip)
|
33
|
-
api_response = Superbot::Cloud::Api.request(:login, params: { email: email, password: password })
|
34
|
-
Superbot::Cloud.save_credentials(api_response)
|
35
|
-
end
|
36
|
-
|
37
25
|
def web_login
|
38
26
|
open_cloud_login_uri
|
39
27
|
Superbot::Web.run!
|
data/superbot-cloud.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_runtime_dependency "multipart-post", "2.0.0"
|
37
37
|
spec.add_runtime_dependency "marcel", "0.3.3"
|
38
38
|
|
39
|
-
spec.add_development_dependency "superbot"
|
39
|
+
spec.add_development_dependency "superbot", "~> 0.3.0"
|
40
40
|
spec.add_development_dependency "bundler", "~> 1.16"
|
41
41
|
spec.add_development_dependency "rake", "~> 10.0"
|
42
42
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbot-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbots
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multipart-post
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: superbot
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.3.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|