conexa 0.0.6 → 0.0.8

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: 36d99a4b545fbac48a40c71a375b5dd868a4cb057abe8bb4d4417994586555a7
4
- data.tar.gz: b113c900731b1af50ca9fd4d66aa743de5fa146645a60d86edcb04e1f3dd5d17
3
+ metadata.gz: '050626980d9f896ca2c70ed30a27c1cfda7d0d30c89e25c90e86422d122fb1af'
4
+ data.tar.gz: 43134221ca4dd8f38bc3f8a62bfffe2807d1565e949e2adf72d446fa14db01cf
5
5
  SHA512:
6
- metadata.gz: 003b1c0557ffeab9d3c57c787e4050d18f8eee04bfebfb3173853afa6953a310a7c13fc3bdd9c56660f05f5c166c6a7aab4583259662d5f80ff208222908a0c8
7
- data.tar.gz: e491c9d14432bf28d006cfaa6824a092ecc7731135b5c8c43f03e24f37059b8e30697d4a007c7c68b4ad592bb7c626b824485370778ed88946c62aad34fc852e
6
+ metadata.gz: 298ef626afb7783dff6d66161e20ff4b28b30b0d81761ce3f5debf187f1d60e0d01814004d3372ad6531b5e40e22e110af471522bbc577e3c0baac63dfb17014
7
+ data.tar.gz: 768fbc470c103074ff5b768bf78ba6ed47385c4d06a7cadba7aed395947da92c73756c8f72c06e66be15520974c7f0c2e8438dfc567181cc83357416cad251d5
data/CHANGELOG.md CHANGED
@@ -1,26 +1,68 @@
1
- ## 0.0.6
2
- ### Bug Fixes
3
- - **camelize_hash nil guard** - Adiciona proteção contra `nil` no método `camelize_hash` para evitar `NoMethodError: undefined method 'each' for nil:NilClass` quando a API retorna resposta inesperada ([#6](https://github.com/guilhermegazzinelli/conexa-ruby/pull/6))
4
- - **Result#empty? delegation** - Corrige `empty?` no `Result` para delegar para `data.empty?` ao invés de verificar `@attributes.empty?`. Isso corrige o caso onde resultados vazios retornavam `false` em `empty?` devido à presença de dados de paginação ([#7](https://github.com/guilhermegazzinelli/conexa-ruby/pull/7), closes [#5](https://github.com/guilhermegazzinelli/conexa-ruby/issues/5))
5
-
6
- ### Tests
7
- - Adiciona testes para `camelize_hash` com input `nil`
8
- - Adiciona spec completo para `Conexa::Result` (`spec/conexa/resources/result_spec.rb`)
9
-
10
- ## 0.0.5
11
- - Adiciona novos recursos: `InvoicingMethod`, `CreditCard`, `Supplier`, `Company`
12
- - Adiciona sub-processos em recursos existentes:
13
- - `Charge#settle` - Quitar cobrança
14
- - `Charge#pix` - Obter QR Code PIX
15
- - `Contract#end_contract` - Encerrar contrato
16
- - `RecurringSale#end_recurring_sale` - Encerrar venda recorrente
17
- - Adiciona documentação de paginação, filtragem e navegação no README
18
- - Adiciona README em português (README_pt-BR.md)
19
- - Documenta delegação de métodos do Result para data (first, last, length, etc.)
20
-
21
- ## 0.0.4
22
- - Adiciona paginação em elementos que retornam array e possuam pagination no objeto de resposta
23
- - Adiciona delegação para métodos com blocos ao receber um Conexa::Result
24
-
25
- ## 0.0.1
26
- - Início da Gem Conexa Ruby
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.0.8] - 2026-02-19
11
+
12
+ ### Fixed
13
+ - `Auth.login` usava `Request.post` (inclui header Authorization) ao invés de `Request.auth`
14
+ - `Model#primary_key_name` retornava nomes incorretos para classes compostas (ex: `creditcard_id` ao invés de `credit_card_id`)
15
+ - `Model.destroy(id)` falhava para resources com `primary_key_attribute` definido
16
+ - `Model#destroy` retornava Hash interno ao invés de `self`
17
+ - `Person` tinha `find`, `all` e `find_by` desnecessariamente desabilitados (a API suporta todos os endpoints CRUD)
18
+
19
+ ### Added
20
+ - Testes de autenticação com cassettes VCR (13 specs)
21
+ - Testes de integração WebMock para Sale, RecurringSale, Plan, Product, Bill, Supplier, Company, CreditCard, Person e InvoicingMethod
22
+ - Total de testes: 407 specs
23
+
24
+ ### Changed
25
+ - `REFERENCE.md` reescrito com documentação completa de todos os endpoints baseada na collection Postman
26
+ - nokogiri atualizado para 1.19.1
27
+
28
+ ## [0.0.7] - 2026-02-12
29
+
30
+ ### Added
31
+ - REFERENCE.md - Complete API reference optimized for LLMs/AI agents
32
+ - Comprehensive test suite (330+ specs)
33
+ - `Model.primary_key_attribute` DSL for cleaner resource definitions
34
+ - YARD documentation for all resource attributes (`@!attribute` directives)
35
+ - Documentation for `method_missing` behavior in ConexaObject
36
+
37
+ ### Changed
38
+ - **Convention**: Use `snake_case` for all Ruby code (gem auto-converts to camelCase for API)
39
+ - README updated with snake_case examples and "Convention" section
40
+ - Resource methods now use snake_case with camelCase aliases for backwards compatibility
41
+ - `customer.customer_id` (primary) / `customer.customerId` (alias)
42
+ - Simplified resources using `method_missing` for attribute access (-280 lines)
43
+
44
+ ### Fixed
45
+ - Resource attribute methods now correctly access snake_case keys in `@attributes`
46
+ - Compound-named models (RecurringSale, CreditCard, InvoicingMethod) now have correct primary keys
47
+ - Array attributes (`phones`, `emails_message`, etc.) return `[]` instead of `nil` when empty
48
+
49
+ ## [0.0.6] - 2026-02-11
50
+
51
+ ### Fixed
52
+ - `Result#empty?` now correctly delegates to data array
53
+ - `Util.camelize_hash` guards against nil values
54
+
55
+ ## [0.0.5] - 2026-01-15
56
+
57
+ ### Added
58
+ - Initial release with core resources
59
+ - Customer, Contract, Sale, Charge, Bill resources
60
+ - RecurringSale with end functionality
61
+ - Charge with settle and PIX methods
62
+ - Pagination support
63
+
64
+ [Unreleased]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.8...HEAD
65
+ [0.0.8]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.7...v0.0.8
66
+ [0.0.7]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.6...v0.0.7
67
+ [0.0.6]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.5...v0.0.6
68
+ [0.0.5]: https://github.com/guilhermegazzinelli/conexa-ruby/releases/tag/v0.0.5
data/Gemfile CHANGED
@@ -11,8 +11,6 @@ gem "rspec", "~> 3.0"
11
11
 
12
12
  gem "rubocop", "~> 1.21"
13
13
 
14
- gem "solargraph"
15
-
16
14
  gem "standard"
17
15
 
18
16
  gem "debug"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conexa (0.0.3)
4
+ conexa (0.0.8)
5
5
  jwt
6
6
  multi_json
7
7
  rest-client
@@ -23,9 +23,7 @@ GEM
23
23
  addressable (2.8.7)
24
24
  public_suffix (>= 2.0.2, < 7.0)
25
25
  ast (2.4.2)
26
- backport (1.2.0)
27
26
  base64 (0.2.0)
28
- benchmark (0.3.0)
29
27
  bigdecimal (3.1.8)
30
28
  byebug (11.1.3)
31
29
  concurrent-ruby (1.3.4)
@@ -39,14 +37,13 @@ GEM
39
37
  diff-lcs (1.5.1)
40
38
  domain_name (0.6.20240107)
41
39
  drb (2.2.1)
42
- e2mmap (0.1.0)
43
40
  factory_bot (6.5.0)
44
41
  activesupport (>= 5.0.0)
45
42
  faker (3.5.1)
46
43
  i18n (>= 1.8.11, < 2)
47
44
  hashdiff (1.1.1)
48
45
  http-accept (1.7.0)
49
- http-cookie (1.0.7)
46
+ http-cookie (1.1.0)
50
47
  domain_name (~> 0.5)
51
48
  i18n (1.14.6)
52
49
  concurrent-ruby (~> 1.0)
@@ -54,26 +51,19 @@ GEM
54
51
  irb (1.14.1)
55
52
  rdoc (>= 4.0.0)
56
53
  reline (>= 0.4.2)
57
- jaro_winkler (1.6.0)
58
54
  json (2.7.2)
59
- jwt (2.9.3)
55
+ jwt (3.1.2)
60
56
  base64
61
- kramdown (2.4.0)
62
- rexml
63
- kramdown-parser-gfm (1.1.0)
64
- kramdown (~> 2.0)
65
57
  language_server-protocol (3.17.0.3)
66
58
  lint_roller (1.1.0)
67
59
  logger (1.6.1)
68
- mime-types (3.6.0)
60
+ mime-types (3.7.0)
69
61
  logger
70
- mime-types-data (~> 3.2015)
71
- mime-types-data (3.2024.1001)
62
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
63
+ mime-types-data (3.2026.0203)
72
64
  minitest (5.25.1)
73
- multi_json (1.15.0)
65
+ multi_json (1.19.1)
74
66
  netrc (0.11.0)
75
- nokogiri (1.16.7-x86_64-linux)
76
- racc (~> 1.4)
77
67
  parallel (1.26.3)
78
68
  parser (3.3.5.0)
79
69
  ast (~> 2.4.1)
@@ -84,7 +74,6 @@ GEM
84
74
  racc (1.8.1)
85
75
  rainbow (3.1.1)
86
76
  rake (13.2.1)
87
- rbs (2.8.4)
88
77
  rdoc (6.7.0)
89
78
  psych (>= 4.0.0)
90
79
  regexp_parser (2.9.2)
@@ -95,8 +84,6 @@ GEM
95
84
  http-cookie (>= 1.0.2, < 2.0)
96
85
  mime-types (>= 1.16, < 4.0)
97
86
  netrc (~> 0.8)
98
- reverse_markdown (2.1.1)
99
- nokogiri
100
87
  rexml (3.3.8)
101
88
  rspec (3.13.0)
102
89
  rspec-core (~> 3.13.0)
@@ -128,22 +115,6 @@ GEM
128
115
  rubocop-ast (>= 1.31.1, < 2.0)
129
116
  ruby-progressbar (1.13.0)
130
117
  securerandom (0.3.1)
131
- solargraph (0.50.0)
132
- backport (~> 1.2)
133
- benchmark
134
- bundler (~> 2.0)
135
- diff-lcs (~> 1.4)
136
- e2mmap
137
- jaro_winkler (~> 1.5)
138
- kramdown (~> 2.3)
139
- kramdown-parser-gfm (~> 1.1)
140
- parser (~> 3.0)
141
- rbs (~> 2.0)
142
- reverse_markdown (~> 2.0)
143
- rubocop (~> 1.38)
144
- thor (~> 1.0)
145
- tilt (~> 2.0)
146
- yard (~> 0.9, >= 0.9.24)
147
118
  standard (1.41.1)
148
119
  language_server-protocol (~> 3.17.0.2)
149
120
  lint_roller (~> 1.0)
@@ -157,8 +128,6 @@ GEM
157
128
  lint_roller (~> 1.1)
158
129
  rubocop-performance (~> 1.22.0)
159
130
  stringio (3.1.1)
160
- thor (1.3.2)
161
- tilt (2.4.0)
162
131
  tzinfo (2.0.6)
163
132
  concurrent-ruby (~> 1.0)
164
133
  unicode-display_width (2.6.0)
@@ -168,10 +137,10 @@ GEM
168
137
  addressable (>= 2.8.0)
169
138
  crack (>= 0.3.2)
170
139
  hashdiff (>= 0.4.0, < 2.0.0)
171
- yard (0.9.37)
172
140
 
173
141
  PLATFORMS
174
- x86_64-linux
142
+ ruby
143
+ x86_64-linux-gnu
175
144
 
176
145
  DEPENDENCIES
177
146
  byebug
@@ -182,7 +151,6 @@ DEPENDENCIES
182
151
  rake (~> 13.0)
183
152
  rspec (~> 3.0)
184
153
  rubocop (~> 1.21)
185
- solargraph
186
154
  standard
187
155
  vcr
188
156
  webmock