superbot-cloud 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/superbot/cloud/api.rb +14 -4
- data/lib/superbot/cloud/version.rb +1 -1
- data/superbot-cloud.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 818f223872b07123a628716166e28c11ac718bc6189ad2ea8ecc7cd2a8899309
|
4
|
+
data.tar.gz: 43ab623c489c0c5247ffc3a239c354c59ac59d00b9b2da06d228a69a9d911fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28efe01f5c5e8559f6c2dd37821ef4c5407d93ac2f3291ca3dbc6ff487def0ec195087bb7d7e2ecd2afe855c6d3dc7dfa45ba5ed606fdd252a93de7e363debf3
|
7
|
+
data.tar.gz: d442185c1a3ddbc6083695ac6b3346767c2aabd013abe7e6ffa7adc81e6bcd4172cd716f4a0b167c012c73ea3cd1cc9e7b1fe144ecb31294d8210d0c1234d537
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbot-cloud (0.1.
|
4
|
+
superbot-cloud (0.1.17)
|
5
5
|
marcel (= 0.3.3)
|
6
6
|
multipart-post (= 2.0.0)
|
7
7
|
|
@@ -67,14 +67,14 @@ GEM
|
|
67
67
|
rack-protection (= 2.0.3)
|
68
68
|
tilt (~> 2.0)
|
69
69
|
sinatra-silent (0.0.1)
|
70
|
-
superbot (0.1.
|
70
|
+
superbot (0.1.22)
|
71
71
|
clamp (= 1.2.1)
|
72
72
|
kommando (~> 0.1)
|
73
73
|
launchy (= 2.4.3)
|
74
74
|
selenium-webdriver (~> 3.14, >= 3.14.0)
|
75
75
|
sinatra (= 2.0.3)
|
76
76
|
sinatra-silent (= 0.0.1)
|
77
|
-
superbot-cloud (~> 0.1.
|
77
|
+
superbot-cloud (~> 0.1.16)
|
78
78
|
zaru (= 0.2.0)
|
79
79
|
tilt (2.0.8)
|
80
80
|
unicode-display_width (1.4.0)
|
@@ -88,7 +88,7 @@ DEPENDENCIES
|
|
88
88
|
rake (~> 10.0)
|
89
89
|
rspec (~> 3.0)
|
90
90
|
rubocop (~> 0.53)
|
91
|
-
superbot (~> 0.1.
|
91
|
+
superbot (~> 0.1.22)
|
92
92
|
superbot-cloud!
|
93
93
|
|
94
94
|
BUNDLED WITH
|
data/lib/superbot/cloud/api.rb
CHANGED
@@ -21,10 +21,20 @@ module Superbot
|
|
21
21
|
method, endpoint, required_param = ENDPOINT_MAP[type].values
|
22
22
|
uri = URI.parse([BASE_URI, endpoint, params[required_param]].compact.join('/'))
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
req
|
24
|
+
request_class = Net::HTTP.const_get(method.to_s.split('_').map(&:capitalize).join('::'))
|
25
|
+
|
26
|
+
params = params.compact
|
27
|
+
req =
|
28
|
+
case method
|
29
|
+
when :get
|
30
|
+
uri.query = URI.encode_www_form(params)
|
31
|
+
req = request_class.new(uri)
|
32
|
+
when :post_multipart
|
33
|
+
request_class.new(uri, params)
|
34
|
+
else
|
35
|
+
request_class.new(uri).tap { |r| r.set_form_data(params) }
|
36
|
+
end
|
37
|
+
|
28
38
|
if Superbot::Cloud.credentials
|
29
39
|
req['Authorization'] = format(
|
30
40
|
'Token token="%<token>s", email="%<email>s"',
|
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", "~> 0.1.
|
39
|
+
spec.add_development_dependency "superbot", "~> 0.1.22"
|
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.1.
|
4
|
+
version: 0.1.17
|
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-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multipart-post
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.22
|
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: 0.1.
|
54
|
+
version: 0.1.22
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|