Sha256: eeed699f217c478bf85c82da574d8436f16c3de67f2e55a961784fb2a2276c64

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 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)

      def load!
        fail('No repo specified') unless @repo
        @state.value = regex_helper(release)
      end

      private

      def release
        @release ||= github_api.latest_release(@repo).tag_name
      end

      def repo(value)
        @repo = value
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
prospectus-0.0.11 lib/prospectus/modules/github_release.rb
prospectus-0.0.10 lib/prospectus/modules/github_release.rb
prospectus-0.0.9 lib/prospectus/modules/github_release.rb
prospectus-0.0.8 lib/prospectus/modules/github_release.rb
prospectus-0.0.6 lib/prospectus/modules/github_release.rb
prospectus-0.0.5 lib/prospectus/modules/github_release.rb
prospectus-0.0.4 lib/prospectus/modules/github_release.rb
prospectus-0.0.3 lib/prospectus/modules/github_release.rb
prospectus-0.0.2 lib/prospectus/modules/github_release.rb