Skip to content

Commit

Permalink
Refactor to Strategy Pattern
Browse files Browse the repository at this point in the history
Extract classes for each file type and its associated logic.
  • Loading branch information
jaredmoody committed Jan 3, 2021
1 parent 9e4e1e3 commit da8546a
Show file tree
Hide file tree
Showing 18 changed files with 523 additions and 444 deletions.
62 changes: 23 additions & 39 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,52 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-12-30 04:27:41 UTC using RuboCop version 1.7.0.
# on 2021-01-03 08:54:57 UTC using RuboCop version 1.7.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'lib/audioinfo.rb'
- 'lib/audioinfo/album.rb'

# Offense count: 1
Lint/RescueException:
Exclude:
- 'lib/audioinfo.rb'

# Offense count: 1
Lint/ShadowedException:
Exclude:
- 'lib/audioinfo.rb'

# Offense count: 2
Lint/ShadowingOuterLocalVariable:
Exclude:
- 'lib/audioinfo.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
Lint/SuppressedException:
Exclude:
- 'lib/audioinfo.rb'

# Offense count: 5
# Offense count: 3
Lint/UselessAssignment:
Exclude:
- 'lib/audioinfo.rb'
- 'lib/audioinfo/mpcinfo.rb'

# Offense count: 7
# Offense count: 10
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 190
Max: 166

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 324
Max: 128

# Offense count: 4
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 36
Max: 14

# Offense count: 8
# Offense count: 16
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Metrics/MethodLength:
Max: 126
Max: 70

# Offense count: 4
# Offense count: 3
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 31
Max: 16

# Offense count: 6
# Offense count: 5
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'lib/audioinfo.rb'
- 'lib/audioinfo/mpcinfo.rb'

# Offense count: 1
Expand All @@ -84,27 +60,35 @@ Naming/PredicateName:
- 'spec/**/*'
- 'lib/audioinfo.rb'

# Offense count: 4
# Offense count: 13
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/audioinfo.rb'
- 'lib/audioinfo/album.rb'
- 'lib/audioinfo/ape.rb'
- 'lib/audioinfo/audio_file.rb'
- 'lib/audioinfo/case_insensitive_hash.rb'
- 'lib/audioinfo/flac.rb'
- 'lib/audioinfo/mp3.rb'
- 'lib/audioinfo/mp4.rb'
- 'lib/audioinfo/mpc.rb'
- 'lib/audioinfo/mpcinfo.rb'
- 'lib/audioinfo/ogg.rb'
- 'lib/audioinfo/wav.rb'
- 'lib/audioinfo/wma.rb'

# Offense count: 4
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
EnforcedStyle: unannotated

# Offense count: 8
# Offense count: 9
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/audioinfo.rb'
- 'lib/audioinfo/album.rb'
- 'lib/audioinfo/mpcinfo.rb'

Expand Down
Loading

0 comments on commit da8546a

Please sign in to comment.