Skip to content

Commit

Permalink
fix up rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
claytron committed Oct 26, 2022
1 parent a395a39 commit 64e6a19
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
12 changes: 12 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Style/TrailingCommaInArrayLiteral:
Style/RedundantSelf:
Enabled: false

Style/Documentation:
Enabled: false

Layout/IndentationWidth:
Enabled: false

Expand All @@ -41,6 +44,15 @@ Layout/CaseIndentation:
EnforcedStyle: end
IndentOneStep: true

Metrics/AbcSize:
Max: 25

Metrics/CyclomaticComplexity:
Max: 25

Metrics/MethodLength:
Max: 20

# Ignore for rspec
Metrics/BlockLength:
IgnoredMethods: ['describe', 'context']
1 change: 1 addition & 0 deletions augury.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
spec.add_dependency 'twitter', '~>7.0'
## For the word_wrap function
spec.add_dependency 'word_wrap', '~>1.0'
spec.metadata['rubygems_mfa_required'] = 'true'
end
2 changes: 2 additions & 0 deletions exe/augury
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'augury/cli'
Augury::CLI.start
2 changes: 1 addition & 1 deletion lib/augury/fortune.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def twitter_setup

def transforms
all_transforms = []
all_transforms << [/https?:\/\/[^\s]+/, ''] if @config[:remove_links]
all_transforms << [%r{https?://[^\s]+}, ''] if @config[:remove_links]
return all_transforms unless @config[:apply_transforms]

all_transforms.push(*@config.dig('transforms', @username) || [])
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/augury/fortune_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
let(:twitter_auth) do
{
twitter: {
'consumer_key' => ENV['TWITTER_CONSUMER_KEY'],
'consumer_secret' => ENV['TWITTER_CONSUMER_SECRET'],
'access_token' => ENV['TWITTER_ACCESS_TOKEN'],
'access_token_secret' => ENV['TWITTER_ACCESS_TOKEN_SECRET'],
'consumer_key' => ENV.fetch('TWITTER_CONSUMER_KEY', nil),
'consumer_secret' => ENV.fetch('TWITTER_CONSUMER_SECRET', nil),
'access_token' => ENV.fetch('TWITTER_ACCESS_TOKEN', nil),
'access_token_secret' => ENV.fetch('TWITTER_ACCESS_TOKEN_SECRET', nil),
},
}
end
Expand Down
6 changes: 0 additions & 6 deletions spec/lib/augury_spec.rb

This file was deleted.

0 comments on commit 64e6a19

Please sign in to comment.