diff options
author | Nitz <nitz.raz@gmail.com> | 2015-02-15 11:48:58 +0200 |
---|---|---|
committer | Nitz <nitz.raz@gmail.com> | 2015-02-15 12:03:04 +0200 |
commit | 0f0a1cc41dd7853878ec0a474330831f65b023cf (patch) | |
tree | ff9ffcf6b8d3dcca42f73eed5e79c7b4d25e3fe1 | |
parent | acfc87c4a38ff7c6fa8a33e53308010a74a0d5ce (diff) | |
download | mixlib-shellout-0f0a1cc41dd7853878ec0a474330831f65b023cf.tar.gz |
Added TODO for next major
-rw-r--r-- | lib/mixlib/shellout.rb | 3 | ||||
-rw-r--r-- | spec/mixlib/shellout_spec.rb | 3 |
2 files changed, 6 insertions, 0 deletions
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 |