ecfr 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ecfr/configuration.rb +1 -0
- data/lib/ecfr/varnish_cache_service/base.rb +25 -0
- data/lib/ecfr/version.rb +1 -1
- data/lib/ecfr.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a461ee470f942857af590c19d394480c9fae9120f34d350177c2cfcdde01afa
|
4
|
+
data.tar.gz: c5e33627c9a6de6cc626588dc5772c9e51276aab272293960f85672c7e2c30d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f1289d6881ae12c16bf38d3f6f19b4d62690f8fd651273b2146a08a2c8e6c1e715f279f71dee059ff7304c5f2e4b092cc95b003fbfacd84c6bd712616ba7ce8
|
7
|
+
data.tar.gz: feb036c209435977e25198394deb3a814d76f821ee560d643bf5c4dcd1a0bf0f4abc649921d8fbd9dce11d467c07eb2660319149aa1343e8351d494348cbbf14
|
data/CHANGELOG.md
CHANGED
data/lib/ecfr/configuration.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Ecfr
|
2
|
+
#
|
3
|
+
# Varnish is used to provide cache based on an expires header set by
|
4
|
+
# various service endpoints. Varnish is only routable internally.
|
5
|
+
#
|
6
|
+
module VarnishCacheService
|
7
|
+
class Base < Ecfr::Base
|
8
|
+
def self.base_url
|
9
|
+
Ecfr.config.varnish_cache_service_url
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.service_name
|
13
|
+
"Varnish Cache Service"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.expire(path)
|
17
|
+
purge(path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.expire_everything
|
21
|
+
expire("/.*")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/ecfr/version.rb
CHANGED
data/lib/ecfr.rb
CHANGED
@@ -56,6 +56,7 @@ module Ecfr
|
|
56
56
|
Ecfr::RendererService,
|
57
57
|
Ecfr::SearchService,
|
58
58
|
Ecfr::SubscriptionsService,
|
59
|
+
Ecfr::VarnishCacheService,
|
59
60
|
Ecfr::VersionerService
|
60
61
|
]
|
61
62
|
end
|
@@ -87,4 +88,5 @@ require_relative "ecfr/prince_xml_service/base"
|
|
87
88
|
require_relative "ecfr/renderer_service/base"
|
88
89
|
require_relative "ecfr/search_service/base"
|
89
90
|
require_relative "ecfr/subscriptions_service/base"
|
91
|
+
require_relative "ecfr/varnish_cache_service/base"
|
90
92
|
require_relative "ecfr/versioner_service/base"
|
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.
|
4
|
+
version: 1.0.4
|
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-
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -341,6 +341,7 @@ files:
|
|
341
341
|
- lib/ecfr/testing/factory_bot_helpers/ecfr_gem_initialize_helpers.rb
|
342
342
|
- lib/ecfr/testing/helpers/response_helper.rb
|
343
343
|
- lib/ecfr/testing/strategies/ecfr_attribute_hash_strategy.rb
|
344
|
+
- lib/ecfr/varnish_cache_service/base.rb
|
344
345
|
- lib/ecfr/version.rb
|
345
346
|
- lib/ecfr/versioner_service/ancestors.rb
|
346
347
|
- lib/ecfr/versioner_service/ancestors/metadata_node_info.rb
|