Sha256: d448e2e62b00d1194a845117cc1f9b55fc4266a6cf37210a44e49bb01c2e836a

Contents?: true

Size: 657 Bytes

Versions: 19

Compression:

Stored size: 657 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

      Contract None => String
      def branch
        @branch ||= source.fetch('branch') { 'master' }
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
concourse-github-status-0.7.1 lib/github-status/support/source.rb
concourse-github-status-0.7.0 lib/github-status/support/source.rb
concourse-github-status-0.6.6 lib/github-status/support/source.rb
concourse-github-status-0.6.4 lib/github-status/support/source.rb
concourse-github-status-0.6.3 lib/github-status/support/source.rb
concourse-github-status-0.6.2 lib/github-status/support/source.rb
concourse-github-status-0.5.11 lib/github-status/support/source.rb
concourse-github-status-0.5.10 lib/github-status/support/source.rb
concourse-github-status-0.5.9 lib/github-status/support/source.rb
concourse-github-status-0.5.8 lib/github-status/support/source.rb
concourse-github-status-0.5.7 lib/github-status/support/source.rb
concourse-github-status-0.5.0 lib/github-status/support/source.rb
concourse-github-status-0.4.3 lib/github-status/support/source.rb
concourse-github-status-0.4.2 lib/github-status/support/source.rb
concourse-github-status-0.4.1 lib/github-status/support/source.rb
concourse-github-status-0.4.0 lib/github-status/support/source.rb
concourse-github-status-0.3.1 lib/github-status/support/source.rb
concourse-github-status-0.3.0 lib/github-status/support/source.rb
concourse-github-status-0.2.4 lib/github-status/support/source.rb