Module: ClusterFsck
- Defined in:
- lib/clusterfsck.rb,
lib/clusterfsck/setup.rb,
lib/clusterfsck/reader.rb,
lib/clusterfsck/writer.rb,
lib/clusterfsck/version.rb,
lib/clusterfsck/s3_methods.rb,
lib/clusterfsck/commands/edit.rb,
lib/clusterfsck/commands/list.rb,
lib/clusterfsck/configuration.rb,
lib/clusterfsck/commands/setup.rb,
lib/clusterfsck/commands/create.rb,
lib/clusterfsck/commands/override.rb,
lib/clusterfsck/credential_grabber.rb,
lib/clusterfsck/commands/environments.rb,
lib/clusterfsck/commands/cluster_fsck_env_argument_parser.rb
Defined Under Namespace
Modules: Commands, S3Methods, Setup
Classes: Configuration, CredentialGrabber, Reader, Writer
Constant Summary
collapse
- CLUSTER_FSCK_PATHS =
['./.clusterfsck','/usr/clusterfsck','~/.clusterfsck']
- CONFIG_PATH =
CLUSTER_FSCK_PATHS.detect do |path_string|
File.exists?(File.expand_path(path_string))
end
- CLUSTER_FSCK_CONFIG =
YAML.load(File.expand_path(CONFIG_PATH))
- VERSION =
"0.1.5.2"
Class Method Summary
collapse
Class Method Details
.cluster_fsck_env ⇒ Object
26
27
28
29
|
# File 'lib/clusterfsck.rb', line 26
def self.cluster_fsck_env
raise "Configuration failure, check ~/.clusterfsck or other config values" unless config_bucket
@env ||= ENV['CLUSTER_FSCK_ENV'] || self.config_hash['cluster_fsck_env'] || default_env
end
|
.config_bucket ⇒ Object
31
32
33
|
# File 'lib/clusterfsck.rb', line 31
def self.config_bucket
@config_bucket ||= ENV['CLUSTER_FSCK_BUCKET'] || self.config_hash['cluster_fsck_bucket'] || Setup.config
end
|
.config_hash ⇒ Object
39
40
41
|
# File 'lib/clusterfsck.rb', line 39
def self.config_hash
CLUSTER_FSCK_CONFIG || {}
end
|
.default_env ⇒ Object
35
36
37
|
# File 'lib/clusterfsck.rb', line 35
def self.default_env
ENV['CLUSTER_FSCK_ENV'] || 'development'
end
|
.logger ⇒ Object
22
23
24
|
# File 'lib/clusterfsck.rb', line 22
def self.logger
@logger ||= Logger.new($stdout)
end
|
.logger=(logger) ⇒ Object
18
19
20
|
# File 'lib/clusterfsck.rb', line 18
def self.logger=(logger)
@logger = logger
end
|