mux_tf 0.8.3 → 0.8.4

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: 1bfb6996988528294d8aabd2a79b6a5ca1c6f608a2b16e3c9528ca824d5f3840
4
- data.tar.gz: 63c0f292a9464ba91b90bd9b0ce3e17905e827faf927c76fb47ac77d8817645b
3
+ metadata.gz: 21e0e5f58ecc6d306e555902ffe4db396a624dcd238cffd4ffa9f601baa44f8a
4
+ data.tar.gz: 80cd848539404d195931669894311556df35b7a6949a3aaae61f5ee35c9c065b
5
5
  SHA512:
6
- metadata.gz: 41bd544cb898a3a4e96776ce9c57c89f1358dfb40088ce87e3cf221ac2032766db1e104918c552190d656f4c60b48cb9860dbab69f99fc28960d77b0404cc16d
7
- data.tar.gz: 9577359e60f72f485d148e03cfbd046a658afffac71f78321d30015abf855a205fb9a859693ee6d9116f2c73da3cc430c28e45ce2e817d0e26a5ba77e65391af
6
+ metadata.gz: 9be81dd55dcc793400fddffc83af284893d71f02ce7462f7f7f10203114ba9260619887ecbdf92aeb35175f26334c40fef84e7d91e1bc380d0bf976ed7ecd561
7
+ data.tar.gz: b16d3e6f1b3214912354ff6915e13c64542ed224b16e1ec7d40241218ab2effe292dda60bceb6b7ab8d71292e3cf99c057d14096b39628482e65430c704380f1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuxTf
4
- VERSION = "0.8.3"
4
+ VERSION = "0.8.4"
5
5
  end
@@ -1,5 +1,37 @@
1
1
  require "yaml/store"
2
2
 
3
+ module YAML
4
+ # Explaination from @h4xnoodle:
5
+ #
6
+ # Since ruby 3+ and psych 4+, the yaml loading became extra safe so the
7
+ # expired_at timestamp in the yaml cache is no longer parsing for whatever reason.
8
+ #
9
+ # Attempts were made with
10
+ #
11
+ # `@store = YAML::Store.new path`
12
+ # =>
13
+ # `@store = YAML::Store.new(path, { aliases: true, permitted_classes: [Time] })`
14
+ # to get it to work but that didn't help, so decided to just bypass the safe
15
+ # loading, since the file is controlled by us for the version checking.
16
+ #
17
+ # This is to override the way that psych seems to be loading YAML.
18
+ # Instead of using 'load' which needs work to permit the 'Time' class
19
+ # (which from above I tried that and it wasn't working so I decided to just
20
+ # bypass and use what it was doing before).
21
+ # This brings us back to the equivalent that was working before in that unsafe
22
+ # load was used before the psych upgrade.
23
+ #
24
+ # This change: https://my.diffend.io/gems/psych/3.3.2/4.0.0
25
+ # is the changes that 'cause the problem' and so I'm 'fixing it' by using the old equivalent.
26
+ #
27
+ # Maybe the yaml cache needs more work to have
28
+ # `YAML::Store.new(path, { aliases: true, permitted_classes: [Time] }) work.`
29
+ #
30
+ class << self
31
+ alias_method :load, :unsafe_load
32
+ end
33
+ end
34
+
3
35
  module MuxTf
4
36
  class YamlCache
5
37
  def initialize(path, default_ttl:)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mux_tf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Banasik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-18 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport