Sha256: 081e76d9858822318ddd59a062602e140fccaecc38861a8f2efaf0cc77355c05
Contents?: true
Size: 674 Bytes
Versions: 1
Compression:
Stored size: 674 Bytes
Contents
require 'json' require 'open-uri' module LogCabin module Modules ## # Pull state from a GitHub release module GithubRelease include Prospectus.helpers.find(:regex) include Prospectus.helpers.find(:github_api) include Prospectus.helpers.find(:filter) def load! raise('No repo specified') unless @repo @state.value = regex_helper(release) end private def release return @release if @release releases = github_api.releases(@repo) %i[draft prerelease].each { |x| releases.reject!(&x) } @release = filter_helper(releases.map(&:tag_name).first end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prospectus-0.5.2 | lib/prospectus/modules/github_release.rb |