Skip to content
Browse files

Fix mongo_pull and mongo_push tasks to use MONGO_URL

  • Loading branch information...
1 parent cd9471b commit 2257a50df16bf50dc7fc2971133b2d01ddaeb659 @hmans committed Apr 12, 2012
Showing with 4 additions and 10 deletions.
  1. +4 −10 lib/schnitzelpress/cli.rb
View
14 lib/schnitzelpress/cli.rb
@@ -40,20 +40,14 @@ def console
desc "mongo_pull", "Pulls contents of remote MongoDB into your local MongoDB"
def mongo_pull
- if uri = YAML.load_file('./config/mongo.yml')['development']['uri']
- system "MONGO_URL=\"#{uri}\" heroku mongo:pull"
- else
- abort "URI is missing :("
- end
+ abort "Please set MONGO_URL." unless ENV['MONGO_URL']
+ system "heroku mongo:pull"
end
desc "mongo_push", "Pushes contents of your local MongoDB to remote MongoDB"
def mongo_push
- if uri = YAML.load_file('./config/mongo.yml')['development']['uri']
- system "MONGO_URL=\"#{uri}\" heroku mongo:push"
- else
- abort "URI is missing :("
- end
+ abort "Please set MONGO_URL." unless ENV['MONGO_URL']
+ system "heroku mongo:push"
end
end
end

0 comments on commit 2257a50

Please sign in to comment.
Something went wrong with that request. Please try again.