Module: Vault
- Defined in:
- lib/vault-tools.rb,
lib/vault-tools/app.rb,
lib/vault-tools/hid.rb,
lib/vault-tools/log.rb,
lib/vault-tools/web.rb,
lib/vault-tools/user.rb,
lib/vault-tools/config.rb,
lib/vault-tools/product.rb,
lib/vault-tools/version.rb,
lib/vault-tools/pipeline.rb,
lib/vault-tools/sinatra_helpers/html_serializer.rb
Defined Under Namespace
Modules: App, Config, HID, Log, Product, SinatraHelpers, Tools, User Classes: Pipeline, Web
Class Method Summary collapse
-
.load_path ⇒ Object
adds ./lib dir to the load path.
-
.require ⇒ Object
require bundler and the proper gems for the ENV.
-
.set_timezones ⇒ Object
sets TZ to UTC and Sequel timezone to :utc.
-
.setup ⇒ Object
all in one go.
Class Method Details
.load_path ⇒ Object
adds ./lib dir to the load path
17 18 19 20 |
# File 'lib/vault-tools.rb', line 17 def self.load_path $stderr.puts "Adding './lib' to path..." $LOAD_PATH.unshift(File.('./lib')) end |
.require ⇒ Object
require bundler and the proper gems for the ENV
10 11 12 13 14 |
# File 'lib/vault-tools.rb', line 10 def self.require Kernel.require 'bundler' $stderr.puts "Loading #{ENV['RACK_ENV']} environment..." Bundler.require :default, ENV['RACK_ENV'].to_sym end |
.set_timezones ⇒ Object
sets TZ to UTC and Sequel timezone to :utc
23 24 25 26 27 |
# File 'lib/vault-tools.rb', line 23 def self.set_timezones $stderr.puts "Setting timezones to UTC..." Sequel.default_timezone = :utc if defined? Sequel ENV['TZ'] = 'UTC' end |
.setup ⇒ Object
all in one go
30 31 32 33 34 |
# File 'lib/vault-tools.rb', line 30 def self.setup self.require self.load_path self.set_timezones end |