geminiext 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/geminiext/cache.rb +2 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06c950bcdc066e3a29b824226c9ce351a3555aece1cb6169526e7a350124ce98
4
- data.tar.gz: a60ec80c78df74698c81bfbf5c009be396255ba51cc772d5541947e36c9c8db3
3
+ metadata.gz: b9d9c0b9651ab28acc15a0156d8a801c3c2432de1a28052c4f151568642e000c
4
+ data.tar.gz: 169262f9e2bb8fbfaea0c778d5d74bea8bf7b68beb941860ef825e90ce339461
5
5
  SHA512:
6
- metadata.gz: be97a24aa8df7fff3a54d53c0c236460db69910bdeb9b2760b9bb6099610f19870d7ed36c9626fb2ff6ef48d95b7f26207a7ceeb5d4df99c79e43440dbd9409e
7
- data.tar.gz: 138f4a593288ae8593bf91900101bba8e37c0bbc2cadd48b82122c07d9ec1e67cb47896862d3fc4f77ad8c6cd64b3e2cb511a86017933f290bb52ebeedd890ac
6
+ metadata.gz: 29fbf2bfaa621004d08a80ea7c8703d36166568e526c0c255234228bfd75adefd15fab6c5411338a48c57d258b3209bdb11024ec08675880dc9edbfc8261fb26
7
+ data.tar.gz: d1421a48732a4000f0e058dc2a35e62d22418e1bd72667a18fa7ff85fb2838a706fa8297404df312bd29fcd39a75ff8597db68e40d6cbd352d184eb27ae41983
@@ -46,6 +46,8 @@ module GeminiExt
46
46
  req.params['key'] = ENV.fetch('GEMINI_API_KEY')
47
47
  end
48
48
 
49
+ return [] if JSON.parse(response.body).empty?
50
+
49
51
  JSON.parse(response.body)['cachedContents'].map do |item|
50
52
  def item.delete = GeminiExt::Cache.delete(name: self['name'])
51
53
  def item.set_ttl(ttl = 120) = GeminiExt::Cache.update(name: self['name'], content: { ttl: "#{ttl}s" })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geminiext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias