Sha256: e068a5b737e4a231a16463ba1e0af974092909b02c3cc643a140b10a32b46241
Contents?: true
Size: 731 Bytes
Versions: 18
Compression:
Stored size: 731 Bytes
Contents
class CompareLinker class GithubTagFinder attr_reader :octokit, :gem_name, :repo_full_name def initialize(octokit, gem_name, repo_full_name) @octokit = octokit @gem_name = gem_name @repo_full_name = repo_full_name end def find(gem_version) tags = auto_paginate { octokit.tags(repo_full_name) } if tags tags.find { |tag| tag.name == gem_version || tag.name == "v#{gem_version}" || tag.name == "#{gem_name}-#{gem_version}" } end end private def auto_paginate original = octokit.auto_paginate octokit.auto_paginate = true yield ensure octokit.auto_paginate = original end end end
Version data entries
18 entries across 18 versions & 1 rubygems