klaro-client 0.5.1 → 0.5.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/lib/klaro/client.rb +0 -4
- data/lib/klaro/client/request_handler.rb +7 -17
- data/lib/klaro/client/resource/story.rb +2 -1
- data/lib/klaro/client/version.rb +1 -1
- metadata +11 -18
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0fcb893254b798095805751fdebcea7a0ed6ab481decf7fa687393ba7e012ab
|
4
|
+
data.tar.gz: eec1632171921bf81f2c97c6c10a352a957c615e968d76296e4dc54ed0e96562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac3c1d551f1910aa193cc753fe036dc8fe360175963940f9a4c9d9b7281020b6a7e493b1bece4576bd7e974d04b4c07c75572f158d862566dd79616c80c7965
|
7
|
+
data.tar.gz: fdd82f48b35932038ab44ad0beccba73b710b1be2c3671af1e38088d501649a5e3124b4c01264af5cadc510bef6624c7cd06e81d8286e19d628ff20f30639e4a
|
data/lib/klaro/client.rb
CHANGED
@@ -6,9 +6,8 @@ module Klaro
|
|
6
6
|
attr_reader :base_url, :token
|
7
7
|
|
8
8
|
def initialize(url)
|
9
|
-
@base_url = url
|
9
|
+
@base_url = url
|
10
10
|
@token = nil
|
11
|
-
@subdomain = nil
|
12
11
|
end
|
13
12
|
|
14
13
|
def authenticated?
|
@@ -20,11 +19,6 @@ module Klaro
|
|
20
19
|
self
|
21
20
|
end
|
22
21
|
|
23
|
-
def with_project(subdomain)
|
24
|
-
@subdomain = subdomain
|
25
|
-
self
|
26
|
-
end
|
27
|
-
|
28
22
|
def authenticate(user, password)
|
29
23
|
@token = get_token Http
|
30
24
|
.headers({
|
@@ -71,16 +65,12 @@ module Klaro
|
|
71
65
|
end
|
72
66
|
|
73
67
|
def http
|
74
|
-
Http.headers(
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
"Content-Type" => "application/json"
|
81
|
-
}
|
82
|
-
hs['Klaro-Project-Subdomain'] = @subdomain if @subdomain
|
83
|
-
hs
|
68
|
+
Http.headers(
|
69
|
+
{
|
70
|
+
"Authorization" => @token,
|
71
|
+
"Content-Type" => "application/json"
|
72
|
+
}
|
73
|
+
)
|
84
74
|
end
|
85
75
|
|
86
76
|
def info(msg)
|
@@ -42,7 +42,8 @@ module Klaro
|
|
42
42
|
url = attachment.url
|
43
43
|
url += "?n=" + URI.encode_www_form_component(attachment.filename) unless url =~ /\?n=/
|
44
44
|
path = handle_image(url, root_path, target_folder, client)
|
45
|
-
attachment.
|
45
|
+
attachment.url = path
|
46
|
+
attachment
|
46
47
|
end
|
47
48
|
self.class.dress(self.to_h.merge(
|
48
49
|
attachments: as
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- enspirit
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -44,20 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '3.4'
|
47
|
+
version: 3.5.1
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '3.4'
|
54
|
+
version: 3.5.1
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: i18n
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,15 +108,14 @@ dependencies:
|
|
114
108
|
- - "~>"
|
115
109
|
- !ruby/object:Gem::Version
|
116
110
|
version: '3.7'
|
117
|
-
description:
|
118
|
-
email:
|
111
|
+
description:
|
112
|
+
email:
|
119
113
|
executables: []
|
120
114
|
extensions: []
|
121
115
|
extra_rdoc_files: []
|
122
116
|
files:
|
123
117
|
- Gemfile
|
124
118
|
- Rakefile
|
125
|
-
- VERSION
|
126
119
|
- lib/klaro/client.rb
|
127
120
|
- lib/klaro/client/errors.rb
|
128
121
|
- lib/klaro/client/request_handler.rb
|
@@ -136,11 +129,11 @@ files:
|
|
136
129
|
- lib/klaro/client/resource/story.rb
|
137
130
|
- lib/klaro/client/support/md_text.rb
|
138
131
|
- lib/klaro/client/version.rb
|
139
|
-
homepage:
|
132
|
+
homepage:
|
140
133
|
licenses:
|
141
134
|
- MIT
|
142
135
|
metadata: {}
|
143
|
-
post_install_message:
|
136
|
+
post_install_message:
|
144
137
|
rdoc_options: []
|
145
138
|
require_paths:
|
146
139
|
- lib
|
@@ -155,8 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
148
|
- !ruby/object:Gem::Version
|
156
149
|
version: '0'
|
157
150
|
requirements: []
|
158
|
-
rubygems_version: 3.1
|
159
|
-
signing_key:
|
151
|
+
rubygems_version: 3.2.1
|
152
|
+
signing_key:
|
160
153
|
specification_version: 4
|
161
154
|
summary: Klaro Client
|
162
155
|
test_files: []
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.0
|