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 +4 -4
- data/lib/mux_tf/version.rb +1 -1
- data/lib/mux_tf/yaml_cache.rb +32 -0
- 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: 21e0e5f58ecc6d306e555902ffe4db396a624dcd238cffd4ffa9f601baa44f8a
|
4
|
+
data.tar.gz: 80cd848539404d195931669894311556df35b7a6949a3aaae61f5ee35c9c065b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be81dd55dcc793400fddffc83af284893d71f02ce7462f7f7f10203114ba9260619887ecbdf92aeb35175f26334c40fef84e7d91e1bc380d0bf976ed7ecd561
|
7
|
+
data.tar.gz: b16d3e6f1b3214912354ff6915e13c64542ed224b16e1ec7d40241218ab2effe292dda60bceb6b7ab8d71292e3cf99c057d14096b39628482e65430c704380f1
|
data/lib/mux_tf/version.rb
CHANGED
data/lib/mux_tf/yaml_cache.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|