Skip to content

Commit

Permalink
getting rubocop happy to travis passes
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ Asghar committed Nov 26, 2014
1 parent 2952a59 commit ccf42a3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ AsciiComments:
Enabled: false

MethodLength:
Max: 18
Max: 18

Style/FileName:
Enabled: false
2 changes: 2 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# watch(%r{^resources/(.+)\.rb})
# end

# rubocop:disable all

guard 'foodcritic', :cookbook_paths => '.', :all_on_start => false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace :integration do
end

desc 'Run all tests on Travis'
task :travis => ['style', 'spec']
task :travis => ['style', 'spec'] # rubocop:disable all

# Default
# Default # rubocop:enable all
task :default => ['style', 'spec', 'integration:vagrant']
4 changes: 2 additions & 2 deletions libraries/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module Opscode
module RabbitMQ
# This method does some of the yuckiness of formatting parameters properly
# for rendering into the rabbit.config template.
def format_kernel_parameters
rendered = []
def format_kernel_parameters # rubocop:disable all
rendered = [] # rubocop:enable all
kernel = node['rabbitmq']['kernel'].dup

# This parameter is special and needs commas instead of periods.
Expand Down
4 changes: 2 additions & 2 deletions providers/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def user_has_tag?(name, tag)

# does the user have the rights listed on the vhost?
# empty perm_list means we're checking for any permissions
def user_has_permissions?(name, vhost, perm_list = nil)
vhost = '/' if vhost.nil?
def user_has_permissions?(name, vhost, perm_list = nil) # rubocop:disable all
vhost = '/' if vhost.nil? # rubocop:enable all
cmd = "rabbitmqctl -q list_user_permissions #{name} | grep \"^#{vhost}\\b\""
cmd = Mixlib::ShellOut.new(cmd)
cmd.environment['HOME'] = ENV.fetch('HOME', '/root')
Expand Down
4 changes: 2 additions & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#

#
class Chef::Resource
include Opscode::RabbitMQ
class Chef::Resource # rubocop:disable all
include Opscode::RabbitMQ # rubocop:enable all
end

include_recipe 'erlang'
Expand Down
4 changes: 2 additions & 2 deletions test/integration/cluster/rspec/cluster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

describe file('/etc/rabbitmq/rabbitmq.config') do
it { should be_file }
its(:content) { should match /^ {cluster_nodes, {.*}},$/ }
end
its(:content) { should match /^ {cluster_nodes, {.*}},$/ } # rubocop:disable all
end # rubocop:enable all

0 comments on commit ccf42a3

Please sign in to comment.