Sha256: 132c3f3ba238e914dd62114b4f08c2fbd0180919fe936945b1d40a995fd8e3ee

Contents?: true

Size: 617 Bytes

Versions: 8

Compression:

Stored size: 617 Bytes

Contents

require 'contracts'
require 'faraday'
require_relative 'config'

module Cloudstrap
  class SeedProperties
    include ::Contracts::Core
    include ::Contracts::Builtin

    Contract None => String
    def source
      config.bootstrap_properties_seed_url
    end

    Contract None => ::Faraday::Response
    def connection
      @connection ||= ::Faraday.get source
    end

    Contract None => Maybe[String]
    def contents
      @contents ||= connection.body if connection.success?
    end

    Contract None => ::StackatoLKG::Config
    def config
      @config ||= ::StackatoLKG::Config.new
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cloudstrap-0.30.11.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.30.3.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.30.2.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.30.1.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.29.7.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.29.6.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.29.5.pre lib/cloudstrap/seed_properties.rb
cloudstrap-0.29.1.pre lib/cloudstrap/seed_properties.rb