neetodeploy 1.4.0 → 1.4.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/Gemfile.lock +1 -1
- data/lib/neeto_deploy/cli/session.rb +10 -6
- data/lib/neeto_deploy/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: 518719f22d6967ef7bc0acde463bad118be36bb2b4e0e8de6b28cb7f91110dd6
|
|
4
|
+
data.tar.gz: a08a4c651fde80dc3a348c517d3f43c415c985340395338fc878ee0704a14e62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7280eab15a0a7495a4ff364df2cc4647f340f4232488fe3231c6bda2b8ada04eed3e9a2050e90740e3495ff6e7ae124ec34abcbaa6a755fb16f32652d7da063
|
|
7
|
+
data.tar.gz: 84600455e6d2cc3aa9e4205399f62b10a26fe58b7a49d94ccc6e7f18a6185639acd88484d8c6aca65f65d4044b5335d5f62cf01d57cb5d16807dccbe30179b37
|
data/Gemfile.lock
CHANGED
|
@@ -19,28 +19,32 @@ module NeetoDeploy
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def send_get_request(url, body)
|
|
22
|
-
HTTParty.get(url, { query:
|
|
22
|
+
HTTParty.get(url, { query: body, headers: auth_headers, format: :json })
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def send_post_request(url, body)
|
|
26
|
-
HTTParty.post(url, { body:
|
|
26
|
+
HTTParty.post(url, { body: body.to_json, headers: json_auth_headers, format: :json })
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def send_patch_request(url, body)
|
|
30
|
-
HTTParty.patch(url, { body:
|
|
30
|
+
HTTParty.patch(url, { body: body.to_json, headers: json_auth_headers, format: :json })
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def send_delete_request(url, body)
|
|
34
|
-
HTTParty.delete(url, { body:
|
|
34
|
+
HTTParty.delete(url, { body: body.to_json, headers: json_auth_headers, format: :json })
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def
|
|
37
|
+
def auth_headers
|
|
38
38
|
session_info = JSON.parse(File.read(CLI_SESSION_STORE_FILE_PATH))
|
|
39
|
-
{
|
|
39
|
+
{ "Session-Token" => session_info["session_token"] }
|
|
40
40
|
rescue
|
|
41
41
|
raise Error.new("Unable to retrieve session info. Try logging in again.")
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
def json_auth_headers
|
|
45
|
+
auth_headers.merge("Content-Type" => "application/json")
|
|
46
|
+
end
|
|
47
|
+
|
|
44
48
|
def os
|
|
45
49
|
@os ||= (
|
|
46
50
|
host_os = RbConfig::CONFIG["host_os"]
|
data/lib/neeto_deploy/version.rb
CHANGED