-
Notifications
You must be signed in to change notification settings - Fork 30
further parameterize disk#create_partition, accept params for % of free ... #52
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/disk.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.
This is called via parted_options_array for print, mklabel and mkpart but I believe -a opt is only valid for mkpart. I think the others will fail. This should be only done for mkpart l believe.
1 similar comment
@jrafanie updated |
lib/linux_admin/disk.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.
spacing is funny here and on the next few lines...looks like it needs an extra space.
@Fryguy updated |
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 just checked and Range#overlaps? and Range#include? are already provided by active_support and should be preferred over rolling our own.
spec/disk_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.
Looks like you can get rid of the partition =
@brandondunne @Fryguy updated Lines split up to keep them < 80 chars long. Relaxed that rule in the spec suite, but in the main lib would rather keep to that max-width as it's pretty standard |
spec/disk_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.
Looks like the context should be around creating multiple partitions context "multiple partitions" do
, then have it "with valid params" do
and it "with overlapping params" do
, what do you think?
@brandondunne updated. |
further parameterize disk#create_partition, accept params for % of free ...
...space