klaro-client 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/klaro/client/request_handler.rb +11 -6
- data/lib/klaro/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5254e23cef2ad85ee5aad4c5bcdd4a4171ee31e15553b5fca1707b659fd2546
|
4
|
+
data.tar.gz: ef6d17c7c3d7f9aad73c594f2fb1368078165e7be179dae4daf578c7b1310d7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ab49ef56322aff2111b1c80e16cb83850da811704a4f61cea4441b337d873bef9dedefdf4df9f8e9f11073d250b08ea029656c318122383c4adfde8f13c7db6
|
7
|
+
data.tar.gz: 55f9d63ca3ae7afb22622e0354046f9b87e00723e33b40de52fa0da521108985a0ca90bebac59b2d22c0219ba10d82884cfd2aa56ef072e8ab6336999427f2a1
|
@@ -9,6 +9,7 @@ module Klaro
|
|
9
9
|
@base_url = url.gsub(/\/api\/?$/, "")
|
10
10
|
@token = nil
|
11
11
|
@subdomain = nil
|
12
|
+
@workspace = nil
|
12
13
|
end
|
13
14
|
|
14
15
|
def authenticated?
|
@@ -25,12 +26,15 @@ module Klaro
|
|
25
26
|
self
|
26
27
|
end
|
27
28
|
|
28
|
-
def authenticate(user, password)
|
29
|
-
@
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
def authenticate(user, password, workspace = nil)
|
30
|
+
@workspace = workspace
|
31
|
+
@token = get_token(
|
32
|
+
Http
|
33
|
+
.headers({
|
34
|
+
'Content-Type' => 'application/json'
|
35
|
+
})
|
36
|
+
.post("#{base_url}/api/auth/tokens/", payload(user, password))
|
37
|
+
)
|
34
38
|
end
|
35
39
|
|
36
40
|
def get(endpoint, raw = false)
|
@@ -80,6 +84,7 @@ module Klaro
|
|
80
84
|
"Content-Type" => "application/json"
|
81
85
|
}
|
82
86
|
hs['Klaro-Project-Subdomain'] = @subdomain if @subdomain
|
87
|
+
hs['X-Klaro-ViewAs'] = @workspace if @workspace
|
83
88
|
hs
|
84
89
|
end
|
85
90
|
|
data/lib/klaro/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klaro-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- enspirit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|