Module: Spice

Extended by:
Spice, Config, Connection::Clients, Connection::Cookbooks, Connection::DataBags, Connection::Environments, Connection::Nodes, Connection::Roles, Connection::Search
Included in:
Spice
Defined in:
lib/spice.rb,
lib/spice/node.rb,
lib/spice/mock.rb,
lib/spice/role.rb,
lib/spice/error.rb,
lib/spice/client.rb,
lib/spice/config.rb,
lib/spice/request.rb,
lib/spice/version.rb,
lib/spice/data_bag.rb,
lib/spice/cookbook.rb,
lib/spice/connection.rb,
lib/spice/environment.rb,
lib/spice/persistence.rb,
lib/spice/request/auth.rb,
lib/spice/data_bag_item.rb,
lib/spice/authentication.rb,
lib/spice/connection/nodes.rb,
lib/spice/connection/roles.rb,
lib/spice/cookbook_version.rb,
lib/spice/connection/search.rb,
lib/spice/connection/clients.rb,
lib/spice/response/parse_json.rb,
lib/spice/connection/cookbooks.rb,
lib/spice/connection/data_bags.rb,
lib/spice/response/client_error.rb,
lib/spice/connection/environments.rb,
lib/spice/connection/authentication.rb

Defined Under Namespace

Modules: Config, Persistence, Request, Response Classes: Authentication, Client, Connection, Cookbook, CookbookVersion, DataBag, DataBagItem, Environment, Error, Mock, Node, Role

Constant Summary

VERSION =
"1.0.0.pre"

Constants included from Config

Config::DEFAULT_CHEF_VERSION, Config::DEFAULT_CONNECTION_OPTIONS, Config::DEFAULT_SERVER_URL, Config::DEFAULT_USER_AGENT, Config::VALID_OPTIONS_KEYS

Instance Method Summary (collapse)

Methods included from Connection::Search

search

Methods included from Connection::Roles

role, roles

Methods included from Connection::Nodes

node, nodes

Methods included from Connection::Environments

environment, environments

Methods included from Connection::DataBags

data_bag, data_bag_item, data_bags

Methods included from Connection::Cookbooks

cookbook, cookbook_version, cookbooks

Methods included from Connection::Clients

client, clients

Methods included from Config

extended, options, reset, setup

Instance Method Details

- (Object) connection



43
44
45
46
47
48
49
# File 'lib/spice.rb', line 43

def connection
  @connection ||= Connection.new(
    :server_url => server_url,
    :client_name => client_name,
    :key_file => key_file
  )
end

- (Object) mock



51
52
53
# File 'lib/spice.rb', line 51

def mock
  Spice::Mock.setup_mock_client
end