Sha256: d204be35329f1667f6fb23e561d7fb07898bc57024cc113d05a386b564ca64d2

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

require 'faraday'
require 'json'

module Acquia
  # @see https://cloudapi.acquia.com/
  class Cloud
    attr_reader :api

    def initialize(args = {})
      @api = Api.new args
    end

    def sites
      @sites ||= @api.get('/sites').map do |site|
        Site.new(self, site)
      end
    end

    # @return [Acquia::Cloud::Site]
    def site(name)
      Site.new(self, name).refresh
    end

    def drushrc
      @api.get '/me/drushrc'
    end
  end
end

%w{
  version
  errors
  api
  database
  domain
  environment
  server
  site
  task
  logs/source
  logs/streamer
}.each {|p| require "acquia/cloud/#{p}" }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acquia-cloud-0.4.1 lib/acquia/cloud.rb
acquia-cloud-0.4.0 lib/acquia/cloud.rb