Sha256: c88a12f205af0fd82fd23fc8115cb4544b4c3384e033cf6b86feb2d91edd3b46
Contents?: true
Size: 912 Bytes
Versions: 11
Compression:
Stored size: 912 Bytes
Contents
# frozen_string_literal: true module Getv class Package class GitHub # Getv::Package::GitHub::Commit class class Commit < Package::GitHub def initialize(name, opts = {}) opts = { branch: 'master', select_search: '^((\d{8})(\d{6}),(([a-z\d]{7})(.*)))$', semantic_only: false }.merge(opts) opts = defaults.merge(opts) opts = github_defaults(name).merge(opts) super name, opts end private def retrieve_versions # rubocop:disable Metrics/AbcSize retries ||= 0 github.commits("#{opts[:owner]}/#{opts[:repo]}", opts[:branch]).map do |c| "#{DateTime.parse(c[:commit][:author][:date].to_s).strftime('%Y%m%d%H%M%S')},#{c[:sha]}" end rescue StandardError retry if (retries += 1) < 4 end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems