lib/osc/machete/user.rb in osc-machete-2.0.0.pre2 vs lib/osc/machete/user.rb in osc-machete-2.0.0
- old
+ new
@@ -1,8 +1,9 @@
# Class that maintains the name and home identifiers of a User.
# Helper methods provided use the Etc module underneath.
#
+# @deprecated Please use {http://www.rubydoc.info/gems/ood_support/OodSupport/User OodSupport::User} instead.
class OSC::Machete::User
attr_reader :name
# default user is the username of the current process
@@ -17,9 +18,11 @@
# Or should the default be OSC::Machete::User.from_uid(Process.uid)
# Is there ever a difference between the two?
#
def initialize(username = Etc.getpwuid.name)
@name = username
+
+ warn "[DEPRECATION] `OSC::Machete::User` is deprecated. Please use `OodSupport::User` instead (see ood_support gem)."
end
# factory method to produce a User from specified uid
#
# @return [User] user for the specified uid