fiber-storage-1.0.1/0000755000004100000410000000000015144641645014304 5ustar www-datawww-datafiber-storage-1.0.1/fiber-storage.gemspec0000644000004100000410000000577515144641645020420 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: fiber-storage 1.0.1 ruby lib Gem::Specification.new do |s| s.name = "fiber-storage".freeze s.version = "1.0.1".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "documentation_uri" => "https://ioquatix.github.io/fiber-storage/", "funding_uri" => "https://github.com/sponsors/ioquatix/", "homepage_uri" => "https://github.com/ioquatix/fiber-storage", "source_code_uri" => "https://github.com/ioquatix/fiber-storage.git" } if s.respond_to? :metadata= s.require_paths = ["lib".freeze] s.authors = ["Samuel Williams".freeze] s.cert_chain = ["-----BEGIN CERTIFICATE-----\nMIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11\nZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK\nCZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz\nMjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd\nMBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj\nbzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB\nigKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2\n9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW\nsGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE\ne5A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Xyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=\n-----END CERTIFICATE-----\n".freeze] s.date = "2025-04-15" s.files = ["lib/fiber/storage.rb".freeze, "lib/fiber/storage/version.rb".freeze, "license.md".freeze, "readme.md".freeze, "releases.md".freeze] s.homepage = "https://github.com/ioquatix/fiber-storage".freeze s.licenses = ["MIT".freeze] s.required_ruby_version = Gem::Requirement.new(">= 3.1".freeze) s.rubygems_version = "3.6.2".freeze s.summary = "Provides a compatibility shim for fiber storage.".freeze end fiber-storage-1.0.1/lib/0000755000004100000410000000000015144641645015052 5ustar www-datawww-datafiber-storage-1.0.1/lib/fiber/0000755000004100000410000000000015144641645016141 5ustar www-datawww-datafiber-storage-1.0.1/lib/fiber/storage.rb0000644000004100000410000000430315144641645020132 0ustar www-datawww-data# frozen_string_literal: true # Released under the MIT License. # Copyright, 2022-2025, by Samuel Williams. require "fiber" # @namespace class Fiber # Provides compatibility shims for fiber storage. module Storage # Initialize the fiber with the given storage. def initialize(*arguments, storage: true, **options, &block) case storage when true @storage = Fiber.current.storage else raise TypeError, "Storage must be a hash!" unless storage.is_a?(Hash) @storage = storage end super(*arguments, **options, &block) end # Set the storage associated with this fiber, clearing any previous storage. def storage=(hash) @storage = hash.dup end # The storage associated with this fiber. def storage @storage.dup end # @private def __storage__ @storage ||= {} end end unless Fiber.current.respond_to?(:storage) prepend Storage # Get a value from the current fiber's storage. def self.[] key raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) self.current.__storage__[key] end # Set a value in the current fiber's storage. def self.[]= key, value raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) self.current.__storage__[key] = value end else # Whether the fiber storage has buggy keys. Unfortunately the original implementation of fiber storage was broken, this method detects the bug and is used to apply a fix. def self.__borked_keys__ !Fiber.new do key = :"#{self.object_id}.key" Fiber[key] = true Fiber[key] end.resume end if __borked_keys__ # This is a fix for the original implementation of fiber storage which incorrectly handled non-dynamic symbol keys. module FixBorkedKeys # Lookup the value for the key, ensuring the symbol is dynamic. def [](key) raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) super(eval(key.inspect)) end # Assign the value to the key, ensuring the symbol is dynamic. def []=(key, value) raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) super(eval(key.inspect), value) end end singleton_class.prepend FixBorkedKeys end end end fiber-storage-1.0.1/lib/fiber/storage/0000755000004100000410000000000015144641645017605 5ustar www-datawww-datafiber-storage-1.0.1/lib/fiber/storage/version.rb0000644000004100000410000000027015144641645021616 0ustar www-datawww-data# frozen_string_literal: true # Released under the MIT License. # Copyright, 2022-2025, by Samuel Williams. require "fiber" class Fiber module Storage VERSION = "1.0.1" end end fiber-storage-1.0.1/checksums.yaml.gz.sig0000444000004100000410000000060015144641645020347 0ustar www-datawww-data0LL-Zh& ϣmзx\Dr[~UVH"-PF7MW`9g}19!or NjUv3Я{>zwsUo)$Jvu+o¡cQNj K-vN/7.MY#_"yl5]:%v#RV8)J{T)YGmOF1ƁZ5hm$wzUl$S;'< T>!qف`g>`3w1m+nt`e:+--TQZ6n!V>N+6@ON; ߏ{YهrsP8r[}+(Ĺo L y,Ludح 8BV0h@>J+ lUR!\;W1 gN߲֘RƸ T *h`a Z/ Tfiber-storage-1.0.1/license.md0000644000004100000410000000207315144641645016252 0ustar www-datawww-data# MIT License Copyright, 2022-2025, by Samuel Williams. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fiber-storage-1.0.1/metadata.gz.sig0000444000004100000410000000060015144641645017201 0ustar www-datawww-data y&:ٷ4- sP^*m7ʂ-(N-QpGUc$~qw%9-Z'# .uY t;~q#O g2[9Y8 ;\!zs t\ K`Xq3) +00q!d^#*i6eϭPqL/0z6  Rbs7VzxeL+: C`~W9Lq9dLF^Y 1 UƥS0<К03DNII8 h$8L+LiGB,2 YA3MNL5)dPIrn[*fiber-storage-1.0.1/releases.md0000644000004100000410000000011415144641645016425 0ustar www-datawww-data# Releases ## v1.0.1 - Fix test suite incompatibiltiies with Ruby 3.4+.