ecfr 1.1.3 → 1.1.6
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 +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +16 -1
- data/Gemfile.lock +109 -81
- data/README.md +1 -1
- data/ecfr.gemspec +4 -3
- data/lib/ecfr/attribute_method_definition.rb +1 -4
- data/lib/ecfr/base.rb +3 -2
- data/lib/ecfr/client.rb +2 -2
- data/lib/ecfr/configuration.rb +2 -1
- data/lib/ecfr/facet_attribute_method_definition.rb +2 -2
- data/lib/ecfr/prince_xml_service/pdf.rb +2 -2
- data/lib/ecfr/search_service/base.rb +1 -0
- data/lib/ecfr/search_service/content_version.rb +5 -5
- data/lib/ecfr/search_service/date_facet.rb +1 -1
- data/lib/ecfr/search_service/timeline.rb +29 -0
- data/lib/ecfr/testing/extensions/search_service/timeline_extensions.rb +13 -0
- data/lib/ecfr/testing/factories/admin_service/agency_factory.rb +27 -0
- data/lib/ecfr/testing/factories/search_service/timeline_factory.rb +9 -0
- data/lib/ecfr/varnish_cache_service/base.rb +7 -1
- data/lib/ecfr/version.rb +1 -1
- data/lib/ecfr/versioner_service/ancestors.rb +1 -1
- data/lib/ecfr.rb +2 -0
- metadata +30 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a590084cfafab933fe619638898f62eeacb37aa183af6174cb47406df26d4c5
|
4
|
+
data.tar.gz: '095a4f5623deb58978f0c00941fa3c89d2f3bb2ef35bf9dff913e0648fb77af6'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fda252dfcbf05c0922c9c06167d2f6a99b833d60a251544a2e3cecacf990378e629b793f96da9744caddcb2819f7f417736c6ebe432174c25530bad452f3097
|
7
|
+
data.tar.gz: 44376ecbcfe743b0a105ae3d146a5c7abe01c304521bf140640dd0b7af67d723457df1a102f32d65f4596670d317ad1166d81130d1d456791d2e8b2d743bdd12
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
+
NewCops: enable
|
2
3
|
Exclude:
|
3
4
|
- bin/*
|
4
5
|
- lib/yard/*
|
@@ -17,9 +18,11 @@ inherit_mode:
|
|
17
18
|
merge:
|
18
19
|
- Exclude
|
19
20
|
|
20
|
-
|
21
|
+
plugins:
|
21
22
|
# Performance cops are bundled with Standard
|
22
23
|
- rubocop-performance
|
24
|
+
|
25
|
+
require:
|
23
26
|
# Standard's config uses this custom cop,
|
24
27
|
# so it must be loaded
|
25
28
|
- standard/cop/block_single_line_braces
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
-
## [
|
1
|
+
## [1.1.6] - 2025-09-23
|
2
|
+
### Fixes
|
3
|
+
- Add missing Gemfile lock changes
|
4
|
+
- See 1.1.5
|
5
|
+
|
6
|
+
## [1.1.5] - 2025-09-23 - yanked
|
7
|
+
### Additions
|
8
|
+
- Add timeline endpoint (8490dbf1)
|
9
|
+
- Removed puts from client to cleanup unwanted output (31846f86)
|
10
|
+
- Add support for using 'delete' verb when attempting to clear varnish cache. (7d7a5870)
|
11
|
+
|
12
|
+
## [1.1.4] - 2025-03-27
|
13
|
+
### Additions
|
14
|
+
- Add factory for Agency (38185411)
|
15
|
+
### Dependencies
|
16
|
+
- Removed lock to Rails 6 (f6c5024a)
|
2
17
|
|
3
18
|
## [1.1.3] - 2024-12-10
|
4
19
|
### Additions
|
data/Gemfile.lock
CHANGED
@@ -1,123 +1,151 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ecfr (1.1.
|
5
|
-
activemodel
|
6
|
-
activesupport
|
4
|
+
ecfr (1.1.6)
|
5
|
+
activemodel
|
6
|
+
activesupport
|
7
7
|
faraday (~> 2.0)
|
8
8
|
faraday-net_http_persistent (~> 2.0)
|
9
|
+
ostruct
|
9
10
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
activemodel (
|
14
|
-
activesupport (=
|
15
|
-
activesupport (
|
16
|
-
|
14
|
+
activemodel (7.2.1)
|
15
|
+
activesupport (= 7.2.1)
|
16
|
+
activesupport (7.2.1)
|
17
|
+
base64
|
18
|
+
bigdecimal
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
20
|
+
connection_pool (>= 2.2.5)
|
21
|
+
drb
|
17
22
|
i18n (>= 1.6, < 2)
|
23
|
+
logger (>= 1.4.2)
|
18
24
|
minitest (>= 5.1)
|
19
|
-
|
20
|
-
|
21
|
-
ast (2.4.
|
25
|
+
securerandom (>= 0.3)
|
26
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
27
|
+
ast (2.4.3)
|
28
|
+
base64 (0.2.0)
|
29
|
+
bigdecimal (3.1.9)
|
22
30
|
coderay (1.1.3)
|
23
|
-
concurrent-ruby (1.
|
24
|
-
connection_pool (2.
|
25
|
-
diff-lcs (1.
|
31
|
+
concurrent-ruby (1.3.5)
|
32
|
+
connection_pool (2.5.3)
|
33
|
+
diff-lcs (1.6.2)
|
34
|
+
drb (2.2.1)
|
26
35
|
ethon (0.16.0)
|
27
36
|
ffi (>= 1.15.0)
|
28
|
-
factory_bot (6.
|
29
|
-
activesupport (>=
|
30
|
-
faraday (2.
|
31
|
-
faraday-net_http (>= 2.0, < 3.
|
32
|
-
|
33
|
-
|
34
|
-
faraday-
|
37
|
+
factory_bot (6.5.1)
|
38
|
+
activesupport (>= 6.1.0)
|
39
|
+
faraday (2.13.1)
|
40
|
+
faraday-net_http (>= 2.0, < 3.5)
|
41
|
+
json
|
42
|
+
logger
|
43
|
+
faraday-net_http (3.4.0)
|
44
|
+
net-http (>= 0.5.0)
|
45
|
+
faraday-net_http_persistent (2.3.0)
|
35
46
|
faraday (~> 2.5)
|
36
|
-
net-http-persistent (
|
37
|
-
faraday-typhoeus (1.
|
47
|
+
net-http-persistent (>= 4.0.4, < 5)
|
48
|
+
faraday-typhoeus (1.1.0)
|
38
49
|
faraday (~> 2.0)
|
39
50
|
typhoeus (~> 1.4)
|
40
|
-
ffi (1.
|
41
|
-
|
51
|
+
ffi (1.17.2-arm64-darwin)
|
52
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
53
|
+
i18n (1.14.7)
|
42
54
|
concurrent-ruby (~> 1.0)
|
43
|
-
json (2.
|
44
|
-
language_server-protocol (3.17.0.
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
55
|
+
json (2.12.0)
|
56
|
+
language_server-protocol (3.17.0.5)
|
57
|
+
lint_roller (1.1.0)
|
58
|
+
logger (1.7.0)
|
59
|
+
method_source (1.1.0)
|
60
|
+
minitest (5.25.5)
|
61
|
+
net-http (0.6.0)
|
62
|
+
uri
|
63
|
+
net-http-persistent (4.0.5)
|
49
64
|
connection_pool (~> 2.2)
|
50
|
-
nokogiri (1.
|
51
|
-
mini_portile2 (~> 2.8.0)
|
65
|
+
nokogiri (1.18.8-arm64-darwin)
|
52
66
|
racc (~> 1.4)
|
53
|
-
|
54
|
-
|
55
|
-
|
67
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
68
|
+
racc (~> 1.4)
|
69
|
+
ostruct (0.6.1)
|
70
|
+
parallel (1.27.0)
|
71
|
+
parallel_tests (4.10.1)
|
56
72
|
parallel
|
57
|
-
parser (3.
|
73
|
+
parser (3.3.8.0)
|
58
74
|
ast (~> 2.4.1)
|
59
|
-
|
75
|
+
racc
|
76
|
+
prism (1.4.0)
|
77
|
+
pry (0.15.2)
|
60
78
|
coderay (~> 1.1)
|
61
79
|
method_source (~> 1.0)
|
62
|
-
racc (1.
|
63
|
-
rack (3.
|
80
|
+
racc (1.8.1)
|
81
|
+
rack (3.1.14)
|
64
82
|
rainbow (3.1.1)
|
65
|
-
regexp_parser (2.
|
66
|
-
request_store (1.
|
83
|
+
regexp_parser (2.10.0)
|
84
|
+
request_store (1.7.0)
|
67
85
|
rack (>= 1.4)
|
68
|
-
|
69
|
-
|
70
|
-
rspec-
|
71
|
-
rspec-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
rspec-expectations (3.10.1)
|
86
|
+
rspec (3.13.0)
|
87
|
+
rspec-core (~> 3.13.0)
|
88
|
+
rspec-expectations (~> 3.13.0)
|
89
|
+
rspec-mocks (~> 3.13.0)
|
90
|
+
rspec-core (3.13.3)
|
91
|
+
rspec-support (~> 3.13.0)
|
92
|
+
rspec-expectations (3.13.4)
|
76
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-mocks (3.
|
94
|
+
rspec-support (~> 3.13.0)
|
95
|
+
rspec-mocks (3.13.4)
|
79
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-support (3.
|
97
|
+
rspec-support (~> 3.13.0)
|
98
|
+
rspec-support (3.13.3)
|
82
99
|
rspec_junit_formatter (0.6.0)
|
83
100
|
rspec-core (>= 2, < 4, != 2.12.0)
|
84
|
-
rubocop (1.
|
101
|
+
rubocop (1.75.6)
|
85
102
|
json (~> 2.3)
|
103
|
+
language_server-protocol (~> 3.17.0.2)
|
104
|
+
lint_roller (~> 1.1.0)
|
86
105
|
parallel (~> 1.10)
|
87
|
-
parser (>= 3.
|
106
|
+
parser (>= 3.3.0.2)
|
88
107
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
-
regexp_parser (>=
|
90
|
-
|
91
|
-
rubocop-ast (>= 1.26.0, < 2.0)
|
108
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
109
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
92
110
|
ruby-progressbar (~> 1.7)
|
93
|
-
unicode-display_width (>= 2.4.0, <
|
94
|
-
rubocop-ast (1.
|
95
|
-
parser (>= 3.
|
96
|
-
|
97
|
-
|
98
|
-
|
111
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
112
|
+
rubocop-ast (1.44.1)
|
113
|
+
parser (>= 3.3.7.2)
|
114
|
+
prism (~> 1.4)
|
115
|
+
rubocop-performance (1.25.0)
|
116
|
+
lint_roller (~> 1.1)
|
117
|
+
rubocop (>= 1.75.0, < 2.0)
|
118
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
99
119
|
ruby-progressbar (1.13.0)
|
100
|
-
|
101
|
-
standard (1.
|
120
|
+
securerandom (0.4.1)
|
121
|
+
standard (1.50.0)
|
102
122
|
language_server-protocol (~> 3.17.0.2)
|
103
|
-
|
104
|
-
rubocop
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
123
|
+
lint_roller (~> 1.0)
|
124
|
+
rubocop (~> 1.75.5)
|
125
|
+
standard-custom (~> 1.0.0)
|
126
|
+
standard-performance (~> 1.8)
|
127
|
+
standard-custom (1.0.2)
|
128
|
+
lint_roller (~> 1.0)
|
129
|
+
rubocop (~> 1.50)
|
130
|
+
standard-performance (1.8.0)
|
131
|
+
lint_roller (~> 1.1)
|
132
|
+
rubocop-performance (~> 1.25.0)
|
133
|
+
turbo_tests (2.2.5)
|
134
|
+
parallel_tests (>= 3.3.0, < 5)
|
135
|
+
rspec (>= 3.10)
|
136
|
+
typhoeus (1.4.1)
|
110
137
|
ethon (>= 0.9.0)
|
111
|
-
tzinfo (2.0.
|
138
|
+
tzinfo (2.0.6)
|
112
139
|
concurrent-ruby (~> 1.0)
|
113
|
-
unicode-display_width (
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
140
|
+
unicode-display_width (3.1.4)
|
141
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
142
|
+
unicode-emoji (4.0.4)
|
143
|
+
uri (1.0.3)
|
144
|
+
yard (0.9.37)
|
118
145
|
|
119
146
|
PLATFORMS
|
120
|
-
|
147
|
+
arm64-darwin
|
148
|
+
x86_64-linux-gnu
|
121
149
|
|
122
150
|
DEPENDENCIES
|
123
151
|
ecfr!
|
@@ -135,4 +163,4 @@ DEPENDENCIES
|
|
135
163
|
yard
|
136
164
|
|
137
165
|
BUNDLED WITH
|
138
|
-
2.
|
166
|
+
2.6.7
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ Some endpoints return XML (like the Structure) and will be automatically parsed
|
|
34
34
|
|
35
35
|
### Response caching
|
36
36
|
|
37
|
-
Response caching can be enabled via a configuration option. This is a performance feature that allows the calling code to not worry about performance when different parts of the application call the same endpoints at different times in the same request. Responses are cached
|
37
|
+
Response caching can be enabled via a configuration option. This is a performance feature that allows the calling code to not worry about performance when different parts of the application call the same endpoints at different times in the same request. Responses are cached by HTTP method, api endpoint and requested parameters. You will need to install the [request_store](https://github.com/steveklabnik/request_store) gem when enabling this option.
|
38
38
|
|
39
39
|
If you are using request store outside of a Rails project or in a background process (eg Sidekiq) check the RequestStore documentation for how to use the required middleware.
|
40
40
|
|
data/ecfr.gemspec
CHANGED
@@ -29,10 +29,11 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_dependency "activemodel"
|
33
|
-
spec.add_dependency "activesupport"
|
32
|
+
spec.add_dependency "activemodel"
|
33
|
+
spec.add_dependency "activesupport"
|
34
34
|
spec.add_dependency "faraday", "~> 2.0"
|
35
35
|
spec.add_dependency "faraday-net_http_persistent", "~> 2.0"
|
36
|
+
spec.add_dependency "ostruct"
|
36
37
|
|
37
38
|
spec.add_development_dependency "factory_bot"
|
38
39
|
spec.add_development_dependency "parallel_tests"
|
@@ -64,7 +65,7 @@ Gem::Specification.new do |spec|
|
|
64
65
|
Some features of the eCFR gem support parsing XML responses, response
|
65
66
|
caching, and parallel requests.
|
66
67
|
|
67
|
-
To use these features you will
|
68
|
+
To use these features you will need to install the appropriate gems
|
68
69
|
(nokogiri, request_store, and faraday-typhoeus respectively) in your
|
69
70
|
application. In order to minimize depedencies and code that is loaded these
|
70
71
|
are not a default dependencies of the eCFR gem.
|
@@ -43,10 +43,7 @@ module Ecfr
|
|
43
43
|
end
|
44
44
|
|
45
45
|
if options[:type] == :boolean
|
46
|
-
|
47
|
-
val = extract_value(attr, options)
|
48
|
-
Ecfr::AttributeCaster.cast_attr(val, options[:type], options[:options] || {})
|
49
|
-
end
|
46
|
+
alias_method :"#{attr}?", :"#{attr}"
|
50
47
|
end
|
51
48
|
end
|
52
49
|
end
|
data/lib/ecfr/base.rb
CHANGED
@@ -35,9 +35,10 @@ module Ecfr
|
|
35
35
|
delegate(*SUPPORTED_ARRAY_ACCESSORS, to: :results)
|
36
36
|
alias_method :all, :results
|
37
37
|
|
38
|
+
DEFAULT_OPTIONS = {base: true}
|
39
|
+
|
38
40
|
def initialize(attributes = {}, options = {})
|
39
|
-
|
40
|
-
options = default_options.merge(options)
|
41
|
+
options.reverse_merge!(DEFAULT_OPTIONS)
|
41
42
|
|
42
43
|
@response_status = options.delete(:response_status)
|
43
44
|
@request_data = options.delete(:request_data)
|
data/lib/ecfr/client.rb
CHANGED
@@ -142,7 +142,8 @@ module Ecfr
|
|
142
142
|
|
143
143
|
response = instrument("Ecfr::Perform #{cache_key.to_s.tr("\"", "'")}") do
|
144
144
|
RequestStore.fetch(cache_key) do
|
145
|
-
|
145
|
+
# TODO: replace this puts with a logger
|
146
|
+
# puts "Request not in eCFR gem cache, fetching..."
|
146
147
|
|
147
148
|
response = fetch(method, path, params: params,
|
148
149
|
client_options: client_options)
|
@@ -201,7 +202,6 @@ module Ecfr
|
|
201
202
|
#
|
202
203
|
def self.build(response:,
|
203
204
|
request_data: {}, build_options: {})
|
204
|
-
|
205
205
|
default_build_options = {parse_response: true}
|
206
206
|
build_options = default_build_options.merge(build_options)
|
207
207
|
|
data/lib/ecfr/configuration.rb
CHANGED
@@ -26,6 +26,7 @@ module Ecfr
|
|
26
26
|
subscriptions_service_path: nil,
|
27
27
|
varnish_cache_service_url: nil,
|
28
28
|
varnish_cache_service_path: nil,
|
29
|
+
varnish_cache_service_clear_method: "purge",
|
29
30
|
versioner_service_url: nil,
|
30
31
|
versioner_service_path: nil,
|
31
32
|
# basic auth - some endpoints require auth
|
@@ -50,7 +51,7 @@ module Ecfr
|
|
50
51
|
|
51
52
|
def initialize
|
52
53
|
CONFIG_DEFAULTS.each do |k, v|
|
53
|
-
instance_variable_set("@#{k}", v)
|
54
|
+
instance_variable_set(:"@#{k}", v)
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
@@ -13,7 +13,7 @@ module Ecfr
|
|
13
13
|
raise "must set :as to either :key or :value, was: #{as}"
|
14
14
|
end
|
15
15
|
|
16
|
-
super
|
16
|
+
super
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -37,7 +37,7 @@ module Ecfr
|
|
37
37
|
results[self.class.fv] = value
|
38
38
|
end
|
39
39
|
|
40
|
-
super
|
40
|
+
super
|
41
41
|
end
|
42
42
|
|
43
43
|
def count_for(key)
|
@@ -5,9 +5,9 @@ module Ecfr
|
|
5
5
|
|
6
6
|
PDF_PATH = ""
|
7
7
|
|
8
|
-
def self.client(client_options = {}, &
|
8
|
+
def self.client(client_options = {}, &)
|
9
9
|
client_options[:timeout] = Ecfr.config.prince_xml_service_pdf_timeout
|
10
|
-
super(client_options: client_options, &
|
10
|
+
super(client_options: client_options, &)
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.html_to_pdf(string, output_path, sha)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Ecfr
|
2
2
|
module SearchService
|
3
3
|
class ContentVersion < Base
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
8
|
-
require_relative "
|
4
|
+
require_relative "content_version/count"
|
5
|
+
require_relative "content_version/hierarchichal_result"
|
6
|
+
require_relative "content_version/result"
|
7
|
+
require_relative "content_version/suggestion"
|
8
|
+
require_relative "content_version/summary"
|
9
9
|
|
10
10
|
#
|
11
11
|
# Metadata about the number of matching items
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Ecfr
|
2
|
+
module SearchService
|
3
|
+
class Timeline < FacetBase
|
4
|
+
include AttributeMethodDefinition
|
5
|
+
|
6
|
+
class Entry < Base
|
7
|
+
include AttributeMethodDefinition
|
8
|
+
|
9
|
+
def initialize(attributes = {}, options = {})
|
10
|
+
date, attributes, _ = attributes
|
11
|
+
attributes["date"] = date
|
12
|
+
attributes["change_types"].compact!
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
attribute :change_types, type: Array(:symbol)
|
17
|
+
attribute :count, type: :integer
|
18
|
+
attribute :date, type: :date, as: :key
|
19
|
+
end
|
20
|
+
|
21
|
+
attribute :timeline, type: Array(Entry)
|
22
|
+
|
23
|
+
# @return [<Timeline::Entry>]
|
24
|
+
def self.search(options = {})
|
25
|
+
super(:timeline, options)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :agency, class: "Ecfr::AdminService::Agency" do
|
3
|
+
skip_create
|
4
|
+
|
5
|
+
name { "Agency Name" }
|
6
|
+
display_name { "The Agency Name" }
|
7
|
+
short_name { "AN" }
|
8
|
+
sortable_name { "Name, Agency" }
|
9
|
+
slug { "agency-name" }
|
10
|
+
children {
|
11
|
+
[]
|
12
|
+
}
|
13
|
+
cfr_references {
|
14
|
+
[ecfr_attribute_hash(:hierarchy)]
|
15
|
+
}
|
16
|
+
|
17
|
+
initialize_with {
|
18
|
+
new(attributes.deep_stringify_keys)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
trait :with_child do
|
23
|
+
children {
|
24
|
+
[build(:agency, name: "Child Agency")]
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
@@ -14,7 +14,13 @@ module Ecfr
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.expire(path)
|
17
|
-
purge
|
17
|
+
# not all backends support the purge verb
|
18
|
+
# - the varnish purge proxy expects delete
|
19
|
+
if Ecfr.config.varnish_cache_service_clear_method.to_s == "delete"
|
20
|
+
delete(path)
|
21
|
+
else
|
22
|
+
purge(path)
|
23
|
+
end
|
18
24
|
end
|
19
25
|
|
20
26
|
def self.expire_everything
|
data/lib/ecfr/version.rb
CHANGED
data/lib/ecfr.rb
CHANGED
@@ -9,6 +9,8 @@ require "active_support/core_ext/hash"
|
|
9
9
|
require "active_support/core_ext/module/delegation"
|
10
10
|
require "active_support/core_ext/string"
|
11
11
|
|
12
|
+
require "ostruct"
|
13
|
+
|
12
14
|
require "faraday"
|
13
15
|
require "faraday/net_http_persistent"
|
14
16
|
require_relative "ecfr/faraday/user_agent/middleware"
|
metadata
CHANGED
@@ -1,43 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecfr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peregrinator
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activemodel
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '0'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
25
|
+
version: '0'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: activesupport
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- - "
|
30
|
+
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
32
|
+
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
|
-
- - "
|
37
|
+
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
39
|
+
version: '0'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: faraday
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +65,20 @@ dependencies:
|
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '2.0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: ostruct
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
69
82
|
- !ruby/object:Gem::Dependency
|
70
83
|
name: factory_bot
|
71
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -312,6 +325,7 @@ files:
|
|
312
325
|
- lib/ecfr/search_service/date_facet.rb
|
313
326
|
- lib/ecfr/search_service/facet_base.rb
|
314
327
|
- lib/ecfr/search_service/status.rb
|
328
|
+
- lib/ecfr/search_service/timeline.rb
|
315
329
|
- lib/ecfr/search_service/title_facet.rb
|
316
330
|
- lib/ecfr/subscriptions_service/base.rb
|
317
331
|
- lib/ecfr/subscriptions_service/status.rb
|
@@ -322,8 +336,10 @@ files:
|
|
322
336
|
- lib/ecfr/testing/extensions/renderer_service/origin_extensions.rb
|
323
337
|
- lib/ecfr/testing/extensions/search_service/content_version_result_extensions.rb
|
324
338
|
- lib/ecfr/testing/extensions/search_service/date_facet_extensions.rb
|
339
|
+
- lib/ecfr/testing/extensions/search_service/timeline_extensions.rb
|
325
340
|
- lib/ecfr/testing/extensions/versioner_service/ancestors_extensions.rb
|
326
341
|
- lib/ecfr/testing/extensions/versioner_service/title_extenstions.rb
|
342
|
+
- lib/ecfr/testing/factories/admin_service/agency_factory.rb
|
327
343
|
- lib/ecfr/testing/factories/admin_service/cfr_reference_factory.rb
|
328
344
|
- lib/ecfr/testing/factories/admin_service/ecfr_correction_factory.rb
|
329
345
|
- lib/ecfr/testing/factories/admin_service/issue_change_factory.rb
|
@@ -333,6 +349,7 @@ files:
|
|
333
349
|
- lib/ecfr/testing/factories/search_service/content_version_count_factory.rb
|
334
350
|
- lib/ecfr/testing/factories/search_service/content_version_result_factory.rb
|
335
351
|
- lib/ecfr/testing/factories/search_service/date_facet_factory.rb
|
352
|
+
- lib/ecfr/testing/factories/search_service/timeline_factory.rb
|
336
353
|
- lib/ecfr/testing/factories/versioner_service/ancestors_factory.rb
|
337
354
|
- lib/ecfr/testing/factories/versioner_service/metadata_node_info_factory.rb
|
338
355
|
- lib/ecfr/testing/factories/versioner_service/node_summary_factory.rb
|
@@ -369,7 +386,7 @@ metadata:
|
|
369
386
|
changelog_uri: https://github.com/criticaljuncture/ecfr
|
370
387
|
post_install_message: "\n Some features of the eCFR gem support parsing XML responses,
|
371
388
|
response\n caching, and parallel requests.\n\n To use these features you will
|
372
|
-
|
389
|
+
need to install the appropriate gems\n (nokogiri, request_store, and faraday-typhoeus
|
373
390
|
respectively) in your\n application. In order to minimize depedencies and code
|
374
391
|
that is loaded these\n are not a default dependencies of the eCFR gem.\n\n See
|
375
392
|
the README for details of these features.\n "
|
@@ -387,8 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
387
404
|
- !ruby/object:Gem::Version
|
388
405
|
version: '0'
|
389
406
|
requirements: []
|
390
|
-
rubygems_version: 3.
|
391
|
-
signing_key:
|
407
|
+
rubygems_version: 3.6.2
|
392
408
|
specification_version: 4
|
393
409
|
summary: eCFR.gov API client
|
394
410
|
test_files: []
|