Sha256: 3fe9b2e1e5a27aced99a0656c5c8c2b750d72a764dc01ad53ffe2b3347eb1808

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

require 'contracts'

module GitHubStatus
  module Support
    module Source
      include ::Contracts::Core
      include ::Contracts::Builtin

      Contract None => String
      def access_token
        @access_token ||= source.fetch 'access_token'
      rescue KeyError
        STDERR.puts 'Source is missing access_token'
        abort
      end

      Contract None => String
      def repo
        @repo ||= source.fetch 'repo'
      rescue KeyError
        STDERR.puts 'Source is missing repo'
        abort
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
concourse-github-status-0.2.2 lib/github-status/support/source.rb
concourse-github-status-0.2.1 lib/github-status/support/source.rb
concourse-github-status-0.2.0 lib/github-status/support/source.rb