upman-daemon 0.0.8.2 → 0.0.8.3
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/lib/upman/utils/api.rb +3 -2
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2321dce76427999e421044bbc162735fffdbd06f324b52589db46dd4fe910dd1
|
|
4
|
+
data.tar.gz: 7b5e754f6a175284dcca89f788e905558f599a3fcf6f0c4dde87a4c6c15626a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 238394e20b6bc3d5868e7eaa9f13de23af3bfe2c288a22ababa57a89851c4d282385c00a360c1a8b96cc636f25c6cade1705fa76f32798925319eeefa6e2b4fe
|
|
7
|
+
data.tar.gz: 98a1ebb47ed2513f42234997567e792b0d32c8696251b1872b0c4eca637a177068c77cda002af5cffa06411bacdf61a1399103495accfafb047dea43f551d1a2
|
data/lib/upman/utils/api.rb
CHANGED
|
@@ -21,10 +21,10 @@ module Upman
|
|
|
21
21
|
true
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
def post(api_endoint, data)
|
|
26
25
|
begin
|
|
27
|
-
|
|
26
|
+
info "Send POST request to #{_url}#{api_endoint}"
|
|
27
|
+
vu RestClient::Request.execute method: :post,
|
|
28
28
|
url: _url + api_endoint,
|
|
29
29
|
payload: data,
|
|
30
30
|
headers: {:accept => :json, content_type: :json},
|
|
@@ -44,6 +44,7 @@ module Upman
|
|
|
44
44
|
|
|
45
45
|
def get(api_endoint)
|
|
46
46
|
begin
|
|
47
|
+
info "Send GET request to #{_url}#{api_endoint}"
|
|
47
48
|
RestClient::Request.execute method: :get, url: _url + api_endoint, content_type: :json, accept: :json, user: Upman::Core::Config.foreman_api[:username], password: Upman::Core::Config.foreman_api[:password]
|
|
48
49
|
rescue RestClient::Unauthorized
|
|
49
50
|
fail "API Endpoint could not validate your credentials. Please check username or password"
|
data/lib/version.rb
CHANGED