summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-04-28 10:19:48 -0700
committerTim Smith <tsmith@chef.io>2017-05-12 09:29:33 -0700
commit3f89a5b8fd153b1086e73cc257ef809858bb9051 (patch)
tree4e87c7170fbfab795cf93d5b613f49728ef824c2
parentd018ca2d667c91b4552bfc271193ceb3b0737167 (diff)
downloadchef-3f89a5b8fd153b1086e73cc257ef809858bb9051.tar.gz
Require pin/pin_priority and update copyrights
The resource fails without these values. Let's require them to give the user a proper error message Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/apt_preference.rb2
-rw-r--r--lib/chef/resource/apt_preference.rb6
-rw-r--r--spec/unit/provider/apt_preference_spec.rb2
-rw-r--r--spec/unit/resource/apt_preference_spec.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/provider/apt_preference.rb b/lib/chef/provider/apt_preference.rb
index 92eeeb9aa5..db0db4431a 100644
--- a/lib/chef/provider/apt_preference.rb
+++ b/lib/chef/provider/apt_preference.rb
@@ -1,6 +1,6 @@
#
# Author:: Tim Smith (<tsmith@chef.io>)
-# Copyright:: Copyright (c) 2016 Chef Software, Inc.
+# Copyright:: 2016-2017, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/lib/chef/resource/apt_preference.rb b/lib/chef/resource/apt_preference.rb
index 913f7382ce..cccddafdc5 100644
--- a/lib/chef/resource/apt_preference.rb
+++ b/lib/chef/resource/apt_preference.rb
@@ -1,6 +1,6 @@
#
# Author:: Tim Smith (<tsmith@chef.io>)
-# Copyright:: Copyright (c) 2016 Chef Software, Inc.
+# Copyright:: 2016-2017, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,8 +26,8 @@ class Chef
property :package_name, String, name_property: true, regex: [/^([a-z]|[A-Z]|[0-9]|_|-|\.|\*|\+)+$/]
property :glob, String
- property :pin, String
- property :pin_priority, String
+ property :pin, String, required: true
+ property :pin_priority, String, required: true
default_action :add
allowed_actions :add, :remove
diff --git a/spec/unit/provider/apt_preference_spec.rb b/spec/unit/provider/apt_preference_spec.rb
index dc5297ee0a..e841520014 100644
--- a/spec/unit/provider/apt_preference_spec.rb
+++ b/spec/unit/provider/apt_preference_spec.rb
@@ -1,7 +1,7 @@
#
# Author:: Thom May (<thom@chef.io>)
# Author:: Tim Smith (<tim@chef.io>)
-# Copyright:: Copyright (c) 2016 Chef Software, Inc.
+# Copyright:: 2016-2017, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/spec/unit/resource/apt_preference_spec.rb b/spec/unit/resource/apt_preference_spec.rb
index c0da12edc6..b71f2e3683 100644
--- a/spec/unit/resource/apt_preference_spec.rb
+++ b/spec/unit/resource/apt_preference_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Tim Smith (<tsmith@chef.io>)
-# Copyright:: Copyright (c) 2016 Chef Software, Inc.
+# Copyright:: 2016-2017, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");