Commit cfd74500 authored by Tim Smith's avatar Tim Smith

use true/false vs. TrueClass and FalseClass

Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent 828d1615
...@@ -21,11 +21,11 @@ default['yum']['main']['releasever'] = case node['platform'] ...@@ -21,11 +21,11 @@ default['yum']['main']['releasever'] = case node['platform']
when 'amazon' when 'amazon'
'latest' 'latest'
end end
default['yum']['main']['alwaysprompt'] = nil # [TrueClass, FalseClass] default['yum']['main']['alwaysprompt'] = nil # [true, false]
default['yum']['main']['assumeyes'] = nil # [TrueClass, FalseClass] default['yum']['main']['assumeyes'] = nil # [true, false]
default['yum']['main']['bandwidth'] = nil # /^\d+$/ default['yum']['main']['bandwidth'] = nil # /^\d+$/
default['yum']['main']['bugtracker_url'] = nil # /.*/ default['yum']['main']['bugtracker_url'] = nil # /.*/
default['yum']['main']['clean_requirements_on_remove'] = nil # [TrueClass, FalseClass] default['yum']['main']['clean_requirements_on_remove'] = nil # [true, false]
default['yum']['main']['color'] = nil # %w{ always never } default['yum']['main']['color'] = nil # %w{ always never }
default['yum']['main']['color_list_available_downgrade'] = nil # /.*/ default['yum']['main']['color_list_available_downgrade'] = nil # /.*/
default['yum']['main']['color_list_available_install'] = nil # /.*/ default['yum']['main']['color_list_available_install'] = nil # /.*/
...@@ -40,41 +40,41 @@ default['yum']['main']['color_update_installed'] = nil # /.*/ ...@@ -40,41 +40,41 @@ default['yum']['main']['color_update_installed'] = nil # /.*/
default['yum']['main']['color_update_local'] = nil # /.*/ default['yum']['main']['color_update_local'] = nil # /.*/
default['yum']['main']['color_update_remote'] = nil # /.*/ default['yum']['main']['color_update_remote'] = nil # /.*/
default['yum']['main']['commands'] = nil # /.*/ default['yum']['main']['commands'] = nil # /.*/
default['yum']['main']['deltarpm'] = nil # [TrueClass, FalseClass] default['yum']['main']['deltarpm'] = nil # [true, false]
default['yum']['main']['debuglevel'] = nil # /^\d+$/ default['yum']['main']['debuglevel'] = nil # /^\d+$/
default['yum']['main']['diskspacecheck'] = nil # [TrueClass, FalseClass] default['yum']['main']['diskspacecheck'] = nil # [true, false]
default['yum']['main']['enable_group_conditionals'] = nil # [TrueClass, FalseClass] default['yum']['main']['enable_group_conditionals'] = nil # [true, false]
default['yum']['main']['errorlevel'] = nil # /^\d+$/ default['yum']['main']['errorlevel'] = nil # /^\d+$/
default['yum']['main']['exactarch'] = nil # [TrueClass, FalseClass] default['yum']['main']['exactarch'] = nil # [true, false]
default['yum']['main']['exclude'] = nil # /.*/ default['yum']['main']['exclude'] = nil # /.*/
default['yum']['main']['gpgcheck'] = true # [TrueClass, FalseClass] default['yum']['main']['gpgcheck'] = true # [true, false]
default['yum']['main']['group_package_types'] = nil # /.*/ default['yum']['main']['group_package_types'] = nil # /.*/
default['yum']['main']['groupremove_leaf_only'] = nil # [TrueClass, FalseClass] default['yum']['main']['groupremove_leaf_only'] = nil # [true, false]
default['yum']['main']['history_list_view'] = nil # /.*/ default['yum']['main']['history_list_view'] = nil # /.*/
default['yum']['main']['history_record'] = nil # [TrueClass, FalseClass] default['yum']['main']['history_record'] = nil # [true, false]
default['yum']['main']['history_record_packages'] = nil # /.*/ default['yum']['main']['history_record_packages'] = nil # /.*/
default['yum']['main']['http_caching'] = nil # %w{ packages all none } default['yum']['main']['http_caching'] = nil # %w{ packages all none }
default['yum']['main']['installonly_limit'] = nil # /\d+/, /keep/ default['yum']['main']['installonly_limit'] = nil # /\d+/, /keep/
default['yum']['main']['installonlypkgs'] = nil # /.*/ default['yum']['main']['installonlypkgs'] = nil # /.*/
default['yum']['main']['installroot'] = nil # /.*/ default['yum']['main']['installroot'] = nil # /.*/
default['yum']['main']['keepalive'] = nil # [TrueClass, FalseClass] default['yum']['main']['keepalive'] = nil # [true, false]
default['yum']['main']['keepcache'] = false # [TrueClass, FalseClass] default['yum']['main']['keepcache'] = false # [true, false]
default['yum']['main']['kernelpkgnames'] = nil # /.*/ default['yum']['main']['kernelpkgnames'] = nil # /.*/
default['yum']['main']['localpkg_gpgcheck'] = false # [TrueClass,# FalseClass] default['yum']['main']['localpkg_gpgcheck'] = false # [true,# false]
default['yum']['main']['logfile'] = '/var/log/yum.log' # /.*/ default['yum']['main']['logfile'] = '/var/log/yum.log' # /.*/
default['yum']['main']['max_retries'] = nil # /^\d+$/ default['yum']['main']['max_retries'] = nil # /^\d+$/
default['yum']['main']['mdpolicy'] = nil # %w{ packages all none } default['yum']['main']['mdpolicy'] = nil # %w{ packages all none }
default['yum']['main']['metadata_expire'] = nil # /^\d+$/ default['yum']['main']['metadata_expire'] = nil # /^\d+$/
default['yum']['main']['mirrorlist_expire'] = nil # /^\d+$/ default['yum']['main']['mirrorlist_expire'] = nil # /^\d+$/
default['yum']['main']['multilib_policy'] = nil # %w{ all best } default['yum']['main']['multilib_policy'] = nil # %w{ all best }
default['yum']['main']['obsoletes'] = nil # [TrueClass, FalseClass] default['yum']['main']['obsoletes'] = nil # [true, false]
default['yum']['main']['overwrite_groups'] = nil # [TrueClass, FalseClass] default['yum']['main']['overwrite_groups'] = nil # [true, false]
default['yum']['main']['password'] = nil # /.*/ default['yum']['main']['password'] = nil # /.*/
default['yum']['main']['path'] = '/etc/yum.conf' # /.*/ default['yum']['main']['path'] = '/etc/yum.conf' # /.*/
default['yum']['main']['persistdir'] = nil # /.*/ default['yum']['main']['persistdir'] = nil # /.*/
default['yum']['main']['pluginconfpath'] = nil # /.*/ default['yum']['main']['pluginconfpath'] = nil # /.*/
default['yum']['main']['pluginpath'] = nil # /.*/ default['yum']['main']['pluginpath'] = nil # /.*/
default['yum']['main']['plugins'] = nil # [TrueClass, FalseClass] default['yum']['main']['plugins'] = nil # [true, false]
default['yum']['main']['protected_multilib'] = nil # /.*/ default['yum']['main']['protected_multilib'] = nil # /.*/
default['yum']['main']['protected_packages'] = nil # /.*/ default['yum']['main']['protected_packages'] = nil # /.*/
default['yum']['main']['proxy'] = nil # /.*/ default['yum']['main']['proxy'] = nil # /.*/
...@@ -82,17 +82,17 @@ default['yum']['main']['proxy_password'] = nil # /.*/ ...@@ -82,17 +82,17 @@ default['yum']['main']['proxy_password'] = nil # /.*/
default['yum']['main']['proxy_username'] = nil # /.*/ default['yum']['main']['proxy_username'] = nil # /.*/
default['yum']['main']['password'] = nil # /.*/ default['yum']['main']['password'] = nil # /.*/
default['yum']['main']['recent'] = nil # /^\d+$/ default['yum']['main']['recent'] = nil # /^\d+$/
default['yum']['main']['repo_gpgcheck'] = nil # [TrueClass, FalseClass] default['yum']['main']['repo_gpgcheck'] = nil # [true, false]
default['yum']['main']['reposdir'] = nil # /.*/ default['yum']['main']['reposdir'] = nil # /.*/
default['yum']['main']['reset_nice'] = nil # [TrueClass, FalseClass] default['yum']['main']['reset_nice'] = nil # [true, false]
default['yum']['main']['rpmverbosity'] = nil # %w{ info critical# emergency error warn debug } default['yum']['main']['rpmverbosity'] = nil # %w{ info critical# emergency error warn debug }
default['yum']['main']['showdupesfromrepos'] = nil # [TrueClass, FalseClass] default['yum']['main']['showdupesfromrepos'] = nil # [true, false]
default['yum']['main']['skip_broken'] = nil # [TrueClass, FalseClass] default['yum']['main']['skip_broken'] = nil # [true, false]
default['yum']['main']['ssl_check_cert_permissions'] = nil # [TrueClass, FalseClass] default['yum']['main']['ssl_check_cert_permissions'] = nil # [true, false]
default['yum']['main']['sslcacert'] = nil # /.*/ default['yum']['main']['sslcacert'] = nil # /.*/
default['yum']['main']['sslclientcert'] = nil # /.*/ default['yum']['main']['sslclientcert'] = nil # /.*/
default['yum']['main']['sslclientkey'] = nil # /.*/ default['yum']['main']['sslclientkey'] = nil # /.*/
default['yum']['main']['sslverify'] = nil # [TrueClass, FalseClass] default['yum']['main']['sslverify'] = nil # [true, false]
default['yum']['main']['syslog_device'] = nil # /.*/ default['yum']['main']['syslog_device'] = nil # /.*/
default['yum']['main']['syslog_facility'] = nil # /.*/ default['yum']['main']['syslog_facility'] = nil # /.*/
default['yum']['main']['syslog_ident'] = nil # /.*/ default['yum']['main']['syslog_ident'] = nil # /.*/
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Author:: Joshua Timberman (<joshua@chef.io>) # Author:: Joshua Timberman (<joshua@chef.io>)
# Recipe:: yum::default # Recipe:: yum::default
# #
# Copyright:: 2013-2016, Chef Software, Inc (<legal@chef.io>) # Copyright:: 2013-2017, Chef Software, Inc (<legal@chef.io>)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Author:: Tim Smith (<tsmith@chef.io>) # Author:: Tim Smith (<tsmith@chef.io>)
# Recipe:: yum::fedora_yum_compat # Recipe:: yum::fedora_yum_compat
# #
# Copyright:: 2015-2016, Chef Software, Inc (<legal@chef.io>) # Copyright:: 2015-2017, Chef Software, Inc (<legal@chef.io>)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
# #
# http://linux.die.net/man/5/yum.conf # http://linux.die.net/man/5/yum.conf
property :alwaysprompt, [TrueClass, FalseClass] property :alwaysprompt, [true, false]
property :assumeyes, [TrueClass, FalseClass] property :assumeyes, [true, false]
property :bandwidth, String, regex: /^\d+/ property :bandwidth, String, regex: /^\d+/
property :bugtracker_url, String, regex: /.*/ property :bugtracker_url, String, regex: /.*/
property :clean_requirements_on_remove, [TrueClass, FalseClass] property :clean_requirements_on_remove, [true, false]
property :cachedir, String, regex: /.*/, default: '/var/cache/yum/$basearch/$releasever' property :cachedir, String, regex: /.*/, default: '/var/cache/yum/$basearch/$releasever'
property :color, String, equal_to: %w(always never) property :color, String, equal_to: %w(always never)
property :color_list_available_downgrade, String, regex: /.*/ property :color_list_available_downgrade, String, regex: /.*/
...@@ -40,65 +40,65 @@ property :color_update_local, String, regex: /.*/ ...@@ -40,65 +40,65 @@ property :color_update_local, String, regex: /.*/
property :color_update_remote, String, regex: /.*/ property :color_update_remote, String, regex: /.*/
property :commands, String, regex: /.*/ property :commands, String, regex: /.*/
property :debuglevel, String, regex: /^\d+$/, default: '2' property :debuglevel, String, regex: /^\d+$/, default: '2'
property :deltarpm, [TrueClass, FalseClass] property :deltarpm, [true, false]
property :diskspacecheck, [TrueClass, FalseClass] property :diskspacecheck, [true, false]
property :distroverpkg, String, regex: /.*/ property :distroverpkg, String, regex: /.*/
property :enable_group_conditionals, [TrueClass, FalseClass] property :enable_group_conditionals, [true, false]
property :errorlevel, String, regex: /^\d+$/ property :errorlevel, String, regex: /^\d+$/
property :exactarch, [TrueClass, FalseClass], default: true property :exactarch, [true, false], default: true
property :exclude, String, regex: /.*/ property :exclude, String, regex: /.*/
property :gpgcheck, [TrueClass, FalseClass], default: true property :gpgcheck, [true, false], default: true
property :group_package_types, String, regex: /.*/ property :group_package_types, String, regex: /.*/
property :groupremove_leaf_only, [TrueClass, FalseClass] property :groupremove_leaf_only, [true, false]
property :history_list_view, String, equal_to: %w(users commands single-user-commands) property :history_list_view, String, equal_to: %w(users commands single-user-commands)
property :history_record, [TrueClass, FalseClass] property :history_record, [true, false]
property :history_record_packages, String, regex: /.*/ property :history_record_packages, String, regex: /.*/
property :http_caching, String, equal_to: %w(packages all none) property :http_caching, String, equal_to: %w(packages all none)
property :installonly_limit, String, regex: [/^\d+/, /keep/], default: '3' property :installonly_limit, String, regex: [/^\d+/, /keep/], default: '3'
property :installonlypkgs, String, regex: /.*/ property :installonlypkgs, String, regex: /.*/
property :installroot, String, regex: /.*/ property :installroot, String, regex: /.*/
property :keepalive, [TrueClass, FalseClass] property :keepalive, [true, false]
property :keepcache, [TrueClass, FalseClass], default: false property :keepcache, [true, false], default: false
property :kernelpkgnames, String, regex: /.*/ property :kernelpkgnames, String, regex: /.*/
property :localpkg_gpgcheck, [TrueClass, FalseClass] property :localpkg_gpgcheck, [true, false]
property :logfile, String, regex: /.*/, default: '/var/log/yum.log' property :logfile, String, regex: /.*/, default: '/var/log/yum.log'
property :max_retries, String, regex: /^\d+$/ property :max_retries, String, regex: /^\d+$/
property :mdpolicy, String, equal_to: %w(instant group:primary group:small group:main group:all) property :mdpolicy, String, equal_to: %w(instant group:primary group:small group:main group:all)
property :metadata_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/, /never/] property :metadata_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/, /never/]
property :mirrorlist_expire, String, regex: /^\d+$/ property :mirrorlist_expire, String, regex: /^\d+$/
property :multilib_policy, String, equal_to: %w(all best) property :multilib_policy, String, equal_to: %w(all best)
property :obsoletes, [TrueClass, FalseClass] property :obsoletes, [true, false]
property :overwrite_groups, [TrueClass, FalseClass] property :overwrite_groups, [true, false]
property :password, String, regex: /.*/ property :password, String, regex: /.*/
property :path, String, regex: /.*/, name_property: true property :path, String, regex: /.*/, name_property: true
property :persistdir, String, regex: /.*/ property :persistdir, String, regex: /.*/
property :pluginconfpath, String, regex: /.*/ property :pluginconfpath, String, regex: /.*/
property :pluginpath, String, regex: /.*/ property :pluginpath, String, regex: /.*/
property :plugins, [TrueClass, FalseClass], default: true property :plugins, [true, false], default: true
property :protected_multilib, [TrueClass, FalseClass] property :protected_multilib, [true, false]
property :protected_packages, String, regex: /.*/ property :protected_packages, String, regex: /.*/
property :proxy, String, regex: /.*/ property :proxy, String, regex: /.*/
property :proxy_password, String, regex: /.*/ property :proxy_password, String, regex: /.*/
property :proxy_username, String, regex: /.*/ property :proxy_username, String, regex: /.*/
property :recent, String, regex: /^\d+$/ property :recent, String, regex: /^\d+$/
property :releasever, String, regex: /.*/ property :releasever, String, regex: /.*/
property :repo_gpgcheck, [TrueClass, FalseClass] property :repo_gpgcheck, [true, false]
property :reposdir, String, regex: /.*/ property :reposdir, String, regex: /.*/
property :reset_nice, [TrueClass, FalseClass] property :reset_nice, [true, false]
property :rpmverbosity, String, equal_to: %w(info critical emergency error warn debug) property :rpmverbosity, String, equal_to: %w(info critical emergency error warn debug)
property :showdupesfromrepos, [TrueClass, FalseClass] property :showdupesfromrepos, [true, false]
property :skip_broken, [TrueClass, FalseClass] property :skip_broken, [true, false]
property :ssl_check_cert_permissions, [TrueClass, FalseClass] property :ssl_check_cert_permissions, [true, false]
property :sslcacert, String, regex: /.*/ property :sslcacert, String, regex: /.*/
property :sslclientcert, String, regex: /.*/ property :sslclientcert, String, regex: /.*/
property :sslclientkey, String, regex: /.*/ property :sslclientkey, String, regex: /.*/
property :sslverify, [TrueClass, FalseClass] property :sslverify, [true, false]
property :syslog_device, String, regex: /.*/ property :syslog_device, String, regex: /.*/
property :syslog_facility, String, regex: /.*/ property :syslog_facility, String, regex: /.*/
property :syslog_ident, String, regex: /.*/ property :syslog_ident, String, regex: /.*/
property :throttle, String, regex: [/\d+k/, /\d+M/, /\d+G/] property :throttle, String, regex: [/\d+k/, /\d+M/, /\d+G/]
property :timeout, String, regex: /^\d+$/ property :timeout, String, regex: /^\d+$/
property :tolerant, [TrueClass, FalseClass] property :tolerant, [true, false]
property :tsflags, String, regex: /.*/ property :tsflags, String, regex: /.*/
property :username, String, regex: /.*/ property :username, String, regex: /.*/
property :options, Hash property :options, Hash
......
# #
# Copyright:: 2015-2016, Chef Software, Inc. # Copyright:: 2015-2017, Chef Software, Inc.
# License:: Apache License, Version 2.0 # License:: Apache License, Version 2.0
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment