Module: Cloudify
- Defined in:
- lib/cloudify.rb,
lib/cloudify/config.rb,
lib/cloudify/railtie.rb,
lib/cloudify/storage.rb,
lib/cloudify/version.rb,
lib/cloudify/cloudify.rb,
lib/cloudify/invalidator.rb,
lib/generators/cloudify/install/install_generator.rb
Defined Under Namespace
Classes: Config, InstallGenerator, Invalidator, Railtie, Storage
Constant Summary
collapse
- VERSION =
"0.0.12"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
5
6
7
|
# File 'lib/cloudify/cloudify.rb', line 5
def config
@config ||= Config.new
end
|
9
10
11
|
# File 'lib/cloudify/cloudify.rb', line 9
def configure(&proc)
yield @config ||= Config.new
end
|
.invalidator ⇒ Object
17
18
19
|
# File 'lib/cloudify/cloudify.rb', line 17
def invalidator
@invalidator ||= Invalidator.new
end
|
.storage ⇒ Object
13
14
15
|
# File 'lib/cloudify/cloudify.rb', line 13
def storage
@storage ||= Storage.new(config.credentials, config.options)
end
|
.sync ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/cloudify/cloudify.rb', line 21
def sync
if config && config.valid?
invalidator
storage.sync
invalidator.invalidate_paths
elsif config && !config.valid?
STDERR.puts "Cloudify: #{config.errors.full_messages.join(', ')}"
else
"Cloudify: Something went wrong."
end
end
|