Skip to content

Commit

Permalink
Update RuboCop to 0.48
Browse files Browse the repository at this point in the history
  • Loading branch information
zuazo committed Mar 31, 2017
1 parent 693351d commit 004d09b
Show file tree
Hide file tree
Showing 30 changed files with 39 additions and 72 deletions.
17 changes: 17 additions & 0 deletions .rubocop.yml
Expand Up @@ -2,3 +2,20 @@ AllCops:
Exclude:
- .kitchen
- vendor/**/*
Include:
- files/*/*.rb
- '**/*.rb.erb'
Metrics/BlockLength:
Exclude:
- test/unit/**/*_spec.rb
- test/integration/**/*_spec.rb
- Guardfile
- Rakefile
- Vagrantfile
Style/FileName:
Exclude:
- Berksfile
- '**/Gemfile'
- Guardfile
- Rakefile
- Vagrantfile
1 change: 0 additions & 1 deletion Berksfile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Improved
- README: Add doc and license badges.
- Improve TESTING documentation.
- Update RuboCop to `0.48`.

## [1.0.0] - 2015-09-03
### Addeed in 1.0.0
Expand Down
15 changes: 7 additions & 8 deletions Gemfile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand All @@ -16,20 +15,20 @@ group :doc do
end

group :test do
gem 'rake'
gem 'berkshelf', '~> 5.1'
gem 'rake', '~> 12.0'
end

group :style do
gem 'foodcritic', '~> 10.0.0'
gem 'rubocop', '~> 0.39.0'
gem 'rubocop', '~> 0.48.0'
end

group :unit do
gem 'chef', chef_version unless chef_version.nil?
gem 'chefspec', '~> 6.0'
gem 'simplecov', '~> 0.13.0'
gem 'should_not', '~> 1.1'
gem 'simplecov', '~> 0.13.0'
end

group :integration do
Expand All @@ -41,22 +40,22 @@ group :integration_docker do
end

group :integration_vagrant do
gem 'vagrant-wrapper', '~> 2.0'
gem 'kitchen-vagrant', '~> 1.0'
gem 'vagrant-wrapper', '~> 2.0'
end

group :integration_cloud do
gem 'kitchen-ec2', '~> 1.2'
gem 'kitchen-digitalocean', '~> 0.9.5'
gem 'kitchen-ec2', '~> 1.2'
end

group :guard do
gem 'guard', '~> 2.14'
gem 'guard-foodcritic', '~> 3.0'
gem 'guard-rubocop', '~> 1.1'
gem 'guard-rspec', '~> 4.3'
# Temporary disabled: Error is: cannot load such file -- guard/kitchen
# gem 'guard-kitchen', '~> 0.0.0'
gem 'guard-rspec', '~> 4.3'
gem 'guard-rubocop', '~> 1.1'
end

group :travis do
Expand Down
3 changes: 1 addition & 2 deletions Guardfile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down Expand Up @@ -86,4 +85,4 @@ end # group unit
# end
# end # group integration

scope groups: [:style, :unit]
scope groups: %i(style unit)
9 changes: 4 additions & 5 deletions Rakefile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down Expand Up @@ -127,23 +126,23 @@ namespace :integration do
end

desc 'Run Test Kitchen integration tests using vagrant'
task :vagrant, [:regexp, :action] do |_t, args|
task :vagrant, %i(regexp action) do |_t, args|
run_kitchen(args.action, args.regexp)
end

desc 'Run Test Kitchen integration tests using docker'
task :docker, [:regexp, :action] do |_t, args|
task :docker, %i(regexp action) do |_t, args|
run_kitchen(args.action, args.regexp, local_config: '.kitchen.docker.yml')
end

desc 'Run Test Kitchen integration tests in the cloud'
task :cloud, [:regexp, :action] do |_t, args|
task :cloud, %i(regexp action) do |_t, args|
run_kitchen(args.action, args.regexp, local_config: '.kitchen.cloud.yml')
end
end

desc 'Run Test Kitchen integration tests'
task :integration, [:regexp, :action] =>
task :integration, %i(regexp action) =>
ci? ? %w(integration:docker) : %w(integration:vagrant)

desc 'Run doc, style, unit and integration tests'
Expand Down
1 change: 0 additions & 1 deletion Vagrantfile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down
2 changes: 0 additions & 2 deletions attributes/default.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Attributes:: default
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
2 changes: 0 additions & 2 deletions libraries/template_helpers.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Library:: template_helpers
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
6 changes: 2 additions & 4 deletions metadata.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
Expand All @@ -23,8 +21,8 @@
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description <<-EOH
Installs and configures OpenDKIM: Open source implementation of the DKIM (Domain
Keys Identified Mail) sender authentication system.
Installs and configures OpenDKIM: Open source implementation of the DKIM
(Domain Keys Identified Mail) sender authentication system.
EOH
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.0.0' # WiP
Expand Down
2 changes: 0 additions & 2 deletions recipes/_configuration.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Recipe:: _configuration
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
2 changes: 0 additions & 2 deletions recipes/_from_package.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Recipe:: _from_package
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
5 changes: 1 addition & 4 deletions recipes/_service.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Recipe:: _service
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand All @@ -24,7 +22,6 @@
Gem::Version.new(node['platform_version']) >= Gem::Version.new('15.04')
provider Chef::Provider::Service::Debian
end
action [:enable, :start]
action %i(enable start)
supports node['opendkim']['service']['supports'].dup
action [:enable, :start]
end
2 changes: 0 additions & 2 deletions recipes/_user.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Recipe:: _user
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
2 changes: 0 additions & 2 deletions recipes/default.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Recipe:: default
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
4 changes: 1 addition & 3 deletions test/cookbooks/opendkim_test/metadata.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
Expand All @@ -23,7 +21,7 @@
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description <<-EOH
This cookbook is used with test-kitchen to test the parent, opendkim cookbook.
This cookbook is used with test-kitchen to test the parent, opendkim cookbook.
EOH
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
Expand Down
2 changes: 0 additions & 2 deletions test/cookbooks/opendkim_test/recipes/default.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Cookbook Name:: opendkim_test
# Recipe:: default
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
Expand Down
1 change: 0 additions & 1 deletion test/integration/default/serverspec/Gemfile
@@ -1,4 +1,3 @@
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down
2 changes: 0 additions & 2 deletions test/integration/default/serverspec/opendkim_conf_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
12 changes: 5 additions & 7 deletions test/integration/default/serverspec/opendkim_key_tests_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down Expand Up @@ -29,12 +27,12 @@
end

dkim_test_message = <<-EOH
Date: Wed, 29 Jan 2015 10:15:11 +0000 (UTC)
From: Bob <bob@example.com>
To: Alice <alice@example.com>
Subject: Testing DKIM
Date: Wed, 29 Jan 2015 10:15:11 +0000 (UTC)
From: Bob <bob@example.com>
To: Alice <alice@example.com>
Subject: Testing DKIM
Testing DKIM body message.
Testing DKIM body message.
EOH

dkim_test_command =
Expand Down
2 changes: 0 additions & 2 deletions test/integration/default/serverspec/opendkim_service_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/integration/default/serverspec/spec_helper.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/libraries/template_helpers_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/recipes/_configuration_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/recipes/_from_package_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/recipes/_service_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/recipes/_user_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/recipes/default_spec.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/spec_helper.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
Expand Down
2 changes: 0 additions & 2 deletions test/unit/support/coverage.rb
@@ -1,5 +1,3 @@
# encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Xabier de Zuazo
# License:: Apache License, Version 2.0
Expand Down

0 comments on commit 004d09b

Please sign in to comment.