Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Rubocop: More fixes and cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Holzhauer committed Dec 5, 2014
1 parent d7e0bd9 commit caecaba
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ Lint/UnusedBlockArgument:
Lint/UnusedMethodArgument:
Enabled: false

Style/HashSyntax:
EnforcedStyle: hash_rockets

inherit_from: .rubocop_todo.yml
20 changes: 0 additions & 20 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
# Offense count: 14
Lint/ParenthesesAsGroupedExpression:
Enabled: false

# Offense count: 5
# Cop supports --auto-correct.
Lint/UnusedBlockArgument:
Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
Lint/UnusedMethodArgument:
Enabled: false

# Offense count: 3
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/FormatString:
Enabled: false

# Offense count: 397
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.
Style/HashSyntax:
EnforcedStyle: hash_rockets

# Offense count: 3
Style/ModuleFunction:
Enabled: false
2 changes: 1 addition & 1 deletion bash/spec/bashrc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'bash::bashrc' do

let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new do |node|
# fake opsworks
node.default['opsworks'] = {}
Expand Down
6 changes: 3 additions & 3 deletions haproxy/spec/backend_healthcheck_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'chefspec'

describe 'haproxy::configure' do
let (:runner) do
let(:runner) do
ChefSpec::Runner.new do |node|
node.set[:opsworks][:layers][:nginxphpapp][:instances] = {}
node.set[:opsworks][:layers][:app1][:instances] = {}
Expand Down Expand Up @@ -30,8 +30,8 @@
}
end
end
let (:chef_run) { runner.converge('haproxy::configure') }
let (:node) { runner.node }
let(:chef_run) { runner.converge('haproxy::configure') }
let(:node) { runner.node }

describe 'standard settings' do
before do
Expand Down
6 changes: 3 additions & 3 deletions hhvm-fcgi/spec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
@shellout.stub(:error!)
end

let (:runner) { ChefSpec::Runner.new }
let (:chef_run) { runner.converge('hhvm-fcgi::default') }
let (:node) { runner.node }
let(:runner) { ChefSpec::Runner.new }
let(:chef_run) { runner.converge('hhvm-fcgi::default') }
let(:node) { runner.node }

describe 'standard settings' do
it 'installs hhvm and creates the config files' do
Expand Down
4 changes: 1 addition & 3 deletions nodejs/recipes/npm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

execute 'Install the latest npm' do
command "#{Chef::Config[:file_cache_path]}/install-npm.sh"
environment ({
'clean' => 'no'
})
environment('clean' => 'no ')
not_if do
File.exist?(npm_bin)
end
Expand Down
2 changes: 1 addition & 1 deletion percona/spec/server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'chefspec'

describe 'percona::server' do
let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new.converge('percona::server')
end

Expand Down
2 changes: 1 addition & 1 deletion php-apc/spec/configure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'php-apc::configure' do

let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new do |node|
# fake opsworks
node.default['opsworks'] = {}
Expand Down
2 changes: 1 addition & 1 deletion php-fpm/spec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@shellout.stub(:error!)
end

let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new.converge('php-fpm::default')
end

Expand Down
2 changes: 1 addition & 1 deletion php-mysqli/spec/configure_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'chefspec'

describe 'php-mysqli::configure' do
let (:chef_run) { ChefSpec::Runner.new.converge('php-mysqli::configure') }
let(:chef_run) { ChefSpec::Runner.new.converge('php-mysqli::configure') }

it 'creates mysqli-settings.ini which contains the correct settings' do

Expand Down
2 changes: 1 addition & 1 deletion php-xdebug/spec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'php-xdebug::default' do

let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new do |node|
node.default['apt'] = {}
node.default.apt['easybib'] = {}
Expand Down
2 changes: 1 addition & 1 deletion statsd/spec/configure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'statsd::configure' do

let (:chef_run) do
let(:chef_run) do
ChefSpec::Runner.new do |node|
# fake opsworks
node.default['opsworks'] = {}
Expand Down

0 comments on commit caecaba

Please sign in to comment.