aaf-mdqt 0.8.13 → 0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mdqt/client/metadata_service.rb +21 -3
- data/lib/mdqt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7929ecbf467dbb395407005ef1407a2f4276695f8cacc08e1bb1bbce360591da
|
4
|
+
data.tar.gz: b670d1371d69d88768a9df9630088ad53661e2afbf3e3eb02ed1c713c3cb6137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a489c45d3989e394060d2f89fbca2d9acb60aec0250d15955cd9dcb83ab5a65206153485770a17cf5d8d50b2f20072b5a06105eeb4a764d4c4b688458107afa2
|
7
|
+
data.tar.gz: c4d3113018774a358b8afa5de9f9ecd9bcf39bb682211763728fc007cb07ad129cf54c10a958871861af2ceaf7ac72ce9312cf27df6c987a864fa4365a46e6fa
|
@@ -144,7 +144,7 @@ module MDQT
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def connection
|
147
|
-
Faraday.new(:url => base_url) do |faraday|
|
147
|
+
con = Faraday.new(:url => base_url) do |faraday|
|
148
148
|
faraday.request :url_encoded
|
149
149
|
faraday.response :follow_redirects
|
150
150
|
if cache?
|
@@ -161,6 +161,24 @@ module MDQT
|
|
161
161
|
#faraday.response :logger
|
162
162
|
faraday.adapter :httpx
|
163
163
|
end
|
164
|
+
enable_cache_logging if verbose?
|
165
|
+
con
|
166
|
+
end
|
167
|
+
|
168
|
+
def enable_cache_logging
|
169
|
+
ActiveSupport::Notifications.subscribe "http_cache.faraday" do |*args|
|
170
|
+
event = ActiveSupport::Notifications::Event.new(*args)
|
171
|
+
cache_status = event.payload[:cache_status]
|
172
|
+
|
173
|
+
case cache_status
|
174
|
+
when :fresh, :valid
|
175
|
+
STDERR.puts "cache hit"
|
176
|
+
when :invalid, :miss
|
177
|
+
STDERR.puts "cache miss"
|
178
|
+
when :unacceptable
|
179
|
+
STDERR.puts "cache ???"
|
180
|
+
end
|
181
|
+
end
|
164
182
|
end
|
165
183
|
|
166
184
|
def default_store_config
|
@@ -168,7 +186,7 @@ module MDQT
|
|
168
186
|
when :none, nil
|
169
187
|
nil
|
170
188
|
when :file, :files
|
171
|
-
File.absolute_path(File.join(
|
189
|
+
File.absolute_path(File.join('tmp', 'cache', 'mdqt'))
|
172
190
|
when :memcached, :memcache
|
173
191
|
'localhost:11211'
|
174
192
|
end
|
@@ -191,4 +209,4 @@ module MDQT
|
|
191
209
|
|
192
210
|
end
|
193
211
|
|
194
|
-
end
|
212
|
+
end
|
data/lib/mdqt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aaf-mdqt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Birkinshaw
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-02-
|
12
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|