diff options
author | Thom May <thom@chef.io> | 2018-01-26 17:32:50 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-01-26 17:32:50 +0000 |
commit | 70c547c96f7b84f16e70f4cd7a646e5a26649696 (patch) | |
tree | d951b6ac4151b937ff6925e28b7e43c050bf0943 /lib/chef/resource | |
parent | 1b58e044a3c2b3fb11f4064a092fb268203be269 (diff) | |
download | chef-tm/true_nillable.tar.gz |
Nillable properties are the default nowtm/true_nillable
Fixes: #6054
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/apt_repository.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/resource/apt_repository.rb b/lib/chef/resource/apt_repository.rb index 5da0b4e37b..5b81112cbe 100644 --- a/lib/chef/resource/apt_repository.rb +++ b/lib/chef/resource/apt_repository.rb @@ -30,17 +30,17 @@ class Chef property :repo_name, String, name_property: true property :uri, String - property :distribution, [ String, nil, false ], default: lazy { node["lsb"]["codename"] }, nillable: true, coerce: proc { |x| x ? x : nil } + property :distribution, [ String, nil, false ], default: lazy { node["lsb"]["codename"] }, coerce: proc { |x| x ? x : nil } property :components, Array, default: [] - property :arch, [String, nil, false], default: nil, nillable: true, coerce: proc { |x| x ? x : nil } + property :arch, [String, nil, false], default: nil, coerce: proc { |x| x ? x : nil } property :trusted, [TrueClass, FalseClass], default: false # whether or not to add the repository as a source repo, too property :deb_src, [TrueClass, FalseClass], default: false - property :keyserver, [String, nil, false], default: "keyserver.ubuntu.com", nillable: true, coerce: proc { |x| x ? x : nil } + property :keyserver, [String, nil, false], default: "keyserver.ubuntu.com", coerce: proc { |x| x ? x : nil } property :key, [String, Array, nil, false], default: [], coerce: proc { |x| x ? Array(x) : nil } - property :key_proxy, [String, nil, false], default: nil, nillable: true, coerce: proc { |x| x ? x : nil } + property :key_proxy, [String, nil, false], default: nil, coerce: proc { |x| x ? x : nil } - property :cookbook, [String, nil, false], default: nil, desired_state: false, nillable: true, coerce: proc { |x| x ? x : nil } + property :cookbook, [String, nil, false], default: nil, desired_state: false, coerce: proc { |x| x ? x : nil } property :cache_rebuild, [TrueClass, FalseClass], default: true, desired_state: false default_action :add |