tina4ruby 3.10.45 → 3.10.46

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf2edaa28d3afdb7d8d2265be9fa07f060b2106152b296d626bc38444d9669ed
4
- data.tar.gz: 796afa499de3e3d0f5bd2451c5769785adb29b3fdf0b52c2e7d4d094163d7d4e
3
+ metadata.gz: f02d3a06638234cc17bf1997d04733607a3a700bf5f517d3e65e3911ac4323b7
4
+ data.tar.gz: fbed9ed244134ad3aec0456f1930cd5562b67945e25c4bcd06bef03692be8904
5
5
  SHA512:
6
- metadata.gz: d5b947510e03c5204016a9b81a3b9824815d6189e65403e6985d7c3b47c934ffb10c6e1a2d7c72a4a6e225d15f708d4cd162e0b6a48631719a3635c46a99bcfb
7
- data.tar.gz: 174c77eea8a89ac795bcdbbf51b204b13285dfa19eb7f8658b2224b2e7d7b223d22cfcd4de2ed75fb71ca030c9440d7b79524a082c2334e654c020d4aa83f391
6
+ metadata.gz: 3b84c92ca6999667d7fa4eb1745b13412940add4633418147a63c3ab14560c8d35bfd50b348c66a8561ce9dc93730c7086b6587a77dcca12b9fda1407448db0f
7
+ data.tar.gz: ac5c511443d339eebf3952cb8dc07ef5e0317b9d8b0421a9548955f53a89fa576008b3eaff87b620018a58f041a8a8cc3bd15636a3427d8af49b914c89c7a147
@@ -25,13 +25,13 @@ module Tina4
25
25
  row = @db.fetch_one("SELECT data, expires_at FROM #{TABLE_NAME} WHERE session_id = ?", [session_id])
26
26
  return nil unless row
27
27
 
28
- expires_at = row["expires_at"].to_f
28
+ expires_at = (row[:expires_at] || row["expires_at"]).to_f
29
29
  if expires_at > 0 && expires_at < Time.now.to_f
30
30
  destroy(session_id)
31
31
  return nil
32
32
  end
33
33
 
34
- JSON.parse(row["data"])
34
+ JSON.parse(row[:data] || row["data"])
35
35
  rescue JSON::ParserError
36
36
  nil
37
37
  end
data/lib/tina4/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tina4
4
- VERSION = "3.10.45"
4
+ VERSION = "3.10.46"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tina4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.45
4
+ version: 3.10.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tina4 Team