Module: DataPipe
- Defined in:
- lib/Host.rb,
lib/Jobs.rb,
lib/DataPipe.rb,
lib/helper_functions.rb
Defined Under Namespace
Classes: DataPipelineError, EnvironmentVariableNotFoundError, Host, Job, Jobs
Class Method Summary
collapse
Class Method Details
.getEnvVar(name) ⇒ Object
17
18
19
20
21
|
# File 'lib/helper_functions.rb', line 17
def DataPipe.getEnvVar( name )
raise EnvironmentVariableNotFoundError.new( name ) if ENV[name].nil?
return ENV[name]
end
|
.getFluidDb(env_name) ⇒ Object
24
25
26
27
28
29
30
31
|
# File 'lib/helper_functions.rb', line 24
def DataPipe.getFluidDb( env_name )
e = "_#{env_name}"
uri_string = getEnvVar(env_name)
log "uri: #{uri_string}", true
return FluidDb::Db( uri_string )
end
|
.log(string, verbose = false) ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/helper_functions.rb', line 3
def DataPipe.log( string, verbose=false )
type = verbose ? "VERB" : "INFO"
if !ENV["VERBOSE"].nil? || !verbose then
timestamp = Time.new.strftime( "%Y-%m-%d %H:%M:%S" )
puts "[#{type}] #{timestamp} :: #{string}"
end
end
|
.log_dsl(name, string, verbose = false) ⇒ Object
12
13
14
|
# File 'lib/helper_functions.rb', line 12
def DataPipe.log_dsl( name, string, verbose=false )
log "name: #{name}, #{string}", verbose
end
|