Module: Taps

Defined in:
lib/taps/cli.rb,
lib/taps/log.rb,
lib/taps/utils.rb,
lib/taps/config.rb,
lib/taps/schema.rb,
lib/taps/server.rb,
lib/taps/multipart.rb,
lib/taps/operation.rb,
lib/taps/data_stream.rb

Defined Under Namespace

Modules: Schema, Utils Classes: Cli, Config, DataStream, DataStreamKeyed, Multipart, Operation, Pull, Push, Server

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.compatible_versionObject



18
19
20
# File 'lib/taps/config.rb', line 18

def self.compatible_version
	"#{version_yml[:major]}.#{version_yml[:minor]}"
end

.exiting=(val) ⇒ Object



22
23
24
# File 'lib/taps/config.rb', line 22

def self.exiting=(val)
	@@exiting = val
end

.logObject



6
7
8
9
10
11
12
13
14
# File 'lib/taps/log.rb', line 6

def self.log
	@@log ||= begin
		require 'logger'
		log = Logger.new($stderr)
		log.level = Logger::ERROR
		log.datetime_format = "%Y-%m-%d %H:%M:%S"
		log
	end
end

.log=(log) ⇒ Object



2
3
4
# File 'lib/taps/log.rb', line 2

def self.log=(log)
	@@log = log
end

.versionObject



12
13
14
15
16
# File 'lib/taps/config.rb', line 12

def self.version
	version = "#{version_yml[:major]}.#{version_yml[:minor]}.#{version_yml[:patch]}"
	version += ".#{version_yml[:build]}" if version_yml[:build]
	version
end

.version_ymlObject



8
9
10
# File 'lib/taps/config.rb', line 8

def self.version_yml
	@@version_yml ||= YAML.load(File.read(File.dirname(__FILE__) + '/../../VERSION.yml'))
end

Instance Method Details

#exiting?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/taps/config.rb', line 26

def exiting?
	(@@exiting ||= false) == true
end