vault-tools 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,32 @@ require 'scrolls'
5
5
  require 'rack/ssl-enforcer'
6
6
 
7
7
  module Vault
8
+ #require bundler and the proper gems for the ENV
8
9
  def self.require
9
10
  Kernel.require 'bundler'
10
- STDERR.puts "Loading #{ENV['RACK_ENV']} environment..."
11
+ $stderr.puts "Loading #{ENV['RACK_ENV']} environment..."
11
12
  Bundler.require :default, ENV['RACK_ENV'].to_sym
12
13
  end
14
+
15
+ # adds ./lib dir to the load path
16
+ def self.load_path
17
+ $stderr.puts "Adding './lib' to path..."
18
+ $LOAD_PATH.unshift(File.expand_path('./lib'))
19
+ end
20
+
21
+ # sets TZ to UTC and Sequel timezone to :utc
22
+ def self.set_timezones
23
+ $stderr.puts "Setting timezones to UTC..."
24
+ Sequel.default_timezone = :utc if defined? Sequel
25
+ ENV['TZ'] = 'UTC'
26
+ end
27
+
28
+ # all in one go
29
+ def self.setup
30
+ self.require
31
+ self.load_path
32
+ self.set_timezones
33
+ end
13
34
  end
14
35
 
15
36
  require 'vault-tools/app'
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-26 00:00:00.000000000 Z
13
+ date: 2013-02-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: scrolls
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: 2068328484984900832
131
+ hash: 2678711332955431565
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  segments:
139
139
  - 0
140
- hash: 2068328484984900832
140
+ hash: 2678711332955431565
141
141
  requirements: []
142
142
  rubyforge_project:
143
143
  rubygems_version: 1.8.23