-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
shortdudey123
commented
Nov 17, 2015
- Update Ruby syntax with rubocop
- Add host create, update, and delete
API only allows 100 max per page per documentation See https://docs.cloud.mongodb.com/core/api/#lists
MMS API info: https://docs.cloud.mongodb.com/reference/api/hosts/ Adds `host_create`, `host_update`, and `host_delete` to the agent
@shortdudey123 thanks for your contribution. I will have a look asap! |
@kris-lab no problem! Let me know if you have any questions. (I also tried to do some clean up as well as add hosts functionality) |
@shortdudey123 sorry it takes so long but I am bit overloaded currently. Three main things:
again, many thanks for your effort! |
You should really upgrade :p
Which part?
Definitely agree on the rev since its breaking changes. I normally leave the version changes up to the author, however, i can bump it to |
we are working on upgrade but it will take a while so it is important at the moment to keep
yes, only this
well, agree but in this case you can bump it and if PR is good we can merge and release! |
@kris-lab updated per your feedback, let me know if there is anything else i should address |
Thanks! I will have a look and get back to you asap... |
let me know if there is anything else you need from my end :) |
@@ -79,8 +143,8 @@ def restorejobs | |||
def restorejob_create(type_value, group_id, cluster_id) | |||
if type_value.length == 24 | |||
find_group(group_id).cluster(cluster_id).snapshot(type_value).create_restorejob | |||
elsif datetime = (type_value == 'now' ? DateTime.now : DateTime.parse(type_value)) | |||
raise('Invalid datetime. Correct `YYYY-MM-RRTH:m:sZ`') if datetime.nil? | |||
elsif datetime == (type_value == 'now' ? DateTime.now : DateTime.parse(type_value)) |
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.
@shortdudey123 I think this is a bug. I see that rubocop
suggest to use ==
but the bug is there from the beginning:)! We should use else
instead of elsif
otherwise datetime
will be lost...
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.
Yay for fixing bugs :p
Something like this?
else
datetime = (type_value == 'now' ? DateTime.now : DateTime.parse(type_value))
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.
yes, exactly like that.
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.
Fixed
0861f62
to
0cb1ece
Compare
lvgtm. I am going to merge it now. I will do more tests before final release. Many thanks! |