klaro-client 0.9.2 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a703e8f2e9ff61a2e4837eab0c01280c4ed120c759612820025cc61cc4a388f2
4
- data.tar.gz: 006aa821e2f52abf9ecbbfb26508ddba4c5b9ecdb6275950ae26cd515f0e67f0
3
+ metadata.gz: d66d56adeb56d48ff9f1e27a90c05c44e561201612127a8393aca4e85338dd55
4
+ data.tar.gz: 3ea96d67064d3b2db2de7ce6b1a41e2585f8427917024d04c3a5da6b2e053bd9
5
5
  SHA512:
6
- metadata.gz: 4ea1ce2eed10b5daf9aafdbf6da20921344c721f4304dde95f7e8dbbe8cd072636a6c3e48546666dc038356c115e2d5eb9ecd40e8a46c857ba5570bc5c5af77b
7
- data.tar.gz: 240f893132695d654823ac854be92ff2935ea9b3d2922956784010f38eb8691dc86d1e137647c114d36fe13d167c547dca9eb0bcfc5db92c933f2a11c47cb45a
6
+ metadata.gz: 475c5f3e797ceaa506801af021d4e86ac7ac962244a828247bfb426351ae214ef1bdb99a986a718064d07b28418d479b21378cf138ff6703f028584904d08bac
7
+ data.tar.gz: 9f61528bc892ee1907f008c2a69b85dabbb6e961b298bf6dd0b093a32fb644cc25ec127a25923d5bf1e78e43e04705551cd373f33e2c8c318eb6209760034595
@@ -48,11 +48,11 @@ module Klaro
48
48
  )
49
49
  end
50
50
 
51
- def get(endpoint, raw = false)
51
+ def get(endpoint, raw = false, extra_headers = {})
52
52
  url = "#{base_url}#{endpoint}"
53
53
  info("GET `#{url}`")
54
54
  response = get_in_cache(url) do
55
- res = http.get(url, ssl_context: http_ctx)
55
+ res = http(extra_headers).get(url, ssl_context: http_ctx)
56
56
  raise Error::NoSuchBoardFound unless res.status == 200
57
57
  res.to_s
58
58
  end
@@ -25,12 +25,12 @@ module Klaro
25
25
  end
26
26
 
27
27
  def attachments
28
- @attachments || super.map{|a| Attachment.dress(a, @client) }
28
+ @attachments || (super || []).map{|a| Attachment.dress(a, @client) }
29
29
  end
30
30
 
31
31
  def cover_attachment(force = false)
32
32
  got = (self.attachments || []).find{|a| a[:isCover] }
33
- got = (self.attachments || []).first if got.nil? and force
33
+ got = (self.attachments || []).first if got.nil? && force
34
34
  got
35
35
  end
36
36
 
@@ -3,7 +3,7 @@ module Klaro
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 9
6
- TINY = 2
6
+ TINY = 3
7
7
  end
8
8
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
9
9
  end # class Client
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.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - enspirit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-07 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http