GordonDiggs/rayons

View on GitHub
lib/tasks/item.rake

Summary

Maintainability
Test Coverage

Block has too many lines. [83/25]
Open

namespace :item do
  desc "This migrates things in parentheses in title to notes"
  task migrate_notes: :environment do
    Item.unscoped.all.find_each do |item|
      if item.title =~ /\((.*)\)/
Severity: Minor
Found in lib/tasks/item.rake by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [29/25]
Open

  task backfill_tracks: :environment do
    count = 1

    Item.where.not(discogs_url: [nil, ""]).find_each do |item|
      next if item.tracks.exists?
Severity: Minor
Found in lib/tasks/item.rake by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [26/25]
Open

    Item.where.not(discogs_url: [nil, ""]).find_each do |item|
      next if item.tracks.exists?

      if (count % 25).zero?
        puts "Sleeping 1 minute to wait for Discogs rate limit"
Severity: Minor
Found in lib/tasks/item.rake by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

There are no issues that match your filters.

Category
Status