brasilapi 0.8.0 → 0.9.0

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: 67529435e017f1d14417130add2c21a99acc47126d6a0a15d8e7b308d3ede0e8
4
- data.tar.gz: 3c83bc926f7873c8d973bb0433386b5ae937bca70b1ef5861322eab3e158a71b
3
+ metadata.gz: 87b8c8af7660cc90444b966b63661968ffe0c45a14d802789e4ceeb6ed41fb60
4
+ data.tar.gz: ea5a0f1dfe670f2026a0c0802fb663f6bce93f9fbf6e4aed649ff2c3dcf19c35
5
5
  SHA512:
6
- metadata.gz: 396e12a440bd9dfefd950016396c254c2816343a56ca5db4d34f8f433c8a99cae790f4620072270676cd128d774a36fd2adb7f76f6ccf851b92775a19d7b76b4
7
- data.tar.gz: 721fe3a6d163b204cf5e065bd49c43116dc834ac8daa50a0e70909a038619f33cdfdf8770cfc1ae231f5c3ac3b7f4310a8bea3628b5099051b36e1080e12ccf2
6
+ metadata.gz: b379ae808c17254e42bac91d610e0fa07321d384254f1c546260d094459cb2db64c7bc90b5f82d9cff6e6cf74880a7d6711ff77f0b102e94ae9907a6a729e3ff
7
+ data.tar.gz: df16c05ceb798aa8703351813761237ca0852baa9a27c7954786abdfa344b7ab1d99b4c27e9ec00d074e0d6a0f77fd15a12ee435781dc82ba03ca3608ce8f82e
data/.rubocop.yml CHANGED
@@ -14,9 +14,6 @@ Style/StringLiteralsInInterpolation:
14
14
  Enabled: true
15
15
  EnforcedStyle: double_quotes
16
16
 
17
- Style/Documentation:
18
- Enabled: false
19
-
20
17
  Layout/LineLength:
21
18
  Max: 120
22
19
 
data/.yardopts ADDED
@@ -0,0 +1,5 @@
1
+ --markup markdown
2
+ --main README.md
3
+ --output-dir doc
4
+ --files CHANGELOG.md,LICENSE.txt
5
+ lib/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,87 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.9.0] - 2026-10-20
4
+
5
+ ### DDD
6
+ - `BrasilAPI::DDD.all`
7
+ - `BrasilAPI::DDD.find(ddd, version: 2)`
8
+ - `BrasilAPI::DDD.by_state(state)`
9
+ - `Address.state_and_cities_by_area_code` permanece para a v1
10
+
11
+ ### CPTEC
12
+ - Specs de `capital_weather` e `airport_weather`
13
+ - A previsão semanal por latitude/longitude não entrou: a rota responde 404 para coordenadas válidas
14
+
15
+ ### CVM
16
+ - `CVM.all(state:)` filtra corretoras por UF e omite `uf` quando o estado não é informado
17
+ - `BrasilAPI::CVM::Fund.all(page:, size:)`
18
+ - `BrasilAPI::CVM::Fund.find_by_cnpj`, aceitando CNPJ com ou sem pontuação
19
+
20
+ ### FIPE
21
+ - `vehicle_brands` sem tipo de veículo lista todas as marcas
22
+ - `vehicle_years(type, brand, model, reference_table = nil)`
23
+ - `vehicle_details(type, brand, model, year, reference_table = nil)`
24
+ - Specs das rotas que já existiam (`vehicle_price`, `fipe_tables`, `list_vehicles`)
25
+
26
+ ### IBGE
27
+ - `IBGE.regions`, `IBGE.find_region_by_code` e `IBGE.states_by_region`
28
+ - `BrasilAPI::IBGE::CNAE.classes`, `find_class`, `find_division` e `find_group`
29
+
30
+ ### Feriados
31
+ - `Holiday.by_year(year, state:)` inclui feriados estaduais e omite `uf` quando o estado não é informado
32
+
33
+ ### Câmbio
34
+ - `BrasilAPI::Cambio.currencies`
35
+ - `BrasilAPI::Cambio.quote(currency, date)`, aceitando `Date` ou `String`
36
+
37
+ ### CPF
38
+ - `BrasilAPI::CPF.find`, com ou sem pontuação
39
+
40
+ ### Dias úteis
41
+ - `BrasilAPI::BusinessDays.between(start_date, end_date, include_national_holidays:)`
42
+
43
+ ### Geolocalização
44
+ - `BrasilAPI::Geolocation.reverse(latitude, longitude, language: nil)`
45
+
46
+ ### Hospitais
47
+ - `BrasilAPI::Hospital.all`, `nearby`, `options`, `ciatox`, `find_by_cnes` e `states`
48
+
49
+ ### IBPT
50
+ - `BrasilAPI::IBPT.version`
51
+ - `IBPT.ncm(state, code = nil, exception: nil)`
52
+ - `IBPT.nbs(state, code = nil, exception: nil)`
53
+ - `IBPT.lc116(state, code = nil, exception: nil)`
54
+
55
+ ### IGP-M
56
+ - `BrasilAPI::IGPM.all`, `IGPM.last(limit)` e `IGPM.between(initial_date, final_date)`
57
+
58
+ ### CID-10
59
+ - `BrasilAPI::CID10.all` e `CID10.find_by_code`
60
+
61
+ ### Incidência solar
62
+ - `BrasilAPI::Solar.incidence(location)` na rota real `/solar/v1`
63
+
64
+ ### Status
65
+ - `BrasilAPI::Status.check`
66
+
67
+ ### B3
68
+ - `BrasilAPI::B3.stocks` e `B3.funds(type)`
69
+
70
+ ### TUSS
71
+ - `BrasilAPI::TUSS.all`, `find_by_code`, `search` e `autocomplete`
72
+
73
+ ### ISBN, NCM, PIX, Registro.br e Taxas
74
+ - Specs com cassettes VCR para os métodos que já existiam
75
+
76
+ ### Documentação e qualidade
77
+ - README com exemplo de cada endpoint, comentário da CVM corrigido e uma única seção de licença
78
+ - Documentação YARD de toda a API pública (`rake yard`); `rake yard_stats` exige 100% documentado
79
+ - `webrick` como dependência de desenvolvimento, para `bundle exec yard server` no Ruby 3.3+
80
+ - `Style/Documentation` do RuboCop volta a ser exigido
81
+ - Metadado `documentation_uri` aponta para https://rubydoc.info/gems/brasilapi
82
+ - SimpleCov passa a exigir 100% de cobertura de linha e de branch em `bundle exec rake`
83
+ - Não entram nesta versão, porque a BrasilAPI não responde com sucesso: CEP v3, previsão semanal do CPTEC por coordenadas, eleições e universidades
84
+
3
85
  ## [0.8.0] - 2026-10-20
