mux_tf 0.8.2 → 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: 0fa8aa05ed298ad8e22d12b7fdab99ac1cf4f5a1fe8d947c01bf3a47249b8b77
4
- data.tar.gz: 9f65f9b7f183c80be4af4fa5e4c84f4396e0aecc9469f5f3dc20a4c2abef35ab
3
+ metadata.gz: 21e0e5f58ecc6d306e555902ffe4db396a624dcd238cffd4ffa9f601baa44f8a
4
+ data.tar.gz: 80cd848539404d195931669894311556df35b7a6949a3aaae61f5ee35c9c065b
5
5
  SHA512:
6
- metadata.gz: 7b65a09e45cdf7997a6f8b79f29061f49456f456b8d5063abd4e588230075e66ce945f0fbd3e8e6a0a2dd05a2c6d66c23a74569180bf48380810b474a64ed42b
7
- data.tar.gz: 17ae22572a91f31b6305f2637639fb21e6fa433fe20aa6bb9c07db7071ffe9ddf83cf3afe6425e98c223b9fd906a9323660febbe9282c0246b0290d3ceea5d96
6
+ metadata.gz: 9be81dd55dcc793400fddffc83af284893d71f02ce7462f7f7f10203114ba9260619887ecbdf92aeb35175f26334c40fef84e7d91e1bc380d0bf976ed7ecd561
7
+ data.tar.gz: b16d3e6f1b3214912354ff6915e13c64542ed224b16e1ec7d40241218ab2effe292dda60bceb6b7ab8d71292e3cf99c057d14096b39628482e65430c704380f1
@@ -17,12 +17,14 @@ module MuxTf
17
17
  if @path == :then
18
18
  yield
19
19
  end
20
+ self
20
21
  end
21
22
 
22
23
  def otherwise(&block)
23
24
  if @path == :otherwise
24
25
  yield
25
26
  end
27
+ self
26
28
  end
27
29
  end
28
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuxTf
4
- VERSION = "0.8.2"
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.2
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