-
Notifications
You must be signed in to change notification settings - Fork 30
Added Dns class for managing DNS search and nameservers #127
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
Conversation
lib/linux_admin/dns.rb
Outdated
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.
The split feels like it belongs in #parse_file
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 would expect #reload
to clear the attr_accessors
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.
parse_file
clears them to start. Would it look better to clear them first here?
8f2b251
to
57703c2
Compare
spec/dns_spec.rb
Outdated
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.
We should try to avoid writing files in a spec, especially files that hold test data. In the spec, you should be able to:
allow(File).to receive(:read).and_return(original_content, new_content)
57703c2
to
0136080
Compare
spec/dns_spec.rb
Outdated
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.
You can expect(contents).to include(new_search_order)
@carbonin Sorry for all the comments, but I really like where this is going. 👍 |
0136080
to
e7c84f6
Compare
e7c84f6
to
7ff854d
Compare
Checked commit carbonin@7ff854d with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0 |
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.
These two tests could also be merged in a followup PR
👍 LGTM, Thanks! |
Added Dns class for managing DNS search and nameservers
@bdunne @Fryguy Please review
https://trello.com/c/rWKh4KQs