proboscis_cli 0.0.9 → 0.1.2
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 +4 -4
- data/README.md +2 -0
- data/lib/proboscis_cli/version.rb +1 -1
- data/lib/proboscis_cli.rb +7 -7
- data/proboscis_cli.gemspec +2 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cbc736f1e936f45c8e4e167a55784f18063f2fb2e13ed0c2e9856164d28c669
|
4
|
+
data.tar.gz: 56ef338a7d07d409cbc896e4a2aea335bf4ca819e97b9d2c015b7c0905efec57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b526a18fa1804f32effab07f444a09f38d38ed2f64351f4b8927b1491908168931e1d364ec566ee37d30599ddaa8d0e72fcba9722b998a54b85ab0f8fe2017bc
|
7
|
+
data.tar.gz: ad6dc3458017ec850867e0bb0bad01066d6b5fa0950f20a3033204e20c386599d2f2ac2b963526c44c2eb0a93f96275ccb927b282d305d7b4aa7c722027fae24
|
data/README.md
CHANGED
@@ -32,6 +32,8 @@ Or install it yourself as:
|
|
32
32
|
$ export proboscis_prod_target_user=<target_ssh_user>
|
33
33
|
$ export araneae_qa_token=<araneae_token>
|
34
34
|
$ export araneae_prod_token=<araneae_token>
|
35
|
+
$ export proboscis_qa_cli_key=<cli_key_to_bypass_captcha>
|
36
|
+
$ export proboscis_prod_cli_key=<cli_key_to_bypass_captcha>
|
35
37
|
```
|
36
38
|
|
37
39
|
```bash
|
data/lib/proboscis_cli.rb
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
class Server < Machine
|
13
13
|
def self.ip(auth_code, host, environment, subdomain, type, subpath)
|
14
|
-
response = HTTParty.get("#{host}/api/
|
14
|
+
response = HTTParty.get("#{host}/api/web/hives/#{subdomain}/#{type}", headers: {"X-Authorization" => auth_code})
|
15
15
|
if response.code != 200
|
16
16
|
puts "Unable to fetch details for domain #{subdomain}"
|
17
17
|
exit -1
|
@@ -68,7 +68,7 @@ class Worker < Machine
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.client_list(environment)
|
71
|
-
response = HTTParty.get("#{@host}/api/
|
71
|
+
response = HTTParty.get("#{@host}/api/web/clients", headers: {"X-Authorization" => @auth_code})
|
72
72
|
if response.code != 200
|
73
73
|
puts "Unable to get the client list.."
|
74
74
|
exit -1
|
@@ -77,7 +77,7 @@ class Worker < Machine
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.client(environment, client_id)
|
80
|
-
response = HTTParty.get("#{@host}/api/
|
80
|
+
response = HTTParty.get("#{@host}/api/web/clients/#{client_id["id"]}/products", headers: {"X-Authorization" => @auth_code})
|
81
81
|
if response.code != 200
|
82
82
|
puts "Unable to fetch details of client with id #{client_id}"
|
83
83
|
exit -1
|
@@ -127,15 +127,15 @@ class Proboscis
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def self.get_machine(target, type)
|
130
|
-
if type == '
|
131
|
-
target == 'server' ? Server : Worker
|
132
|
-
else
|
130
|
+
if type == 'CASH_REPLENISHMENT'
|
133
131
|
target == 'server' ? CashServer : CashWorker
|
132
|
+
else
|
133
|
+
target == 'server' ? Server : Worker
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
137
|
def self.login(environment)
|
138
|
-
response = HTTParty.post("#{@host}/api/login", body: {phoneNumber: self.param(environment, 'user'), password: self.param(environment, 'pass')}.to_json, headers: { 'Content-Type' => 'application/json' })
|
138
|
+
response = HTTParty.post("#{@host}/api/login", body: {phoneNumber: self.param(environment, 'user'), password: self.param(environment, 'pass')}.to_json, headers: { 'Content-Type' => 'application/json', 'X-Captcha-Cli-Secret': self.param(environment, 'cli_key')})
|
139
139
|
if response.code != 200
|
140
140
|
puts "Unable to login to proboscis.."
|
141
141
|
exit -1
|
data/proboscis_cli.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'proboscis_cli'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.1.2'
|
4
4
|
s.date = '2018-04-10'
|
5
5
|
s.summary = "A cli client for proboscis"
|
6
6
|
s.description = "A cli client for proboscis"
|
7
|
-
s.authors = ["
|
7
|
+
s.authors = ["Delium engineering"]
|
8
8
|
s.email = 'info@delium.co'
|
9
9
|
s.homepage =
|
10
10
|
'http://rubygems.org/gems/proboscis_cli'
|
metadata
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proboscis_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Arvind
|
7
|
+
- Delium engineering
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
@@ -88,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: '0'
|
90
89
|
requirements: []
|
91
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.3.7
|
92
91
|
signing_key:
|
93
92
|
specification_version: 4
|
94
93
|
summary: A cli client for proboscis
|