summaryrefslogtreecommitdiff
path: root/lib/chef/key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/key.rb')
-rw-r--r--lib/chef/key.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/key.rb b/lib/chef/key.rb
index 1d475d5c1b..7f4591c2c7 100644
--- a/lib/chef/key.rb
+++ b/lib/chef/key.rb
@@ -77,23 +77,23 @@ class Chef
def actor(arg = nil)
set_or_return(:actor, arg,
- regex: /^[a-z0-9\-_]+$/)
+ regex: /^[a-z0-9\-_]+$/)
end
def name(arg = nil)
set_or_return(:name, arg,
- kind_of: String)
+ kind_of: String)
end
def public_key(arg = nil)
raise Chef::Exceptions::InvalidKeyAttribute, "you cannot set the public_key if create_key is true" if !arg.nil? && @create_key
set_or_return(:public_key, arg,
- kind_of: String)
+ kind_of: String)
end
def private_key(arg = nil)
set_or_return(:private_key, arg,
- kind_of: String)
+ kind_of: String)
end
def delete_public_key
@@ -107,12 +107,12 @@ class Chef
def create_key(arg = nil)
raise Chef::Exceptions::InvalidKeyAttribute, "you cannot set create_key to true if the public_key field exists" if arg == true && !@public_key.nil?
set_or_return(:create_key, arg,
- kind_of: [TrueClass, FalseClass])
+ kind_of: [TrueClass, FalseClass])
end
def expiration_date(arg = nil)
set_or_return(:expiration_date, arg,
- regex: /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z|infinity)$/)
+ regex: /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z|infinity)$/)
end
def to_h