module Kellerkind::Config

Public: Various methods useful for configure Kellerkind.

Public Instance Methods

db_dump_cmd() click to toggle source

Public: Gets the name of the command line executable to use for dumping.

Returns name of executable as String.

# File lib/kellerkind/core/configuration.rb, line 20
def db_dump_cmd
  "mongodump"
end
db_prefix() click to toggle source

Public: Gets the prefix that is use in the cli for database options.

Returns a regular expression.

# File lib/kellerkind/core/configuration.rb, line 11
def db_prefix
  /mongo_/
end
finished_compressing() click to toggle source

Internal: Gets message for action when compressing is finished.

# File lib/kellerkind/core/configuration.rb, line 52
def finished_compressing
  %Q{Compressing done ...}
end
finished_dumping(database) click to toggle source

Internal: Gets message for action when all is done.

database - Name of the database from which a dump is created.

# File lib/kellerkind/core/configuration.rb, line 59
def finished_dumping(database)
  %Q{ -- Dumping of #{database} done ...}
end
lock_dir() click to toggle source

Public: Gets the path to the lock dir to mark process running. Note that just one kellerkind process is runnable.

# File lib/kellerkind/core/configuration.rb, line 27
def lock_dir
  File.join(Dir.home, "tmp")
end
lock_path() click to toggle source

Public: Gets the direct path to kellerkind lock file

# File lib/kellerkind/core/configuration.rb, line 32
def lock_path
  File.join(lock_dir,"Kellerkind.lock")
end
remove_dump() click to toggle source

Internal: Gets message for action when a dump is about to remove.

# File lib/kellerkind/core/configuration.rb, line 42
def remove_dump
  %Q{Remove raw dump. To disable that use --remove-dump false}
end
start_compressing() click to toggle source

Internal: Gets message for action when compressing was started.

# File lib/kellerkind/core/configuration.rb, line 47
def start_compressing
  %Q{Start compressing of dump ... }
end
start_dumping() click to toggle source

Internal: Gets message for action when dumping was started.

# File lib/kellerkind/core/configuration.rb, line 37
def start_dumping
  %Q{Start dumping ...}
end
verbose?() click to toggle source

Internal: Checks if Kellerkind should be verbose or not.

# File lib/kellerkind/core/configuration.rb, line 71
def verbose?
  @verbose_output
end
verbose_output=(flag) click to toggle source

Internal: Sets if Kellerkind should be talkative or not.

flag - Boolean, true if Kellerkind should generate output, false if not.

# File lib/kellerkind/core/configuration.rb, line 66
def verbose_output=(flag)
  @verbose_output = flag
end