dblock / strava-ruby-cli

Strava command-line client.
MIT License
5 stars 1 forks source link

Raise error if browser can't open #5

Closed mattdsteele closed 4 years ago

mattdsteele commented 4 years ago

Fixes #3

dblock commented 4 years ago

So I wonder if we need to server.start before we call Launchy? Then I think we do need a spec for this. Add a new set of tests for Cli::Auth and stub the argument to Launchy to some invalid string, it should raise an error, and terminate the web server.

mattdsteele commented 4 years ago

I tried running server.start before calling Launchy, but since WEBrick blocks the main thread, it couldn't continue executing the program; so I moved it back to where it originally was. Maybe there's a way around this? I'm not super familiar with Ruby's patterns...

dblock commented 4 years ago

I tried running server.start before calling Launchy, but since WEBrick blocks the main thread, it couldn't continue executing the program; so I moved it back to where it originally was. Maybe there's a way around this? I'm not super familiar with Ruby's patterns...

That makes sense. Probably that's why I didn't do it myself either. We could spawn a thread, etc., nbd.

dblock commented 4 years ago

Want to help out with the (co)maintenance of this gem? Maybe make the next release? Send me your rubygems e-mail/username if you're down to dblock at dblock dot org.

mattdsteele commented 4 years ago

Happy to help! I'm kind of cargo-culting my way through Ruby (I've never published a Gem) but I'll send my account info.

If you could update CONTRIBUTING.md with the release process (or point me to any other docs), I can work on cutting the next version with these changes, and ping you if I've got any questions.

dblock commented 4 years ago

https://github.com/dblock/strava-ruby-cli/blob/master/RELEASING.md