Bump rubocop

This commit is contained in:
Benjamin Neff 2017-06-04 02:35:21 +02:00
parent 3ad5f2c1dc
commit 0a770918b2
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
5 changed files with 17 additions and 15 deletions

View file

@ -28,7 +28,7 @@ Metrics/AbcSize:
# No space makes the method definition shorter and differentiates # No space makes the method definition shorter and differentiates
# from a regular assignment. # from a regular assignment.
Style/SpaceAroundEqualsInParameterDefault: Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space EnforcedStyle: no_space
# Single quotes being faster is hardly measurable and only affects parse time. # Single quotes being faster is hardly measurable and only affects parse time.
@ -43,7 +43,7 @@ Style/SymbolArray:
Enabled: true Enabled: true
# Most readable form. # Most readable form.
Style/AlignHash: Layout/AlignHash:
EnforcedHashRocketStyle: table EnforcedHashRocketStyle: table
EnforcedColonStyle: table EnforcedColonStyle: table
@ -80,7 +80,7 @@ Style/RaiseArgs:
# Indenting the chained dots beneath each other is not supported by this cop, # Indenting the chained dots beneath each other is not supported by this cop,
# see https://github.com/bbatsov/rubocop/issues/1633 # see https://github.com/bbatsov/rubocop/issues/1633
Style/MultilineOperationIndentation: Layout/MultilineOperationIndentation:
Enabled: false Enabled: false
# Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain. # Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain.
@ -95,7 +95,7 @@ Style/SignalException:
Lint/HandleExceptions: Lint/HandleExceptions:
Enabled: false Enabled: false
Style/SpaceInsideBlockBraces: Layout/SpaceInsideBlockBraces:
# The space here provides no real gain in readability while consuming # The space here provides no real gain in readability while consuming
# horizontal space that could be used for a better parameter name. # horizontal space that could be used for a better parameter name.
# Also {| differentiates better from a hash than { | does. # Also {| differentiates better from a hash than { | does.
@ -103,7 +103,7 @@ Style/SpaceInsideBlockBraces:
# No trailing space differentiates better from the block: # No trailing space differentiates better from the block:
# foo} means hash, foo } means block. # foo} means hash, foo } means block.
Style/SpaceInsideHashLiteralBraces: Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space EnforcedStyle: no_space
# { ... } for multi-line blocks is okay, follow Weirichs rule instead: # { ... } for multi-line blocks is okay, follow Weirichs rule instead:
@ -145,7 +145,7 @@ Lint/Debugger:
# Reset some HoundCI changes back to Rubocop defaults # Reset some HoundCI changes back to Rubocop defaults
Style/DotPosition: Layout/DotPosition:
EnforcedStyle: leading EnforcedStyle: leading
@ -182,7 +182,7 @@ Rails/Present:
Style/SingleLineMethods: Style/SingleLineMethods:
Exclude: Exclude:
- "test/dummy/app/models/*" - "test/dummy/app/models/*"
Style/EmptyLineBetweenDefs: Layout/EmptyLineBetweenDefs:
Exclude: Exclude:
- "test/dummy/app/models/*" - "test/dummy/app/models/*"
@ -206,7 +206,7 @@ Style/FrozenStringLiteralComment:
Enabled: false Enabled: false
Style/SafeNavigation: Style/SafeNavigation:
Enabled: false Enabled: false
Style/IndentHeredoc: Layout/IndentHeredoc:
Enabled: false Enabled: false
# only with ruby >= 2.4 # only with ruby >= 2.4

View file

@ -19,7 +19,7 @@ group :development do
# code style # code style
gem "pronto", "0.9.3", require: false gem "pronto", "0.9.3", require: false
gem "pronto-rubocop", "0.9.0", require: false gem "pronto-rubocop", "0.9.0", require: false
gem "rubocop", "0.48.1", require: false gem "rubocop", "0.49.1", require: false
# automatic test runs # automatic test runs
gem "guard-rspec", require: false gem "guard-rspec", require: false

View file

@ -115,6 +115,7 @@ GEM
rspec (>= 2.99, >= 2.14.2, < 4) rspec (>= 2.99, >= 2.14.2, < 4)
octokit (4.7.0) octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3) sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.11.2)
parser (2.4.0.0) parser (2.4.0.0)
ast (~> 2.2) ast (~> 2.2)
powerpack (0.1.1) powerpack (0.1.1)
@ -180,7 +181,8 @@ GEM
rspec-mocks (~> 3.6.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0) rspec-support (~> 3.6.0)
rspec-support (3.6.0) rspec-support (3.6.0)
rubocop (0.48.1) rubocop (0.49.1)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0) parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
@ -250,7 +252,7 @@ DEPENDENCIES
rspec-collection_matchers (~> 1.1.2) rspec-collection_matchers (~> 1.1.2)
rspec-json_expectations (~> 2.1) rspec-json_expectations (~> 2.1)
rspec-rails (~> 3.6.0) rspec-rails (~> 3.6.0)
rubocop (= 0.48.1) rubocop (= 0.49.1)
simplecov (= 0.14.1) simplecov (= 0.14.1)
simplecov-rcov (= 0.2.3) simplecov-rcov (= 0.2.3)
spring spring

View file

@ -20,8 +20,8 @@ module Validation
if value.is_a?(String) if value.is_a?(String)
true if value =~ /\A(true|false|t|f|yes|no|y|n|1|0)\z/i true if value =~ /\A(true|false|t|f|yes|no|y|n|1|0)\z/i
elsif value.is_a?(Integer) elsif value.is_a?(Integer)
true if value == 1 || value == 0 true if [1, 0].include?(value)
elsif [true, false].include? value elsif [true, false].include?(value)
true true
else else
false false

View file

@ -145,8 +145,8 @@ XML
it "passes input parameter directly to .parse method of the parser" do it "passes input parameter directly to .parse method of the parser" do
root = Nokogiri::XML("<dummy/>").root root = Nokogiri::XML("<dummy/>").root
expect_any_instance_of(DiasporaFederation::Parsers::XmlParser).to receive(:parse).with(root) expect_any_instance_of(DiasporaFederation::Parsers::XmlParser)
.and_return([{test1: "2", test2: "1"}]) .to receive(:parse).with(root).and_return([{test1: "2", test2: "1"}])
Entities::TestDefaultEntity.from_xml(root) Entities::TestDefaultEntity.from_xml(root)
end end
end end