Skip to content

Commit

Permalink
Fix compatibility with rubygems 3.6 (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Giddins <[email protected]>
  • Loading branch information
segiddins authored Dec 19, 2024
1 parent 084690f commit 1fdfa90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/support/request_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module SpecificationToYamlNormalization
class CoderWrapper < SimpleDelegator
def add(key, value)
value = "3.5.11" if key == "rubygems_version"
value = nil if key == "original_platform" && value == ""
return if value.nil?

super
Expand Down Expand Up @@ -68,7 +69,7 @@ def build_gem(name, version, platform: nil)
end
yield spec if block_given?

spec.singleton_class.prepend(SpecificationToYamlNormalization) if Gem.rubygems_version < Gem::Version.new("3.6.0")
spec.singleton_class.prepend(SpecificationToYamlNormalization)

package = Gem::Package.new(StringIO.new.binmode)
package.build_time = Time.utc(1970)
Expand Down

0 comments on commit 1fdfa90

Please sign in to comment.