Module: VagrantCloud

Extended by:
Configurable
Defined in:
lib/vagrant-cloud.rb,
lib/vagrant-cloud/cli.rb,
lib/vagrant-cloud/client.rb,
lib/vagrant-cloud/cli/box.rb,
lib/vagrant-cloud/version.rb,
lib/vagrant-cloud/defaults.rb,
lib/vagrant-cloud/configurable.rb,
lib/vagrant-cloud/resources/box.rb,
lib/vagrant-cloud/resources/base.rb

Defined Under Namespace

Modules: Configurable, Defaults, Resource Classes: BoxCommand, CLI, Client

Constant Summary collapse

VERSION =

The version of VagrantCloud.

Returns:

  • (String)
'0.0.1'.freeze

Constants included from Defaults

Defaults::USER_AGENT

Class Method Summary collapse

Methods included from Configurable

configure, keys, reset!

Methods included from Defaults

access_token, endpoint, options, proxy_address, proxy_password, proxy_port, proxy_username, ssl_pem_file, ssl_verify, user_agent, username

Class Method Details

.clientClient

Client object based off the configured options in Configurable.

Returns:



38
39
40
41
42
43
44
# File 'lib/vagrant-cloud.rb', line 38

def client
  unless defined?(@client) && @client.same_options?(options)
    @client = Client.new(options)
  end

  @client
end

.io=(io) ⇒ Object



29
30
31
# File 'lib/vagrant-cloud.rb', line 29

def io=(io)
  Logify.io = io
end

.log_level=(level) ⇒ Object



22
23
24
# File 'lib/vagrant-cloud.rb', line 22

def log_level=(level)
  Logify.level = level
end

.method_missing(m, *args, &block) ⇒ Object

Delegate all methods to the client object, essentially making the module object behave like a client.



50
51
52
53
54
55
56
# File 'lib/vagrant-cloud.rb', line 50

def method_missing(m, *args, &block)
  if client.respond_to?(m)
    client.send(m, *args, &block)
  else
    super
  end
end

.respond_to_missing?(m, include_private = false) ⇒ Boolean

Delegating respond_to to the client.

Returns:

  • (Boolean)


61
62
63
# File 'lib/vagrant-cloud.rb', line 61

def respond_to_missing?(m, include_private = false)
  client.respond_to?(m) || super
end