From 0f0a1cc41dd7853878ec0a474330831f65b023cf Mon Sep 17 00:00:00 2001 From: Nitz Date: Sun, 15 Feb 2015 11:48:58 +0200 Subject: Added TODO for next major --- lib/mixlib/shellout.rb | 3 +++ spec/mixlib/shellout_spec.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/mixlib/shellout.rb b/lib/mixlib/shellout.rb index 3b7bf24..92660c8 100644 --- a/lib/mixlib/shellout.rb +++ b/lib/mixlib/shellout.rb @@ -40,6 +40,7 @@ module Mixlib attr_accessor :user attr_accessor :domain attr_accessor :password + # TODO remove attr_accessor :with_logon # Whether to simulate logon as the user. Normally set via options passed to new @@ -198,6 +199,7 @@ module Mixlib # The uid that the subprocess will switch to. If the user attribute was # given as a username, it is converted to a uid by Etc.getpwnam + # TODO migrate to shellout/unix.rb def uid return nil unless user user.kind_of?(Integer) ? user : Etc.getpwnam(user.to_s).uid @@ -205,6 +207,7 @@ module Mixlib # The gid that the subprocess will switch to. If the group attribute is # given as a group name, it is converted to a gid by Etc.getgrnam + # TODO migrate to shellout/unix.rb def gid return group.kind_of?(Integer) ? group : Etc.getgrnam(group.to_s).gid if group return Etc.getpwuid(uid).gid if using_login? diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index 2569d1e..3fda419 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -63,6 +63,7 @@ describe Mixlib::ShellOut do should eql(value) end + # TODO add :unix_only context 'with an integer value for user' do let(:value) { 0 } it "should use the user-supplied uid" do @@ -70,6 +71,7 @@ describe Mixlib::ShellOut do end end + # TODO add :unix_only context 'with string value for user' do let(:value) { username } @@ -127,6 +129,7 @@ describe Mixlib::ShellOut do should eql(value) end + # TODO add :unix_only context 'with integer value for group' do let(:value) { 0 } it "should use the user-supplied gid" do -- cgit v1.2.1