amatriain/feedbunch

View on GitHub

Showing 55 of 122 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  rescue => e
    Rails.logger.error "Error trying to read OPML data from file uploaded by user #{user.id} - #{user.email}"
    Rails.logger.error e.message
    Rails.logger.error e.backtrace
    user.opml_import_job_state&.destroy
Severity: Minor
Found in FeedBunch-app/lib/opml_importer.rb and 1 other location - About 40 mins to fix
FeedBunch-app/lib/opml_exporter.rb on lines 28..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  rescue => e
    Rails.logger.error "Error trying to export subscriptions in OPML format for user #{user.id} - #{user.email}"
    Rails.logger.error e.message
    Rails.logger.error e.backtrace
    user.opml_export_job_state&.destroy
Severity: Minor
Found in FeedBunch-app/lib/opml_exporter.rb and 1 other location - About 40 mins to fix
FeedBunch-app/lib/opml_importer.rb on lines 40..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def up
    add_column :users, :user_data_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.user_data_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def down
    add_column :folders, :subscriptions_etag, :text, null: true

    Folder.all.each do |f|
      etag = OpenSSL::Digest::MD5.new.hexdigest f.subscriptions_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def down
    add_column :users, :subscriptions_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.subscriptions_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def up
    add_column :users, :config_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.config_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def down
    add_column :users, :config_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.config_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def up
    add_column :users, :subscriptions_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.subscriptions_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def down
    add_column :users, :folders_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.folders_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def up
    add_column :folders, :subscriptions_etag, :text, null: true

    Folder.all.each do |f|
      etag = OpenSSL::Digest::MD5.new.hexdigest f.subscriptions_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def down
    add_column :users, :user_data_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.user_data_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128215215_change_user_folders_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

  def up
    add_column :users, :folders_etag, :text, null: true

    User.all.each do |u|
      etag = OpenSSL::Digest::MD5.new.hexdigest u.folders_updated_at.to_f.to_s
FeedBunch-app/db/migrate/20150128154725_change_folder_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128162753_change_user_subscriptions_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128220337_change_user_config_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150128221026_change_user_data_last_modified_to_etag.rb on lines 2..11
FeedBunch-app/db/migrate/20150206140025_change_folder_etag_to_last_modified.rb on lines 11..20
FeedBunch-app/db/migrate/20150206142042_change_user_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206144903_change_user_folders_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151007_change_user_config_etag_to_last_modified.rb on lines 12..21
FeedBunch-app/db/migrate/20150206151549_change_user_data_etag_to_last_modified.rb on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      column do
        panel 'Recent confirmed users' do
          ul do
            User.where('confirmed_at is not null').order('created_at DESC').limit(100).map do |user|
              li link_to("#{user.name} (#{user.email})", admin_user_path(user))
Severity: Minor
Found in FeedBunch-app/app/admin/dashboard.rb and 1 other location - About 25 mins to fix
FeedBunch-app/app/admin/dashboard.rb on lines 73..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      column do
       panel 'Recent signed up unconfirmed users' do
         ul do
           User.where('confirmed_at is null').order('created_at DESC').limit(10).map do |user|
             li link_to("#{user.name} (#{user.email})", admin_user_path(user))
Severity: Minor
Found in FeedBunch-app/app/admin/dashboard.rb and 1 other location - About 25 mins to fix
FeedBunch-app/app/admin/dashboard.rb on lines 52..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      if include_read && !page.present?
        entries = folder.entries.order 'entries.published desc, entries.created_at desc, entries.id desc'
      elsif include_read && page.present?
        entries = folder.entries.order('entries.published desc, entries.created_at desc, entries.id desc').page page
      else
Severity: Minor
Found in FeedBunch-app/lib/entries_pagination.rb and 1 other location - About 25 mins to fix
FeedBunch-app/lib/entries_pagination.rb on lines 25..31

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if include_read && !page.present?
      entries =  feed.entries.order 'entries.published desc, entries.created_at desc, entries.id desc'
    elsif include_read && page.present?
      entries =  feed.entries.order('entries.published desc, entries.created_at desc, entries.id desc').page page
    else
Severity: Minor
Found in FeedBunch-app/lib/entries_pagination.rb and 1 other location - About 25 mins to fix
FeedBunch-app/lib/entries_pagination.rb on lines 64..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    if !user_subscribed? feed, user
      Rails.logger.warn "User #{user.id} - #{user.id} tried to unsubscribe from feed #{feed.id} - #{feed.fetch_url} but he is not subscribed"
      raise NotSubscribedError.new
Severity: Minor
Found in FeedBunch-app/lib/subscriptions_manager.rb and 3 other locations - About 25 mins to fix
FeedBunch-app/lib/subscriptions_manager.rb on lines 52..54
FeedBunch-app/lib/subscriptions_manager.rb on lines 76..78
FeedBunch-app/lib/subscriptions_manager.rb on lines 96..98

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    if !user_subscribed? feed, user
      Rails.logger.warn "User #{user.id} - #{user.id} tried to enqueue job to unsubscribe from feed #{feed.id} - #{feed.fetch_url} but he is not subscribed"
      raise NotSubscribedError.new
Severity: Minor
Found in FeedBunch-app/lib/subscriptions_manager.rb and 3 other locations - About 25 mins to fix
FeedBunch-app/lib/subscriptions_manager.rb on lines 34..36
FeedBunch-app/lib/subscriptions_manager.rb on lines 76..78
FeedBunch-app/lib/subscriptions_manager.rb on lines 96..98

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    if !user_subscribed? feed, user
      Rails.logger.warn "User #{user.id} - #{user.id} tried to change unread count for feed #{feed.id} - #{feed.fetch_url} but he is not subscribed"
      raise NotSubscribedError.new
Severity: Minor
Found in FeedBunch-app/lib/subscriptions_manager.rb and 3 other locations - About 25 mins to fix
FeedBunch-app/lib/subscriptions_manager.rb on lines 34..36
FeedBunch-app/lib/subscriptions_manager.rb on lines 52..54
FeedBunch-app/lib/subscriptions_manager.rb on lines 76..78

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    if !user_subscribed? feed, user
      Rails.logger.warn "User #{user.id} - #{user.id} tried to retrieve unread count from feed #{feed.id} - #{feed.fetch_url} but he is not subscribed"
      raise NotSubscribedError.new
Severity: Minor
Found in FeedBunch-app/lib/subscriptions_manager.rb and 3 other locations - About 25 mins to fix
FeedBunch-app/lib/subscriptions_manager.rb on lines 34..36
FeedBunch-app/lib/subscriptions_manager.rb on lines 52..54
FeedBunch-app/lib/subscriptions_manager.rb on lines 96..98

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language