Skip to content

Commit

Permalink
Remove pre-3.0 conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
teeparham committed Feb 2, 2024
1 parent 82a6c08 commit 7fc3a60
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/gemdiff/repo_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ def gemspec_homepage(gem_name)
end
yaml = gemspec(gem_name)
return if yaml.to_s.empty?
spec = if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
YAML.safe_load(yaml, permitted_classes: PERMITTED_GEMSPEC_CLASSES)
else
YAML.load(yaml)
end
spec = YAML.safe_load(yaml, permitted_classes: PERMITTED_GEMSPEC_CLASSES)
return clean_url(spec.homepage) if spec.homepage =~ GITHUB_REPO_REGEX
match = spec.description.to_s.match(GITHUB_REPO_REGEX)
match && clean_url(match[0])
Expand Down

0 comments on commit 7fc3a60

Please sign in to comment.