aaf-mdqt 0.8.12 → 0.8.14

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: fb8dba4eab534adb583b3bbdcbe7b36ab54ae129179d5217a49622759c342028
4
- data.tar.gz: 7f75588515b9adc5d4ebdb3cec70c9e30d33695da2a00660075c0cfa755b71f5
3
+ metadata.gz: 7929ecbf467dbb395407005ef1407a2f4276695f8cacc08e1bb1bbce360591da
4
+ data.tar.gz: b670d1371d69d88768a9df9630088ad53661e2afbf3e3eb02ed1c713c3cb6137
5
5
  SHA512:
6
- metadata.gz: c1e0af3a0728d26a0dd768e422e6888bb78855e5e2fd354ea69b2bc4838ccab78d80cf664503c4fd19d4ff06fb675747c5881c97eed94ced7e3a61c18ba4524d
7
- data.tar.gz: 503c3e17241ce6c61dfc9def682acb4bdc7b83ce2367e8cc3b1b425eda4d487a3c3e9b5165a743aefa32c98dd36773c02a475c000688e1aef2a0188c97c36c6b
6
+ metadata.gz: a489c45d3989e394060d2f89fbca2d9acb60aec0250d15955cd9dcb83ab5a65206153485770a17cf5d8d50b2f20072b5a06105eeb4a764d4c4b688458107afa2
7
+ data.tar.gz: c4d3113018774a358b8afa5de9f9ecd9bcf39bb682211763728fc007cb07ad129cf54c10a958871861af2ceaf7ac72ce9312cf27df6c987a864fa4365a46e6fa
data/lib/mdqt/cli/get.rb CHANGED
@@ -62,7 +62,7 @@ module MDQT
62
62
  def output_metadata(results, options)
63
63
  case action(results, options)
64
64
  when :no_output
65
- # do nothing
65
+ results
66
66
  when :save_files
67
67
  output_files(results, options)
68
68
  when :print_to_stdout
@@ -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(Dir.tmpdir, 'mdqt_cache'))
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
@@ -1,3 +1,3 @@
1
1
  module MDQT
2
- VERSION = "0.8.12"
2
+ VERSION = "0.8.14"
3
3
  end
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.12
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-17 00:00:00.000000000 Z
12
+ date: 2025-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander