Module: Caviidae
- Defined in:
- lib/caviidae.rb,
lib/caviidae/config.rb,
lib/caviidae/version.rb,
lib/caviidae/rspec/helpers.rb
Defined Under Namespace
Modules: RSpec
Classes: Configuration
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
5
6
7
|
# File 'lib/caviidae/config.rb', line 5
def configuration
@configuration ||= Configuration.new
end
|
Pass in a block to configure
10
11
12
|
# File 'lib/caviidae/config.rb', line 10
def configure
yield configuration
end
|
.db ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/caviidae.rb', line 15
def db
unless @client
@client = Databasedotcom::Client.new :client_id => configuration.client_id, :client_secret => configuration.client_secret, :host => configuration.host
@client.authenticate :username => configuration.username, :password => "#{CGI::escape(configuration.password)}#{configuration.security_token}"
end
@client
end
|
.materialize ⇒ Object
9
10
11
12
13
|
# File 'lib/caviidae.rb', line 9
def materialize
Caviidae.configuration.materialize.each do |sobject|
db.materialize(sobject)
end
end
|