-
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
Default droplet options #61
Conversation
Not sure why, will look at it later
Hey @petems! Sorry for the delay on this. I got your specs over the hump in 823745e, but they are still failing. This is because the output text hasn't been changed. I think in this case, we should omit the messages about defaults. I think that's expected and we don't need to reminds people. Other than that, we also need to add the defaults into the configuration file, likely just what we had in the Make sense? Nice work! |
Also – totally nitpicky but try to be descriptive in all of your commit messages – helps a lot when reviewing! |
Cool beans 👍 Yeah, sorry about that, I've got a bad habit of just saying "spiking" in commit messages when I'm stuck in a rut, I'll see if I can do a rebase of this later with better commit messages. Thanks for the help 😸 |
No longer takes defaults from cli, uses ~/.tugboat file.
Now adds image, size and region
Checks defaults are created when no input given, and checks content of the created file
Allowing failures in 1.8.7 on travis now. It's EOL anyways 😉
Ok, ended up making a lot of changes, and added some tests around the creation of the |
@@ -3,3 +3,6 @@ rvm: | |||
- 1.8.7 | |||
- 1.9.3 | |||
- 2.0.0 | |||
matrix: | |||
allow_failures: | |||
- rvm: 1.8.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way to get around this? If not, I'm ok with removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's to do with the way rspec handles should_include
, it's not an actual test failure. But since 1.8.7 is EOL I went the easy route heh.
I think if I switch the order up on the text I might be able to fix this, so I'll give it a shot 👍
A couple more thoughts inline. Also, right now, this will crash if the user doesn't have their defaults configured (if they just update the gem and don't re-run
|
Oh! And last but not least, can we do default |
Stops nil class errors if you don't have defaults in ~/.tugboat file Having difficulty with tests, but almost got it...
Not sure how to stub the config class to use backwards compatible ~/.tugboat file..
Tests now all green, will also grandfather config files from 0.0.8 >
Whew, that was a long hack... Ok, now uses @pearkes any thoughts? Still need to look into the 1.8.7 fix, I don't think it should be too hard to fix but didn't have time |
…/tugboat into pm_default_region_option
def ssh_port | ||
@data['ssh']['ssh_port'] | ||
end | ||
|
||
def default_region |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there's a better way of doing this, rather than a ternary operator for each one, any suggestions welcome 👍
Lets us know for sure that defaults are being set by code...
@@ -4,7 +4,7 @@ | |||
include_context "spec" | |||
|
|||
before do | |||
Kernel.stub!(:exec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL http://blog.firsthand.ca/2010/09/rspec-stub-vs-stub.html, so I changed this 👍
Yay! I added a little note about this in eca3fb5, otherwise looks awesome to me. Merging! |
Fixes #56
Currently the tests around creating a default droplet are failing, possibly because the changes to what's seen as a default value for a new droplet.
@pearkes @blom mind having a look?