Sha256: efdbac6ce4e97ccac305014211023b6a85b44d9dad4dca53da3363b86819e155
Contents?: true
Size: 937 Bytes
Versions: 2
Compression:
Stored size: 937 Bytes
Contents
module Settings class FilesContent attr_accessor :amqp_host, :file_server_host, :sync_exclude, :files, :originator_log_file, :callbacks, :callbacks_dir TEST_UNIT_GLOB = "test/**/*_test.rb" RSPEC_GLOB = "spec/**/*_spec.rb" def initialize @files = [] @files << FilesContent::TEST_UNIT_GLOB if Dir.exist?('test') @files << FilesContent::RSPEC_GLOB if Dir.exist?('spec') end DEFAULT_HOST = 'localhost' def self.get_amqp_host puts "What's the AMQP host name? (leave blank to use '#{DEFAULT_HOST}') " return get_input_or_default(DEFAULT_HOST) end def self.get_file_server_host puts "What's the File Server host name? (leave blank to use '#{DEFAULT_HOST}') " return get_input_or_default(DEFAULT_HOST) end private def self.get_input_or_default(default) input = $stdin.gets.chomp (input == '') ? default : input end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gorgon-0.8.0 | lib/gorgon/settings/files_content.rb |
gorgon-0.7.1 | lib/gorgon/settings/files_content.rb |