diff --git a/.rubocop.yml b/.rubocop.yml index fa0fd0f52e..9a82d58959 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -104,10 +104,6 @@ EmptyLines: SpaceAroundOperators: Enabled: true -# Use spaces around { and before }. -SpaceAroundBraces: - Enabled: true - # No spaces after ( or before ). SpaceInsideParens: Enabled: true @@ -234,20 +230,12 @@ MethodAndVariableSnakeCase: ClassAndModuleCamelCase: Enabled: true -# Prefer each over for. -AvoidFor: - Enabled: true - -# Avoid Perl-style global variables. -AvoidPerlisms: - Enabled: true - -# Avoid Perl-style regex back references. -AvoidPerlBackrefs: - Enabled: true +# Allow class vars (but please don't use them) +ClassVars: + Enabled: false -# Avoid the use of class variables. -AvoidClassVars: +# We don't require numeric any formatting, but for larger numbers you should +NumericLiterals: Enabled: false # Don't interpolate global, instance and class variables directly in strings. @@ -330,10 +318,6 @@ LeadingCommentSpace: ColonMethodCall: Enabled: true -# Do not introduce global variables. -AvoidGlobalVars: - Enabled: true - # The use of eval represents a serious security risk. Eval: Enabled: true @@ -397,10 +381,6 @@ Void: UnreachableCode: Enabled: true -# Unused local variable. -UnusedLocalVariable: - Enabled: true - # Do not use the same name as outer local variable # for block arguments or block local variables. ShadowingOuterLocalVariable: diff --git a/Gemfile b/Gemfile index d3e4b904c5..e3c082d043 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ group :testing do platforms :ruby_19, :ruby_20, :jruby do gem 'coveralls', :require => false - gem 'rubocop' if RUBY_VERSION > '1.9' + gem 'rubocop', '0.13.1' if RUBY_VERSION > '1.9' end end diff --git a/spec/mongo/cursor_spec.rb b/spec/mongo/cursor_spec.rb index f2d702f0c9..322f2234bf 100644 --- a/spec/mongo/cursor_spec.rb +++ b/spec/mongo/cursor_spec.rb @@ -149,8 +149,7 @@ context 'when multiple requests are needed' do let(:responses) do - [results(nonzero, total_docs - delta), - results(0, delta)] + [results(nonzero, total_docs - delta), results(0, delta)] end it 'does not limit the first query message' do diff --git a/spec/mongo/protocol/delete_spec.rb b/spec/mongo/protocol/delete_spec.rb index 22752919f4..7675838fca 100644 --- a/spec/mongo/protocol/delete_spec.rb +++ b/spec/mongo/protocol/delete_spec.rb @@ -158,4 +158,3 @@ end end end - diff --git a/spec/mongo/protocol/get_more_spec.rb b/spec/mongo/protocol/get_more_spec.rb index d574c506cd..6c9cc23944 100644 --- a/spec/mongo/protocol/get_more_spec.rb +++ b/spec/mongo/protocol/get_more_spec.rb @@ -137,4 +137,3 @@ end end end - diff --git a/spec/mongo/protocol/update_spec.rb b/spec/mongo/protocol/update_spec.rb index fdc00685f7..8f41223e53 100644 --- a/spec/mongo/protocol/update_spec.rb +++ b/spec/mongo/protocol/update_spec.rb @@ -176,4 +176,3 @@ end end end - diff --git a/spec/support/shared/cursor.rb b/spec/support/shared/cursor.rb index 8044fe5880..bf185219a6 100644 --- a/spec/support/shared/cursor.rb +++ b/spec/support/shared/cursor.rb @@ -16,4 +16,4 @@ def results(cursor_id = 0, nreturned = 5) let(:responses) do results end -end \ No newline at end of file +end