Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rubocop namespaces #1102

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Metrics/ModuleLength:
Metrics/PerceivedComplexity:
Enabled: false

Naming/AccessorMethodName:
Style/AccessorMethodName:
Exclude:
- lib/prawn/graphics/color.rb

Layout/AlignParameters:
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation

# We need to reference non-ascii characters when testing and explaining
Expand All @@ -67,16 +67,16 @@ Style/Encoding:
- lib/prawn/images.rb
- spec/png_spec.rb

Layout/FirstArrayElementLineBreak:
Style/FirstArrayElementLineBreak:
Enabled: true

Layout/FirstHashElementLineBreak:
Style/FirstHashElementLineBreak:
Enabled: true

Layout/FirstMethodArgumentLineBreak:
Style/FirstMethodArgumentLineBreak:
Enabled: true

Layout/FirstParameterIndentation:
Style/FirstParameterIndentation:
EnforcedStyle: consistent

Style/GuardClause:
Expand All @@ -93,16 +93,16 @@ Lint/HandleExceptions:
Style/IfUnlessModifier:
Enabled: false

Layout/IndentArray:
Style/IndentArray:
EnforcedStyle: consistent

Layout/IndentHash:
Style/IndentHash:
EnforcedStyle: consistent

Layout/MultilineMethodCallIndentation:
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented

Layout/MultilineOperationIndentation:
Style/MultilineOperationIndentation:
EnforcedStyle: indented
Exclude:
- prawn.gemspec
Expand All @@ -120,12 +120,12 @@ Style/PercentLiteralDelimiters:
'%W': '[]'
'%x': '()'

Naming/PredicateName:
Style/PredicateName:
Exclude:
- lib/prawn/font/ttf.rb
- lib/prawn/font/afm.rb

Layout/SpaceAroundOperators:
Style/SpaceAroundOperators:
AllowForAlignment: false

Style/WhileUntilModifier:
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/font/ttf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def basename
end

# not sure how to compute this for true-type fonts...
def stemV # rubocop: disable Naming/MethodName
def stemV # rubocop: disable Style/MethodName
0
end

Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/text/formatted/arranger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This is free software. Please see the LICENSE and COPYING files for details.

# rubocop: disable Naming/AccessorMethodName
# rubocop: disable Style/AccessorMethodName

module Prawn
module Text
Expand Down
4 changes: 2 additions & 2 deletions spec/prawn/text_draw_text_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
expect(text.font_settings[0][:size]).to eq(16)
end

# rubocop: disable Naming/AccessorMethodName
# rubocop: disable Style/AccessorMethodName
rotated_text_inspector = Class.new(PDF::Inspector) do
attr_reader :tm_operator_used

Expand All @@ -56,7 +56,7 @@ def set_text_matrix_and_text_line_matrix(*_a)
@tm_operator_used = true
end
end
# rubocop: enable Naming/AccessorMethodName
# rubocop: enable Style/AccessorMethodName

it 'allows rotation' do
pdf.draw_text('Test', at: [100, 100], rotate: 90)
Expand Down