Bump rubocop
This commit is contained in:
parent
3ad5f2c1dc
commit
0a770918b2
5 changed files with 17 additions and 15 deletions
16
.rubocop.yml
16
.rubocop.yml
|
|
@ -28,7 +28,7 @@ Metrics/AbcSize:
|
|||
|
||||
# No space makes the method definition shorter and differentiates
|
||||
# from a regular assignment.
|
||||
Style/SpaceAroundEqualsInParameterDefault:
|
||||
Layout/SpaceAroundEqualsInParameterDefault:
|
||||
EnforcedStyle: no_space
|
||||
|
||||
# Single quotes being faster is hardly measurable and only affects parse time.
|
||||
|
|
@ -43,7 +43,7 @@ Style/SymbolArray:
|
|||
Enabled: true
|
||||
|
||||
# Most readable form.
|
||||
Style/AlignHash:
|
||||
Layout/AlignHash:
|
||||
EnforcedHashRocketStyle: table
|
||||
EnforcedColonStyle: table
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ Style/RaiseArgs:
|
|||
|
||||
# Indenting the chained dots beneath each other is not supported by this cop,
|
||||
# see https://github.com/bbatsov/rubocop/issues/1633
|
||||
Style/MultilineOperationIndentation:
|
||||
Layout/MultilineOperationIndentation:
|
||||
Enabled: false
|
||||
|
||||
# Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain.
|
||||
|
|
@ -95,7 +95,7 @@ Style/SignalException:
|
|||
Lint/HandleExceptions:
|
||||
Enabled: false
|
||||
|
||||
Style/SpaceInsideBlockBraces:
|
||||
Layout/SpaceInsideBlockBraces:
|
||||
# The space here provides no real gain in readability while consuming
|
||||
# horizontal space that could be used for a better parameter name.
|
||||
# Also {| differentiates better from a hash than { | does.
|
||||
|
|
@ -103,7 +103,7 @@ Style/SpaceInsideBlockBraces:
|
|||
|
||||
# No trailing space differentiates better from the block:
|
||||
# foo} means hash, foo } means block.
|
||||
Style/SpaceInsideHashLiteralBraces:
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
EnforcedStyle: no_space
|
||||
|
||||
# { ... } for multi-line blocks is okay, follow Weirichs rule instead:
|
||||
|
|
@ -145,7 +145,7 @@ Lint/Debugger:
|
|||
|
||||
|
||||
# Reset some HoundCI changes back to Rubocop defaults
|
||||
Style/DotPosition:
|
||||
Layout/DotPosition:
|
||||
EnforcedStyle: leading
|
||||
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ Rails/Present:
|
|||
Style/SingleLineMethods:
|
||||
Exclude:
|
||||
- "test/dummy/app/models/*"
|
||||
Style/EmptyLineBetweenDefs:
|
||||
Layout/EmptyLineBetweenDefs:
|
||||
Exclude:
|
||||
- "test/dummy/app/models/*"
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ Style/FrozenStringLiteralComment:
|
|||
Enabled: false
|
||||
Style/SafeNavigation:
|
||||
Enabled: false
|
||||
Style/IndentHeredoc:
|
||||
Layout/IndentHeredoc:
|
||||
Enabled: false
|
||||
|
||||
# only with ruby >= 2.4
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -19,7 +19,7 @@ group :development do
|
|||
# code style
|
||||
gem "pronto", "0.9.3", 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
|
||||
gem "guard-rspec", require: false
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ GEM
|
|||
rspec (>= 2.99, >= 2.14.2, < 4)
|
||||
octokit (4.7.0)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
parallel (1.11.2)
|
||||
parser (2.4.0.0)
|
||||
ast (~> 2.2)
|
||||
powerpack (0.1.1)
|
||||
|
|
@ -180,7 +181,8 @@ GEM
|
|||
rspec-mocks (~> 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)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
|
|
@ -250,7 +252,7 @@ DEPENDENCIES
|
|||
rspec-collection_matchers (~> 1.1.2)
|
||||
rspec-json_expectations (~> 2.1)
|
||||
rspec-rails (~> 3.6.0)
|
||||
rubocop (= 0.48.1)
|
||||
rubocop (= 0.49.1)
|
||||
simplecov (= 0.14.1)
|
||||
simplecov-rcov (= 0.2.3)
|
||||
spring
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ module Validation
|
|||
if value.is_a?(String)
|
||||
true if value =~ /\A(true|false|t|f|yes|no|y|n|1|0)\z/i
|
||||
elsif value.is_a?(Integer)
|
||||
true if value == 1 || value == 0
|
||||
elsif [true, false].include? value
|
||||
true if [1, 0].include?(value)
|
||||
elsif [true, false].include?(value)
|
||||
true
|
||||
else
|
||||
false
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ XML
|
|||
|
||||
it "passes input parameter directly to .parse method of the parser" do
|
||||
root = Nokogiri::XML("<dummy/>").root
|
||||
expect_any_instance_of(DiasporaFederation::Parsers::XmlParser).to receive(:parse).with(root)
|
||||
.and_return([{test1: "2", test2: "1"}])
|
||||
expect_any_instance_of(DiasporaFederation::Parsers::XmlParser)
|
||||
.to receive(:parse).with(root).and_return([{test1: "2", test2: "1"}])
|
||||
Entities::TestDefaultEntity.from_xml(root)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue