superbot-cloud 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.relaxed.yml +165 -0
- data/.rubocop.yml +64 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +91 -0
- data/LICENSE.txt +21 -0
- data/README.md +61 -0
- data/Rakefile +8 -0
- data/bin/console +16 -0
- data/bin/release +23 -0
- data/bin/setup +8 -0
- data/exe/superbot-cloud +14 -0
- data/lib/superbot/cloud.rb +29 -0
- data/lib/superbot/cloud/api.rb +43 -0
- data/lib/superbot/cloud/cli.rb +3 -0
- data/lib/superbot/cloud/cli/cloud/login_command.rb +55 -0
- data/lib/superbot/cloud/cli/cloud/organization/list_command.rb +23 -0
- data/lib/superbot/cloud/cli/cloud/organization_command.rb +20 -0
- data/lib/superbot/cloud/cli/cloud/test/delete_command.rb +26 -0
- data/lib/superbot/cloud/cli/cloud/test/list_command.rb +30 -0
- data/lib/superbot/cloud/cli/cloud/test/upload_command.rb +52 -0
- data/lib/superbot/cloud/cli/cloud/test_command.rb +24 -0
- data/lib/superbot/cloud/cli/cloud/validations.rb +13 -0
- data/lib/superbot/cloud/cli/cloud/version_command.rb +13 -0
- data/lib/superbot/cloud/cli/cloud_command.rb +25 -0
- data/lib/superbot/cloud/cli/root_command.rb +11 -0
- data/lib/superbot/cloud/version.rb +7 -0
- data/lib/superbot/cloud/web_login.rb +35 -0
- data/superbot-cloud.gemspec +50 -0
- metadata +259 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "cloud/validations"
|
4
|
+
require_relative 'cloud/login_command'
|
5
|
+
require_relative 'cloud/version_command'
|
6
|
+
require_relative 'cloud/organization_command'
|
7
|
+
require_relative 'cloud/test_command'
|
8
|
+
|
9
|
+
module Superbot
|
10
|
+
module CLI
|
11
|
+
class CloudCommand < Clamp::Command
|
12
|
+
subcommand ['version'], "Superbot cloud version", Cloud::VersionCommand
|
13
|
+
subcommand ['login'], "Login to superbot cloud", Cloud::LoginCommand
|
14
|
+
subcommand ['org'], "Manage your organizations", Cloud::OrganizationCommand
|
15
|
+
subcommand ['test'], "Manage your tests", Cloud::TestCommand
|
16
|
+
|
17
|
+
def self.run
|
18
|
+
super
|
19
|
+
rescue StandardError => exc
|
20
|
+
warn exc.message
|
21
|
+
warn exc.backtrace.join("\n")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'sinatra'
|
4
|
+
require "sinatra/silent"
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module Superbot
|
8
|
+
module Cloud
|
9
|
+
class WebLogin
|
10
|
+
def initialize
|
11
|
+
@sinatra = Sinatra.new do
|
12
|
+
set :bind, "127.0.0.1"
|
13
|
+
set :silent_sinatra, true
|
14
|
+
set :silent_webrick, true
|
15
|
+
set :silent_access_log, false
|
16
|
+
|
17
|
+
get "/login" do
|
18
|
+
credentials = request.params.slice('email', 'token')
|
19
|
+
request.params['error'] || Superbot::Cloud.save_credentials(credentials)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.run!
|
25
|
+
new.run!
|
26
|
+
end
|
27
|
+
|
28
|
+
def run!
|
29
|
+
Thread.new do
|
30
|
+
@sinatra.run!
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "superbot/cloud/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "superbot-cloud"
|
8
|
+
spec.version = Superbot::Cloud::VERSION
|
9
|
+
spec.authors = ["Superbots"]
|
10
|
+
spec.email = [""]
|
11
|
+
|
12
|
+
spec.summary = %q{Superbot Cloud}
|
13
|
+
spec.homepage = "https://github.com/superbothq/superbot-cloud"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
# if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
+
# else
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
# "public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
+
end
|
30
|
+
puts spec.files
|
31
|
+
spec.bindir = "exe"
|
32
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
|
+
spec.require_paths = ["lib"]
|
34
|
+
|
35
|
+
spec.add_dependency "multipart-post", "2.0.0"
|
36
|
+
|
37
|
+
spec.add_runtime_dependency "superbot", "~> 0.1.2"
|
38
|
+
spec.add_runtime_dependency "clamp", "1.2.1"
|
39
|
+
spec.add_runtime_dependency "zaru", "0.2.0"
|
40
|
+
spec.add_runtime_dependency "sinatra", "2.0.3"
|
41
|
+
spec.add_runtime_dependency "launchy", "2.4.3"
|
42
|
+
spec.add_runtime_dependency "sinatra-silent", "0.0.1"
|
43
|
+
spec.add_runtime_dependency "marcel", "0.3.3"
|
44
|
+
|
45
|
+
spec.add_development_dependency "kommando", "~> 0.1"
|
46
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
47
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
48
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
49
|
+
spec.add_development_dependency "rubocop", "~> 0.53"
|
50
|
+
end
|
metadata
ADDED
@@ -0,0 +1,259 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: superbot-cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Superbots
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: multipart-post
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: superbot
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: clamp
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.2.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.2.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: zaru
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sinatra
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.0.3
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.0.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: launchy
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.4.3
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.4.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: sinatra-silent
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.0.1
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.0.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: marcel
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.3.3
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.3.3
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: kommando
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.1'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bundler
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.16'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.16'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '10.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '10.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '3.0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '3.0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.53'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.53'
|
195
|
+
description:
|
196
|
+
email:
|
197
|
+
- ''
|
198
|
+
executables:
|
199
|
+
- superbot-cloud
|
200
|
+
extensions: []
|
201
|
+
extra_rdoc_files: []
|
202
|
+
files:
|
203
|
+
- ".gitignore"
|
204
|
+
- ".rspec"
|
205
|
+
- ".rubocop.relaxed.yml"
|
206
|
+
- ".rubocop.yml"
|
207
|
+
- ".travis.yml"
|
208
|
+
- CODE_OF_CONDUCT.md
|
209
|
+
- Gemfile
|
210
|
+
- Gemfile.lock
|
211
|
+
- LICENSE.txt
|
212
|
+
- README.md
|
213
|
+
- Rakefile
|
214
|
+
- bin/console
|
215
|
+
- bin/release
|
216
|
+
- bin/setup
|
217
|
+
- exe/superbot-cloud
|
218
|
+
- lib/superbot/cloud.rb
|
219
|
+
- lib/superbot/cloud/api.rb
|
220
|
+
- lib/superbot/cloud/cli.rb
|
221
|
+
- lib/superbot/cloud/cli/cloud/login_command.rb
|
222
|
+
- lib/superbot/cloud/cli/cloud/organization/list_command.rb
|
223
|
+
- lib/superbot/cloud/cli/cloud/organization_command.rb
|
224
|
+
- lib/superbot/cloud/cli/cloud/test/delete_command.rb
|
225
|
+
- lib/superbot/cloud/cli/cloud/test/list_command.rb
|
226
|
+
- lib/superbot/cloud/cli/cloud/test/upload_command.rb
|
227
|
+
- lib/superbot/cloud/cli/cloud/test_command.rb
|
228
|
+
- lib/superbot/cloud/cli/cloud/validations.rb
|
229
|
+
- lib/superbot/cloud/cli/cloud/version_command.rb
|
230
|
+
- lib/superbot/cloud/cli/cloud_command.rb
|
231
|
+
- lib/superbot/cloud/cli/root_command.rb
|
232
|
+
- lib/superbot/cloud/version.rb
|
233
|
+
- lib/superbot/cloud/web_login.rb
|
234
|
+
- superbot-cloud.gemspec
|
235
|
+
homepage: https://github.com/superbothq/superbot-cloud
|
236
|
+
licenses:
|
237
|
+
- MIT
|
238
|
+
metadata: {}
|
239
|
+
post_install_message:
|
240
|
+
rdoc_options: []
|
241
|
+
require_paths:
|
242
|
+
- lib
|
243
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - ">="
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
248
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
|
+
requirements:
|
250
|
+
- - ">="
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
version: '0'
|
253
|
+
requirements: []
|
254
|
+
rubyforge_project:
|
255
|
+
rubygems_version: 2.7.6
|
256
|
+
signing_key:
|
257
|
+
specification_version: 4
|
258
|
+
summary: Superbot Cloud
|
259
|
+
test_files: []
|