Skip to content
This repository
Browse code

Fix mongo_pull and mongo_push tasks to use MONGO_URL

  • Loading branch information...
commit 2257a50df16bf50dc7fc2971133b2d01ddaeb659 1 parent cd9471b
Hendrik Mans authored

Showing 1 changed file with 4 additions and 10 deletions. Show diff stats Hide diff stats

  1. +4 10 lib/schnitzelpress/cli.rb
14 lib/schnitzelpress/cli.rb
@@ -40,20 +40,14 @@ def console
40 40
41 41 desc "mongo_pull", "Pulls contents of remote MongoDB into your local MongoDB"
42 42 def mongo_pull
43   - if uri = YAML.load_file('./config/mongo.yml')['development']['uri']
44   - system "MONGO_URL=\"#{uri}\" heroku mongo:pull"
45   - else
46   - abort "URI is missing :("
47   - end
  43 + abort "Please set MONGO_URL." unless ENV['MONGO_URL']
  44 + system "heroku mongo:pull"
48 45 end
49 46
50 47 desc "mongo_push", "Pushes contents of your local MongoDB to remote MongoDB"
51 48 def mongo_push
52   - if uri = YAML.load_file('./config/mongo.yml')['development']['uri']
53   - system "MONGO_URL=\"#{uri}\" heroku mongo:push"
54   - else
55   - abort "URI is missing :("
56   - end
  49 + abort "Please set MONGO_URL." unless ENV['MONGO_URL']
  50 + system "heroku mongo:push"
57 51 end
58 52 end
59 53 end

0 comments on commit 2257a50

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