Skip to content

Commit

Permalink
Fix rubocop nits
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Oct 18, 2023
1 parent 274d480 commit 5fc1f10
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/helpers/social_helper/twitter_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ def prepare_tweet(answer, post_tag = nil, omit_url = false)
original_question_length = question_content.length
answer_content = twitter_markdown answer.content
original_answer_length = answer_content.length
answer_url = answer_url(
id: answer.id,
username: answer.user.screen_name,
host: APP_CONFIG['hostname'],
protocol: (APP_CONFIG['https'] ? :https : :http)
) unless omit_url

unless omit_url
answer_url = answer_url(
id: answer.id,

Check notice on line 14 in app/helpers/social_helper/twitter_methods.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/helpers/social_helper/twitter_methods.rb#L14 <Layout/HashAlignment>

Align the keys and values of a hash literal if they span more than one line.
Raw output
app/helpers/social_helper/twitter_methods.rb:14:9: C: Layout/HashAlignment: Align the keys and values of a hash literal if they span more than one line.
username: answer.user.screen_name,
host: APP_CONFIG['hostname'],

Check notice on line 16 in app/helpers/social_helper/twitter_methods.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/helpers/social_helper/twitter_methods.rb#L16 <Layout/HashAlignment>

Align the keys and values of a hash literal if they span more than one line.
Raw output
app/helpers/social_helper/twitter_methods.rb:16:9: C: Layout/HashAlignment: Align the keys and values of a hash literal if they span more than one line.

Check notice on line 16 in app/helpers/social_helper/twitter_methods.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/helpers/social_helper/twitter_methods.rb#L16 <Style/StringLiterals>

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Raw output
app/helpers/social_helper/twitter_methods.rb:16:26: C: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
protocol: (APP_CONFIG['https'] ? :https : :http)

Check notice on line 17 in app/helpers/social_helper/twitter_methods.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/helpers/social_helper/twitter_methods.rb#L17 <Style/TrailingCommaInArguments>

Put a comma after the last parameter of a multiline method call.
Raw output
app/helpers/social_helper/twitter_methods.rb:17:9: C: Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.

Check notice on line 17 in app/helpers/social_helper/twitter_methods.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/helpers/social_helper/twitter_methods.rb#L17 <Style/StringLiterals>

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Raw output
app/helpers/social_helper/twitter_methods.rb:17:31: C: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
)
end

parsed_tweet = { :valid => false }
tweet_text = ""
Expand Down

0 comments on commit 5fc1f10

Please sign in to comment.