marcofognog / heroku-mongo-sync

Heroku plugin to add mongo:pull and push commands
MIT License
20 stars 8 forks source link

Fix nil error when step is greater than 1 #5

Open kemper opened 10 years ago

kemper commented 10 years ago

Snippet of the error this fixes:

! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       nil can't be coerced into Fixnum (TypeError)
Backtrace:   /Users/kris/.heroku/plugins/heroku-mongo-sync/lib/heroku/command/mongo.rb:112:in `%'
             /Users/kris/.heroku/plugins/heroku-mongo-sync/lib/heroku/command/mongo.rb:112:in `display_progress'
             /Users/kris/.heroku/plugins/heroku-mongo-sync/lib/heroku/command/mongo.rb:41:in `block (2 levels) in transfer'
             /Users/kris/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mongo-1.10.2/lib/mongo/cursor.rb:335:in `each'
             /Users/kris/.heroku/plugins/heroku-mongo-sync/lib/heroku/command/mongo.rb:39:in `each_with_index'
             /Users/kris/.heroku/plugins/heroku-mongo-sync/lib/heroku/command/mongo.rb:39:in `block in transf
marcofognog commented 10 years ago

Hi, thanks, could you please provide a failing spec that exposes the problem you fixed?