drhenner/ror_ecommerce

View on GitHub

Showing 203 of 346 total issues

File foundation.reveal.js has 285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*jslint unparam: true, browser: true, indent: 2 */

;(function ($, window, document, undefined) {
  'use strict';

Severity: Minor
Found in app/assets/javascripts/foundation/foundation.reveal.js - About 2 hrs to fix

    Class Address has 25 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Address < ApplicationRecord
    
      belongs_to  :state
      belongs_to  :country
      belongs_to  :address_type
    Severity: Minor
    Found in app/models/address.rb - About 2 hrs to fix

      Class ApplicationController has 25 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class ApplicationController < ActionController::Base
        protect_from_forgery
        layout 'application'
      
        helper_method :current_user,
      Severity: Minor
      Found in app/controllers/application_controller.rb - About 2 hrs to fix

        Function datePicker has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                datePicker : function(s)
                {            
                    if (!$.event._dpCache) $.event._dpCache = [];
                    
                    // initialise the date picker controller with the relevant settings...
        Severity: Major
        Found in app/assets/javascripts/jquery.datePicker-2.1.2.js - About 2 hrs to fix

          Function show has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              show : function (init) {
                var $timer = null;
          
                // are we paused?
                if (this.settings.$li === undefined
          Severity: Major
          Found in app/assets/javascripts/foundation/foundation.joyride.js - About 2 hrs to fix

            Function events has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                events : function () {
                  var self = this;
                  $(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) {
                    var $destination = $(this),
                        $expedition = $destination.closest('[data-magellan-expedition]'),
            Severity: Major
            Found in app/assets/javascripts/foundation/foundation.magellan.js - About 2 hrs to fix

              Class Invoice has 24 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class Invoice < ApplicationRecord
                include AASM
              
                has_many :payments
                has_many :batches, as: :batchable#, :polymorphic => true
              Severity: Minor
              Found in app/models/invoice.rb - About 2 hrs to fix

                File foundation.placeholder.js has 273 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* 
                 * The MIT License
                 *
                 * Copyright (c) 2012 James Allardice
                 *
                Severity: Minor
                Found in app/assets/javascripts/foundation/foundation.placeholder.js - About 2 hrs to fix

                  Function append_custom_select has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      append_custom_select: function (idx, sel) {
                          var self = Foundation.libs.forms,
                              $this = $(sel),
                              $customSelect = $this.next('div.custom.dropdown'),
                              $customList = $customSelect.find('ul'),
                  Severity: Major
                  Found in app/assets/javascripts/foundation/foundation.forms.js - About 2 hrs to fix

                    Function ajax has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      $.ajax = function(options){
                        var settings = $.extend({}, options || {})
                        for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]
                    
                        ajaxStart(settings)
                    Severity: Major
                    Found in app/assets/javascripts/zepto.js - About 2 hrs to fix

                      Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          self.init = function() {
                            self.build_markup();
                            if (settings.timer) {timer = self.create_timer(); timer.start();}
                            animate = new FadeAnimation(settings, slides_container);
                            if (settings.animation === 'slide') 
                      Severity: Major
                      Found in app/assets/javascripts/foundation/foundation.orbit.js - About 2 hrs to fix

                        Function pos_default has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            pos_default : function (init, resizing) {
                              var half_fold = Math.ceil($(window).height() / 2),
                                  tip_position = this.settings.$next_tip.offset(),
                                  $nub = this.settings.$next_tip.find('.joyride-nub'),
                                  nub_width = Math.ceil(this.outerWidth($nub) / 2),
                        Severity: Major
                        Found in app/assets/javascripts/foundation/foundation.joyride.js - About 2 hrs to fix

                          Function cb has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function cb() {
                                      if (cbInvoked) 
                                          return;
                          
                                      var ok = true;
                          Severity: Major
                          Found in app/assets/javascripts/jqwizard/jquery.form.js - About 2 hrs to fix

                            Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                init : function (options) {
                            
                                  return this.each(function () {
                                    var targets, tips, tipTemplate, poll;
                            
                            
                            Severity: Major
                            Found in app/assets/javascripts/admin/jquery.tooltips.js - About 2 hrs to fix

                              Function winnow_results has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  Chosen.prototype.winnow_results = function() {
                                    var found, option, part, parts, regex, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len2, _ref;
                                    this.no_results_clear();
                                    results = 0;
                                    searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
                              Severity: Major
                              Found in app/assets/javascripts/chosen/chosen.jquery.js - About 2 hrs to fix

                                Class Referral has 21 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Referral < ApplicationRecord
                                  belongs_to :referring_user, :foreign_key => "referring_user_id", :class_name => "User"
                                  belongs_to :referral_user,  :foreign_key => "referral_user_id", :class_name => "User"
                                  belongs_to :referral_program
                                  belongs_to :referral_type
                                Severity: Minor
                                Found in app/models/referral.rb - About 2 hrs to fix

                                  Class OrderItem has 21 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class OrderItem < ApplicationRecord
                                    include AASM
                                  
                                    belongs_to :order
                                    belongs_to :shipping_rate
                                  Severity: Minor
                                  Found in app/models/order_item.rb - About 2 hrs to fix

                                    Function events has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        events : function () {
                                          var self = this;
                                    
                                          $(this.scope)
                                            .off('.fndtn.reveal')
                                    Severity: Major
                                    Found in app/assets/javascripts/foundation/foundation.reveal.js - About 2 hrs to fix

                                      Function expose has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          expose : function () {
                                            var expose,
                                                exposeCover,
                                                el,
                                                origCSS,
                                      Severity: Major
                                      Found in app/assets/javascripts/foundation/foundation.joyride.js - About 2 hrs to fix

                                        Function validate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            validate: function( options ) {
                                        
                                                // if nothing is selected, return nothing; can't chain anyway
                                                if (!this.length) {
                                                    options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
                                        Severity: Major
                                        Found in app/assets/javascripts/jqwizard/jquery.validate.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language