Showing 106 of 4,066 total issues

File polls_spec.rb has 384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'rails_helper'
include ActionView::Helpers::DateHelper

feature 'Commenting polls' do
  let(:user) { create :user }
Severity: Minor
Found in spec/features/comments/polls_spec.rb - About 5 hrs to fix

    File budgets_spec.rb has 376 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'rails_helper'
    
    feature 'Budgets' do
    
      let(:budget)             { create(:budget) }
    Severity: Minor
    Found in spec/features/budgets/budgets_spec.rb - About 5 hrs to fix

      File proposals_spec.rb has 374 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require 'rails_helper'
      include ActionView::Helpers::DateHelper
      
      feature 'Commenting proposals' do
        let(:user) { create :user }
      Severity: Minor
      Found in spec/features/comments/proposals_spec.rb - About 5 hrs to fix

        File polls_spec.rb has 368 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'rails_helper'
        
        feature 'Polls' do
        
          context "Concerns" do
        Severity: Minor
        Found in spec/features/polls/polls_spec.rb - About 4 hrs to fix

          File votes_spec.rb has 365 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require 'rails_helper'
          
          feature 'Votes' do
          
            background do
          Severity: Minor
          Found in spec/features/votes_spec.rb - About 4 hrs to fix

            Class Budget has 32 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class Budget < ActiveRecord::Base
            
              include Measurable
              include Sluggable
            
            
            Severity: Minor
            Found in app/models/budget.rb - About 4 hrs to fix

              Class Proposal has 30 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class Proposal < ActiveRecord::Base
                include Rails.application.routes.url_helpers
                include Flaggable
                include Taggable
                include Conflictable
              Severity: Minor
              Found in app/models/proposal.rb - About 3 hrs to fix

                File polls_spec.rb has 315 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require 'rails_helper'
                
                feature 'Admin polls' do
                
                  background do
                Severity: Minor
                Found in spec/features/admin/poll/polls_spec.rb - About 3 hrs to fix

                  Class Stats has 28 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                    class Stats
                  
                      def initialize(poll)
                        @poll = poll
                      end
                  Severity: Minor
                  Found in app/models/poll/stats.rb - About 3 hrs to fix

                    File users_auth_spec.rb has 301 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require 'rails_helper'
                    
                    feature 'Users' do
                    
                      context 'Regular authentication' do
                    Severity: Minor
                    Found in spec/custom/features/users_auth_spec.rb - About 3 hrs to fix

                      Function editorConfig has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      CKEDITOR.editorConfig = function( config )
                      {
                        config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
                        config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
                        config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
                      Severity: Major
                      Found in app/assets/javascripts/ckeditor/config.js - About 3 hrs to fix

                        Method initialize has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def initialize(user)
                              merge Abilities::Everyone.new(user)
                        
                              can [:read, :update], User, id: user.id
                        
                        
                        Severity: Major
                        Found in app/models/custom/abilities/common.rb - About 2 hrs to fix

                          File users_auth_spec.rb has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require 'rails_helper'
                          
                          feature 'Users' do
                          
                            context 'Regular authentication' do
                          Severity: Minor
                          Found in spec/features/users_auth_spec.rb - About 2 hrs to fix

                            Method initialize has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def initialize(user)
                                  merge Abilities::Everyone.new(user)
                            
                                  can [:read, :update], User, id: user.id
                            
                            
                            Severity: Major
                            Found in app/models/abilities/common.rb - About 2 hrs to fix

                              File user.rb has 285 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              class User < ActiveRecord::Base
                              
                                include Verification
                              
                                devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable,
                              Severity: Minor
                              Found in app/models/user.rb - About 2 hrs to fix

                                File investment.rb has 285 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                class Budget
                                  class Investment < ActiveRecord::Base
                                    SORTING_OPTIONS = %w(id title supports).freeze
                                
                                    include Rails.application.routes.url_helpers
                                Severity: Minor
                                Found in app/models/budget/investment.rb - About 2 hrs to fix

                                  File budgets_spec.rb has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require 'rails_helper'
                                  
                                  feature 'Admin budgets' do
                                  
                                    background do
                                  Severity: Minor
                                  Found in spec/features/admin/budgets_spec.rb - About 2 hrs to fix

                                    Method initialize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def initialize(user)
                                          merge Abilities::Moderation.new(user)
                                    
                                          can :restore, Comment
                                          cannot :restore, Comment, hidden_at: nil
                                    Severity: Major
                                    Found in app/models/abilities/administrator.rb - About 2 hrs to fix

                                      File nested_documentable.rb has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      shared_examples "nested documentable" do |login_as_name, documentable_factory_name,
                                                                                path, documentable_path_arguments,
                                                                                fill_resource_method_name, submit_button,
                                                                                documentable_success_notice|
                                        include ActionView::Helpers
                                      Severity: Minor
                                      Found in spec/shared/features/nested_documentable.rb - About 2 hrs to fix

                                        Method initialize has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def initialize(user)
                                              merge Abilities::Moderation.new(user)
                                        
                                              can :restore, Comment
                                              cannot :restore, Comment, hidden_at: nil
                                        Severity: Major
                                        Found in app/models/custom/abilities/administrator.rb - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language