-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli.rb:175: syntax error, unexpected ')', expecting '=' (SyntaxError) #10
Comments
This is related to #10. Although I was unable to reproduce this error on my system, I assume that providing a required argument after a non-required argument was breaking Thor in some way. Either way, this is a saner way to do it.
Thanks for the report and pull request! I looked into this, and although I was unable to reproduce it, I think I was doing something rather strange by asking for a required argument after a non-required argument. I made changes in 723a73f to address this issue - unfortunately the pull request (#11) would break the Do you mind pulling the latest from GitHub and trying to run
Appreciate your help. |
I can confim this is fixed for me when running through your instructions to bundle exec tugboat authorize I assume I can use that until the next gem updatable release? |
Yup! You can install and use it with:
Good to hear this fixed it. Thanks for reporting! |
DOH! phils-imac-2012:tugboat phil$ sudo bundle exec rake install |
Ha. Can you tell me what version of ruby you're using?
|
phils-imac-2012:~ phil$ ruby --version Hang on I'm checking my credentials - I have a feeling a DigitalOcean iPhone app created a new API key for access because DigitalOcean pathetic doesnt allow you to view your old key, only to create a new one... testing now... |
Yes that was the problem. I have edited my API key in ~/.tugboat and now everything is fine again. Sorry about that. Maybe you could add better handling for access denied issues :-) :-) |
Ah, good! No problem. I agree. Right now, the API issues a 302 redirect and the client lib throws an error trying to parse the response, so outside of wrapping every request in rescue blocks (try, except) I don't have much to work with. You're right though, it should be better. |
No worries! Keep up the great work - this will make my life easier :-) Especially as my cloud app (myJoomla.com) already has a command line interface for most tasks, I'll just be integrating tugboat to allow me to scale quickly without writing more code to integrate the DO api :) Thanks again. |
Here is my complete (short) journey with tugboat that came to a very quick and immediate end :-(
sudo gem install tugboat
Password:
Building native extensions. This could take a while...
Successfully installed thor-0.18.1
Successfully installed multipart-post-1.2.0
Successfully installed faraday-0.8.7
Successfully installed faraday_middleware-0.9.0
Successfully installed json-1.7.7
Successfully installed hashie-2.0.3
Successfully installed rash-0.4.0
Successfully installed digital_ocean-1.0.1
Successfully installed middleware-0.1.0
Successfully installed tugboat-0.0.3
10 gems installed
Installing ri documentation for thor-0.18.1...
Installing ri documentation for multipart-post-1.2.0...
Installing ri documentation for faraday-0.8.7...
Installing ri documentation for faraday_middleware-0.9.0...
Installing ri documentation for json-1.7.7...
Installing ri documentation for hashie-2.0.3...
Installing ri documentation for rash-0.4.0...
Installing ri documentation for digital_ocean-1.0.1...
Installing ri documentation for middleware-0.1.0...
Installing ri documentation for tugboat-0.0.3...
Installing RDoc documentation for thor-0.18.1...
Installing RDoc documentation for multipart-post-1.2.0...
Installing RDoc documentation for faraday-0.8.7...
Installing RDoc documentation for faraday_middleware-0.9.0...
Installing RDoc documentation for json-1.7.7...
Installing RDoc documentation for hashie-2.0.3...
Installing RDoc documentation for rash-0.4.0...
Installing RDoc documentation for digital_ocean-1.0.1...
Installing RDoc documentation for middleware-0.1.0...
Installing RDoc documentation for tugboat-0.0.3...
phils-imac-2012:~ phil$ tugboat authorize
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': /Library/Ruby/Gems/1.8/gems/tugboat-0.0.3/lib/tugboat/cli.rb:175: syntax error, unexpected ')', expecting '=' (SyntaxError) /Library/Ruby/Gems/1.8/gems/tugboat-0.0.3/lib/tugboat/cli.rb:184: syntax error, unexpected kEND, expecting $end from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'from /Library/Ruby/Gems/1.8/gems/tugboat-0.0.3/lib/tugboat.rb:1
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'from /Library/Ruby/Gems/1.8/gems/tugboat-0.0.3/bin/tugboat:2
from /usr/bin/tugboat:19:in `load'
from /usr/bin/tugboat:19
The text was updated successfully, but these errors were encountered: