Skip to content

Commit

Permalink
Got the database stuff working with environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
futurechimp committed Jun 11, 2011
1 parent c4ce045 commit 96b5a8a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions daemons/image_sucker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@
require 'bundler/setup'
Bundler.require(:default, PADRINO_ENV)

# require 'eventmachine'
# require 'mongoid'
# require 'carrierwave'
require 'carrierwave/orm/mongoid'
# require 'fastimage'
# require 'state_machine'

# Connection.new takes host, port
host = 'localhost'
port = Mongo::Connection::DEFAULT_PORT

# database_name = case Padrino.env
# when :development then 'mongoaggro_development'
# when :production then 'mongoaggro_production'
# when :test then 'mongoaggro_test'
# end
database_name = case PADRINO_ENV.to_sym
when :development then 'mongoaggro_development'
when :production then 'mongoaggro_production'
when :test then 'mongoaggro_test'
end

database_name = 'mongoaggro_development'

Expand Down

0 comments on commit 96b5a8a

Please sign in to comment.