Module: Taps

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

Defined Under Namespace

Modules: Schema, Utils Classes: BaseError, Chunksize, Cli, Config, CorruptedData, DataStream, DataStreamKeyed, DuplicatePrimaryKeyError, InvalidData, Multipart, NotImplemented, Operation, Pull, Push, Server

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.compatible_versionObject



14
15
16
# File 'lib/taps/version.rb', line 14

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

.exiting=(val) ⇒ Object



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

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



8
9
10
11
12
# File 'lib/taps/version.rb', line 8

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



4
5
6
# File 'lib/taps/version.rb', line 4

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

Instance Method Details

#exiting?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/taps/config.rb', line 11

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