diff --git a/.rubocop.yml b/.rubocop.yml index abdea36..12b6147 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,12 +1,31 @@ AllCops: Exclude: - vendor/**/* + - Guardfile AlignParameters: Enabled: false +ClassLength: + Enabled: false +CyclomaticComplexity: + Enabled: false +Documentation: + Enabled: false Encoding: Enabled: false +Style/FileName: + Enabled: false LineLength: Enabled: false MethodLength: Enabled: false +Metrics/AbcSize: + Enabled: false +PerceivedComplexity: + Enabled: false +SingleSpaceBeforeFirstArg: + Enabled: false +Style/ClassAndModuleChildren: + Enabled: false +Style/FileName: + Enabled: false diff --git a/Berksfile b/Berksfile index 3d60e57..71d3d18 100644 --- a/Berksfile +++ b/Berksfile @@ -5,6 +5,6 @@ metadata group :integration do cookbook 'apt' cookbook 'yum' - cookbook 'fake', :path => 'test/fixtures/cookbooks/fake' - cookbook 'wrapper', :path => 'test/fixtures/cookbooks/wrapper' + cookbook 'fake', path: 'test/fixtures/cookbooks/fake' + cookbook 'wrapper', path: 'test/fixtures/cookbooks/wrapper' end diff --git a/Gemfile b/Gemfile index 46455bc..9fdfd97 100644 --- a/Gemfile +++ b/Gemfile @@ -36,4 +36,4 @@ group :development do gem 'rake' gem 'fauxhai' gem 'pry-nav' -end \ No newline at end of file +end diff --git a/attributes/default.rb b/attributes/default.rb index f14a4cf..d3b857b 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -16,7 +16,7 @@ # limitations under the License. # Generic cookbook attributes -default['postfix']['mail_type'] = 'client' +default['postfix']['mail_type'] = 'client' default['postfix']['relayhost_role'] = 'relayhost' default['postfix']['multi_environment_relay'] = false default['postfix']['use_procmail'] = false @@ -145,4 +145,3 @@ end if node['postfix']['use_relay_restirictions_maps'] default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject" end - diff --git a/recipes/_common.rb b/recipes/_common.rb index b8fc106..d556f98 100644 --- a/recipes/_common.rb +++ b/recipes/_common.rb @@ -57,7 +57,7 @@ when 'omnios' # we don't guard this because if the user creation was successful (or happened out of band), then this won't get executed when the action is :nothing. execute '/opt/omni/sbin/postfix set-permissions' - template manifest_path do + template manifest_path do source 'manifest-postfix.xml.erb' owner 'root' group node['root_group'] diff --git a/recipes/default.rb b/recipes/default.rb index ba28cdc..ea10139 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -24,17 +24,11 @@ if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes' include_recipe 'postfix::sasl_auth' end -if node['postfix']['use_alias_maps'] - include_recipe 'postfix::aliases' -end +include_recipe 'postfix::aliases' if node['postfix']['use_alias_maps'] -if node['postfix']['use_transport_maps'] - include_recipe 'postfix::transports' -end +include_recipe 'postfix::transports' if node['postfix']['use_transport_maps'] -if node['postfix']['use_access_maps'] - include_recipe 'postfix::access' -end +include_recipe 'postfix::access' if node['postfix']['use_access_maps'] if node['postfix']['use_virtual_aliases'] include_recipe 'postfix::virtual_aliases' @@ -47,4 +41,3 @@ end if node['postfix']['use_relay_restrictions_maps'] include_recipe 'postfix::relay_restrictions' end - diff --git a/recipes/relay_restrictions.rb b/recipes/relay_restrictions.rb index a96d482..fe4e557 100644 --- a/recipes/relay_restrictions.rb +++ b/recipes/relay_restrictions.rb @@ -26,4 +26,3 @@ template node['postfix']['relay_restrictions_db'] do source 'relay_restrictions.erb' notifies :run, 'execute[update-postfix-relay-restrictions]' end - diff --git a/test/integration/helpers/serverspec/spec_helper.rb b/test/integration/helpers/serverspec/spec_helper.rb index fb6f099..2fbdaab 100644 --- a/test/integration/helpers/serverspec/spec_helper.rb +++ b/test/integration/helpers/serverspec/spec_helper.rb @@ -6,13 +6,13 @@ set :path, '/sbin:/usr/local/sbin:$PATH' def get_family fam = 'solaris2' return fam unless File.exist? '/etc/release' - File.open("/etc/release") do |file| - while line = file.gets - case line - when /^\s*(OmniOS)/ - fam = 'omnios' - end + File.open('/etc/release') do |file| + while line = file.gets + case line + when /^\s*(OmniOS)/ + fam = 'omnios' end + end end fam end @@ -24,4 +24,3 @@ def postfix_conf_path '/etc/postfix' end end -