Skip to content

Commit 4e82f25

Browse files
committed
Update rubocop to version 0.34.0
1 parent 1a41b27 commit 4e82f25

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.rubocop.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Lint/NestedMethodDefinition:
2+
Enabled: false
3+
14
Metrics/BlockNesting:
25
Max: 2
36

@@ -20,8 +23,10 @@ Style/ClassVars:
2023
Enabled: false
2124

2225
Style/CollectionMethods:
26+
Enabled: true
2327
PreferredMethods:
2428
map: 'collect'
29+
map!: 'collect!'
2530
reduce: 'inject'
2631
find: 'detect'
2732
find_all: 'select'

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gemspec
66
gem 'rake'
77

88
group :development do
9-
platforms :ruby_19, :ruby_20, :ruby_21 do
9+
platforms :ruby_19, :ruby_20, :ruby_21, :ruby_22 do
1010
gem 'guard'
1111
gem 'guard-bundler'
1212
gem 'guard-rspec'
@@ -21,5 +21,5 @@ group :test do
2121
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
2222
gem 'rest-client', '~> 1.6.0', :platforms => [:jruby, :ruby_18]
2323
gem 'rspec', '>= 2.14'
24-
gem 'rubocop', '~> 0.31.0', :platforms => [:ruby_19, :ruby_20, :ruby_21]
24+
gem 'rubocop', '~> 0.34.0', :platforms => [:ruby_19, :ruby_20, :ruby_21, :ruby_22]
2525
end

lib/naught/null_class_builder/commands/mimic.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(builder, class_to_mimic_or_options, options = {})
2121
@singleton_class = NULL_SINGLETON_CLASS
2222
@class_to_mimic = class_to_mimic_or_options
2323
end
24-
@include_super = options.fetch(:include_super) { true }
24+
@include_super = options.fetch(:include_super) { true }
2525

2626
builder.base_class = root_class_of(@class_to_mimic)
2727
class_to_mimic = @class_to_mimic

lib/naught/null_class_builder/commands/pebble.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def call
1313
defer do |subject|
1414
subject.module_exec(@output) do |output|
1515
define_method(:method_missing) do |method_name, *args|
16-
pretty_args = args.collect(&:inspect).join(', ').gsub("\"", "'")
16+
pretty_args = args.collect(&:inspect).join(', ').tr("\"", "'")
1717
output.puts "#{method_name}(#{pretty_args}) from #{parse_caller}"
1818
self
1919
end

0 commit comments

Comments
 (0)