Sha256: 33bfe6ca2b97e9cfc09b2aa670a34cdfa7da6b43ba35612289948dec00a74f5d
Contents?: true
Size: 1000 Bytes
Versions: 9
Compression:
Stored size: 1000 Bytes
Contents
module Settings class FilesContent attr_accessor :amqp_host, :file_server_host, :sync_exclude, :files, :originator_log_file, :callbacks, :runtime_file, :failed_files 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') @runtime_file = 'gorgon-runtime-file.json' 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
9 entries across 9 versions & 1 rubygems