4
86
 
5
87
  - `BrasilAPI::NotFound` passa a herdar de `BrasilAPI::Error`, então `rescue BrasilAPI::Error` também captura 404
data/Gemfile CHANGED
@@ -9,6 +9,9 @@ group :development do
9
9
  gem "rspec", "~> 3.0"
10
10
  gem "rubocop", "~> 1.86"
11
11
  gem "rubocop-rspec", "~> 3.0"
12
+ gem "simplecov", "~> 0.22"
12
13
  gem "vcr", "~> 6.3"
13
14
  gem "webmock", "~> 3.25"
15
+ gem "webrick", "~> 1.8"
16
+ gem "yard", "~> 0.9"
14
17
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brasilapi (0.8.0)
4
+ brasilapi (0.9.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,6 +14,7 @@ GEM
14
14
  bigdecimal
15
15
  rexml
16
16
  diff-lcs (1.6.2)
17
+ docile (1.4.1)
17
18
  hashdiff (1.2.1)
18
19
  json (3.1.0)
19
20
  language_server-protocol (3.17.0.6)
@@ -61,6 +62,12 @@ GEM
61
62
  regexp_parser (>= 2.0)
62
63
  rubocop (~> 1.86, >= 1.86.2)
63
64
  ruby-progressbar (1.13.0)
65
+ simplecov (0.22.0)
66
+ docile (~> 1.1)
67
+ simplecov-html (~> 0.11)
68
+ simplecov_json_formatter (~> 0.1)
69
+ simplecov-html (0.13.2)
70
+ simplecov_json_formatter (0.1.4)
64
71
  unicode-display_width (3.3.0)
65
72
  unicode-emoji (~> 4.3)
66
73
  unicode-emoji (4.3.0)
@@ -69,6 +76,8 @@ GEM
69
76
  addressable (>= 2.8.0)
70
77
  crack (>= 0.3.2)
71
78
  hashdiff (>= 0.4.0, < 2.0.0)
79
+ webrick (1.9.2)
80
+ yard (0.9.45)
72
81
 
73
82
  PLATFORMS
74
83
  ruby
@@ -80,8 +89,11 @@ DEPENDENCIES
80
89
  rspec (~> 3.0)
81
90
  rubocop (~> 1.86)
82
91
  rubocop-rspec (~> 3.0)
92
+ simplecov (~> 0.22)
83
93
  vcr (~> 6.3)
84
94
  webmock (~> 3.25)
95
+ webrick (~> 1.8)
96
+ yard (~> 0.9)
85
97
 
86
98
  BUNDLED WITH
87
99
  4.0.23