ecfr 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e01bffb47225f9d31bd9a6d862f8b6e967586b4ac296ec25814e04dd254dacbe
4
- data.tar.gz: 0b1f9d5b015063e167a27fc98036299ceb8b10d486a8a3d188044da99ad4c903
3
+ metadata.gz: 4403d0c730758c718692d944b2703b0630f7d00f1e22d710909a32f12864a136
4
+ data.tar.gz: 2c80c63a113fe62b20b546b5338aada5a593ce1cc73c827e38e6f81b7dfb9e98
5
5
  SHA512:
6
- metadata.gz: a294244d1e845f3ea9d3b6a128c557f85f9bc5b5c9eebea84ea507437b0101b27a9c87528c26e6dfb0ebb9d7c3888963569698b366b653399e2bf79eb37d579b
7
- data.tar.gz: dc588b8531cb89e27a69a53c6a47deb8648c493d4fdc176e17bf51018ef88fd884876ebf69a875d44c30421be6735775555038cd4c6d19f3d7a8b3c6da399633
6
+ metadata.gz: aa1c12695b6cc9c382589e612a4fc410c5bba3ee4b56f38d47b0d68303e576df5c364d65486b61439c0777dc09bcd527fe5359d937654bdc10ea3d7dce9ed45b
7
+ data.tar.gz: 5f0d2e11bfc54ac1b578170be9a23d8dc6b7a7a89f979795d3664761c9033b6c8a351e16dc8f80dace862b5dd6f9ef16d675fbbb76ae3c213db03958db04fc83
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.2] - 2023-04-17
4
+ ### Additions
5
+ - Add support for `display_name` and `sortable_name` attributes to the agency API response
6
+
7
+ ## [1.0.1] - 2023-04-14
8
+ ### Bugfixes
9
+ - Fix adding of basic auth headers to match Faraday v2 requirements
3
10
  ## [1.0.0] - 2023-04-12
4
11
 
5
12
  - Initial release
data/ecfr.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Peregrinator"]
9
9
  spec.email = ["bob.burbach@gmail.com"]
10
10
 
11
- spec.summary = "ecfr.federalregister.gov API client"
12
- spec.description = "Ruby client for APIs provided by ecfr.federalregister.gov"
11
+ spec.summary = "eCFR.gov API client"
12
+ spec.description = "Ruby client for APIs provided by eCFR.gov"
13
13
  spec.homepage = "https://github.com/criticaljuncture/ecfr"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.6.0"
@@ -1,11 +1,11 @@
1
1
  module Ecfr
2
2
  module AdminService
3
3
  class Agency < Base
4
- require_relative "agency/hierarchy"
5
-
6
4
  result_key :agencies
7
5
 
8
- attribute :name, desc: "name of agency"
6
+ attribute :display_name, desc: "official name of agency, including parent (if any)"
7
+ attribute :name, desc: "official name of agency"
8
+ attribute :sortable_name, desc: "sortable version of agency name"
9
9
 
10
10
  attribute :cfr_references, type: Array(Ecfr::Common::Hierarchy),
11
11
  desc: "portions of the CFR this agency is responsible for,
data/lib/ecfr/client.rb CHANGED
@@ -85,7 +85,7 @@ module Ecfr
85
85
  end
86
86
 
87
87
  if client_options[:basic_auth]
88
- faraday.request(:basic_auth,
88
+ faraday.request(:authorization, :basic,
89
89
  client_options.dig(:basic_auth, :username),
90
90
  client_options.dig(:basic_auth, :password))
91
91
  end
data/lib/ecfr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ecfr
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecfr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peregrinator
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -234,7 +234,7 @@ dependencies:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
- description: Ruby client for APIs provided by ecfr.federalregister.gov
237
+ description: Ruby client for APIs provided by eCFR.gov
238
238
  email:
239
239
  - bob.burbach@gmail.com
240
240
  executables: []
@@ -259,7 +259,6 @@ files:
259
259
  - ecfr.gemspec
260
260
  - lib/ecfr.rb
261
261
  - lib/ecfr/admin_service/agency.rb
262
- - lib/ecfr/admin_service/agency/hierarchy.rb
263
262
  - lib/ecfr/admin_service/api_documentation.rb
264
263
  - lib/ecfr/admin_service/base.rb
265
264
  - lib/ecfr/admin_service/build.rb
@@ -382,8 +381,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
382
381
  - !ruby/object:Gem::Version
383
382
  version: '0'
384
383
  requirements: []
385
- rubygems_version: 3.2.33
384
+ rubygems_version: 3.3.7
386
385
  signing_key:
387
386
  specification_version: 4
388
- summary: ecfr.federalregister.gov API client
387
+ summary: eCFR.gov API client
389
388
  test_files: []
@@ -1,27 +0,0 @@
1
- module Ecfr
2
- module AdminService
3
- class Agency
4
- class Hierarchy
5
- include AttributeMethodDefinition
6
- extend Extensible
7
-
8
- attribute :title,
9
- desc: "Title number"
10
- attribute :subtitle,
11
- desc: "Subtitle identifier"
12
- attribute :chapter,
13
- desc: "Chapter identifier"
14
- attribute :subchapter,
15
- desc: "Subchapter identifier"
16
- attribute :part,
17
- desc: "Part identifier"
18
-
19
- def to_hash
20
- @attributes.each_with_object({}) { |attr, hsh|
21
- hsh[attr[0]] = attr[1]
22
- }
23
- end
24
- end
25
- end
26
- end
27
- end