Skip to content

Commit

Permalink
Switch to dotenv for local env management
Browse files Browse the repository at this point in the history
  • Loading branch information
redhotvengeance committed Apr 14, 2013
1 parent 8005c82 commit 3b33837
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ test/tmp
test/version_tmp
tmp
bin/
.env
.projects
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
require "bundler/gem_tasks"
require 'dotenv/tasks'
require "./lib/deep_thought"

task :environment => :dotenv do
DeepThought.setup(ENV)
end

1 change: 1 addition & 0 deletions deep_thought.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |gem|
# development
gem.add_development_dependency "shotgun", "~>0.9"
gem.add_development_dependency "thin", "~>1.5"
gem.add_development_dependency "dotenv", "~>0.6"

# testing
gem.add_development_dependency "minitest", "~>4.7"
Expand Down
5 changes: 3 additions & 2 deletions script/server
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

: ${RACK_ENV:="development"}
export RACK_ENV
while read line; do
export $line
done < .env

bin/shotgun -p4242 -sthin -Ilib config.ru

0 comments on commit 3b33837

Please sign in to comment.