Skip to content

Commit

Permalink
Rubocop: lines
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Jan 10, 2017
1 parent 55b04a5 commit 83ad945
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 24 deletions.
21 changes: 0 additions & 21 deletions .rubocop_todo.yml
Expand Up @@ -363,27 +363,6 @@ Style/EmptyElse:
Exclude:
- 'app/models/polymorphic/task.rb'

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: AllowAdjacentOneLineDefs.
Style/EmptyLineBetweenDefs:
Exclude:
- 'app/models/entities/contact.rb'
- 'app/models/entities/lead.rb'
- 'app/models/entities/opportunity.rb'
- 'app/models/polymorphic/task.rb'
- 'lib/fat_free_crm/callback.rb'
- 'spec/support/auth_macros.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, no_empty_lines
Style/EmptyLinesAroundBlockBody:
Exclude:
- 'config/initializers/views.rb'
- 'db/schema.rb'

# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down
1 change: 1 addition & 0 deletions app/models/entities/contact.rb
Expand Up @@ -101,6 +101,7 @@ class Contact < ActiveRecord::Base
def self.per_page
20
end

def self.first_name_position
"before"
end
Expand Down
1 change: 1 addition & 0 deletions app/models/entities/lead.rb
Expand Up @@ -85,6 +85,7 @@ class Lead < ActiveRecord::Base
def self.per_page
20
end

def self.first_name_position
"before"
end
Expand Down
1 change: 1 addition & 0 deletions app/models/entities/opportunity.rb
Expand Up @@ -91,6 +91,7 @@ class Opportunity < ActiveRecord::Base
def self.per_page
20
end

def self.default_stage
Setting[:opportunity_default_stage].try(:to_s) || 'prospecting'
end
Expand Down
1 change: 1 addition & 0 deletions app/models/polymorphic/task.rb
Expand Up @@ -166,6 +166,7 @@ def computed_bucket
"due_later"
end
end

# Returns list of tasks grouping them by due date as required by tasks/index.
#----------------------------------------------------------------------------
def self.find_all_grouped(user, view)
Expand Down
1 change: 0 additions & 1 deletion config/initializers/views.rb
Expand Up @@ -43,5 +43,4 @@
controllers: ['campaigns'], actions: ['index'], template: 'campaigns/index_long' },
{ name: 'campaigns_show_normal', title: 'Normal format', icon: 'fa-list',
controllers: ['campaigns'], actions: ['show'], template: nil }, # default show view

].each { |view| FatFreeCRM::ViewFactory.new(view) }
2 changes: 0 additions & 2 deletions db/schema.rb
Expand Up @@ -12,7 +12,6 @@
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160511053730) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -455,5 +454,4 @@
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id", using: :btree
add_index "versions", ["whodunnit"], name: "index_versions_on_whodunnit", using: :btree

end
1 change: 1 addition & 0 deletions lib/fat_free_crm/callback.rb
Expand Up @@ -43,6 +43,7 @@ def self.hook(method, caller, context = {})
def self.view_responder(method)
@@responder[method] ||= @@classes.map(&:instance).select { |instance| instance.class.view_hooks[method] }
end

# Invokes the view hook Proc stored under :hook and captures its output.
# => Instead of defining methods on the class, view hooks are
# stored as Procs in a hash. This allows the same hook to be manipulated in
Expand Down
1 change: 1 addition & 0 deletions spec/support/auth_macros.rb
Expand Up @@ -31,6 +31,7 @@ def login_and_assign(user_stubs = {}, session_stubs = {})
#set_timezone
assigns[:current_user] = current_user
end

def login_and_assign!(user_stubs = {}, session_stubs = {})
login
assigns[:current_user] = current_user
Expand Down

0 comments on commit 83ad945

Please sign in to comment.