kobana 0.2.0 → 0.2.1

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: 0e0b0639fe29a20f6f650718a0669a52a4a0ec26be7b4dfb2d3aed802d23de1d
4
- data.tar.gz: a000e4c09633901fd7a379d4ba91251864bcfec4c78914b31a9c72fd28993f1d
3
+ metadata.gz: ccf8e0326bf5f97a4e007b26b10ebda16984ace0d4ab19c1350b4ecb30eb39a7
4
+ data.tar.gz: 2ce886e2366536b28c8dafb2faf9703e7b24d07c20e1937e713c586af1358e42
5
5
  SHA512:
6
- metadata.gz: '0194334668913ae15ec91ff9473e25407343094d405a81c71fd1651c69dacbc9af920a326f1b02ef628f247f8c7ec7b4222ec650a89df6b756dd8c339bf12d29'
7
- data.tar.gz: 153fc2b9af819e1881140d25935f9b939de25a2a0c76edfe66fc73e8919825a79d845eccfcae4de756585e7a6dab23d0e338a93075a4836e5de6b4e2a8887d1d
6
+ metadata.gz: 50d556a4f35b852e35c94b4f938dce334e8121141342a6ab7a149282291de790033cc4eddf2e04f48581fe22771e41da9c1fe66fd87b48f0c8b80267b6049cc8
7
+ data.tar.gz: cb1aa33ce4d2d847f50e8b42a3e43d674a6bb901fd15b35b7a3a2ec8749a03982eb5d2d0cc5804fbeb3f4918f5bd7f4f5e1fef9266dc9c26a0840a91704b8975
@@ -8,5 +8,10 @@ module Kobana
8
8
  @custom_headers = {}
9
9
  @environment = :sandbox
10
10
  end
11
+
12
+ def inspect
13
+ default_inspect = super
14
+ default_inspect.gsub(/api_token="(.*)"/, "api_token=\"[REDACTED]\"")
15
+ end
11
16
  end
12
17
  end
@@ -37,9 +37,19 @@ module Kobana
37
37
  template.gsub(/\{([^\}]+)\}/) do
38
38
  key = Regexp.last_match(1)
39
39
  begin
40
- attributes[key.to_sym].to_s
40
+ if key.include?(".")
41
+ value = attributes[key.tr(".", "_").to_sym].to_s
42
+ if value.empty?
43
+ keys = key.split(".").map(&:to_sym)
44
+ keys.reduce(attributes) { |acc, k| acc[k] }
45
+ else
46
+ value
47
+ end
48
+ else
49
+ attributes[key.to_sym].to_s
50
+ end
41
51
  rescue NameError
42
- "{#{key}}" # Keep original if variable is undefined
52
+ ""
43
53
  end
44
54
  end
45
55
  end
@@ -4,7 +4,7 @@ module Kobana
4
4
  module Resources
5
5
  module Financial
6
6
  class AccountBalance < Base
7
- self.resource_endpoint = "financial/accounts/{financial_account_uid}/balances"
7
+ self.resource_endpoint = "financial/accounts/{financial_account.uid}/balances"
8
8
  end
9
9
  end
10
10
  end
@@ -82,7 +82,7 @@ module Kobana
82
82
  new(response[:data].merge(updated: true))
83
83
  else
84
84
  handle_error_response(response)
85
- resource = new(attributes.merge(updated: false))
85
+ resource = self.class.new(attributes.merge(updated: false))
86
86
  resource.errors = @errors
87
87
  resource
88
88
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kobana
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kobana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kivanio Barbosa
8
8
  - Rafael Lima
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-06 00:00:00.000000000 Z
11
+ date: 2025-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday