Sha256: c7891cb8eb2d7e4f08f384e2e376b7d49c6e4dd6912f373dd826fff6eef09180

Contents?: true

Size: 540 Bytes

Versions: 6

Compression:

Stored size: 540 Bytes

Contents

require 'contracts'

module ConcourseResource
  module RubyGems
    module Support
      # Params for GemResource
      module Source
        include ::Contracts::Core
        include ::Contracts::Builtin

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

        Contract None => String
        def host
          @host ||= source.fetch('host') { 'rubygems.org' }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
concourse-resource-rubygems-0.3.4 lib/concourse-resource/rubygems/support/source.rb
concourse-resource-rubygems-0.3.3 lib/concourse-resource/rubygems/support/source.rb
concourse-resource-rubygems-0.3.2 lib/concourse-resource/rubygems/support/source.rb
concourse-resource-rubygems-0.3.1 lib/concourse-resource/rubygems/support/source.rb
concourse-resource-rubygems-0.3.0 lib/concourse-resource/rubygems/support/source.rb
concourse-resource-rubygems-0.2.0 lib/concourse-resource/rubygems/support/source.rb