Skip to content

Commit

Permalink
allow owner to be specified as user
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Dec 22, 2011
1 parent f0c4c11 commit 3888540
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chef/lib/chef/mixin/securable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def owner(arg=nil)
)
end

alias :user :owner

def group(arg=nil)
set_or_return(
:group,
Expand Down
4 changes: 4 additions & 0 deletions chef/spec/unit/mixin/securable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,9 @@
lambda { @securable.owner 123 }.should_not raise_error(ArgumentError)
lambda { @securable.owner "root*goo" }.should raise_error(ArgumentError)
end

it "allows the owner to be specified as #user" do
@securable.should respond_to(:user)
end
end
end

0 comments on commit 3888540

Please sign in to comment.