Moved back to compact module/class definition to prevent "superclass mismatch for class Ticket (TypeError)".

This commit is contained in:
Martin Edenhofer 2015-04-28 01:19:26 +02:00
parent 95e27b0994
commit ba1d7abf91
22 changed files with 1119 additions and 1173 deletions

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module ActivityStreamLog
# rubocop:disable ClassAndModuleChildren
module Ticket::ActivityStreamLog
=begin
@ -36,5 +35,4 @@ returns
created_by_id: user_id,
)
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Article < ApplicationModel
# rubocop:disable ClassAndModuleChildren
class Ticket::Article < ApplicationModel
load 'ticket/article/assets.rb'
include Ticket::Article::Assets
load 'ticket/article/history_log.rb'
@ -48,5 +47,4 @@ class Ticket
validates :name, presence: true
latest_change_support
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Article
module ActivityStreamLog
# rubocop:disable ClassAndModuleChildren
module Ticket::Article::ActivityStreamLog
=begin
@ -38,6 +36,4 @@ returns
created_by_id: user_id,
)
end
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Article
module Assets
module Ticket::Article::Assets
=begin
@ -52,6 +50,4 @@ returns
}
data
end
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Article
module HistoryLog
module Ticket::Article::HistoryLog
=begin
@ -29,6 +27,4 @@ returns
data[:created_by_id] = user_id
History.add(data)
end
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Assets
# rubocop:disable ClassAndModuleChildren
module Ticket::Assets
=begin
@ -39,5 +38,4 @@ returns
}
data
end
end
end

View file

@ -1,6 +1,4 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Counter < ApplicationModel
end
# rubocop:disable ClassAndModuleChildren
class Ticket::Counter < ApplicationModel
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Escalation
# rubocop:disable ClassAndModuleChildren
module Ticket::Escalation
=begin
@ -321,5 +320,4 @@ returns
return check_time if escalation_time > check_time
escalation_time
end
end
end

View file

@ -1,6 +1,4 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Flag < ApplicationModel
end
class Ticket::Flag < ApplicationModel
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module HistoryLog
# rubocop:disable ClassAndModuleChildren
module Ticket::HistoryLog
=begin
@ -78,5 +77,4 @@ returns
assets: assets,
}
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Number
class Ticket::Number
include ApplicationLib
=begin
@ -56,5 +55,4 @@ returns
end
adapter
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Number
module Date
# rubocop:disable ClassAndModuleChildren
module Ticket::Number::Date
extend self
def generate
@ -83,6 +81,4 @@ class Ticket
end
ticket
end
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Number
module Increment
module Ticket::Number::Increment
extend self
def generate
@ -86,6 +84,4 @@ class Ticket
end
ticket
end
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Overviews
# rubocop:disable ClassAndModuleChildren
module Ticket::Overviews
=begin
@ -249,5 +248,4 @@ returns
bind[0] = sql
bind
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Permission
# rubocop:disable ClassAndModuleChildren
module Ticket::Permission
=begin
@ -44,5 +43,4 @@ returns
}
false
end
end
end

View file

@ -1,8 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class Priority < ApplicationModel
# rubocop:disable ClassAndModuleChildren
class Ticket::Priority < ApplicationModel
self.table_name = 'ticket_priorities'
validates :name, presence: true
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module ScreenOptions
# rubocop:disable ClassAndModuleChildren
module Ticket::ScreenOptions
=begin
@ -174,5 +173,4 @@ returns
assets: assets,
}
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Search
# rubocop:disable ClassAndModuleChildren
module Ticket::Search
=begin
@ -143,5 +142,4 @@ returns
}
tickets
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module SearchIndex
# rubocop:disable ClassAndModuleChildren
module Ticket::SearchIndex
=begin
@ -106,5 +105,4 @@ returns
return if !attributes
SearchIndexBackend.add(self.class.to_s, attributes)
end
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class State < ApplicationModel
# rubocop:disable ClassAndModuleChildren
class Ticket::State < ApplicationModel
belongs_to :state_type, class_name: 'Ticket::StateType'
validates :name, presence: true
@ -51,5 +50,4 @@ returns:
return true if ignore_escalation.include?( self.name )
false
end
end
end

View file

@ -1,9 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
class StateType < ApplicationModel
# rubocop:disable ClassAndModuleChildren
class Ticket::StateType < ApplicationModel
has_many :states, class_name: 'Ticket::State'
validates :name, presence: true
latest_change_support
end
end

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Ticket
module Subject
# rubocop:disable ClassAndModuleChildren
module Ticket::Subject
=begin
@ -76,5 +75,4 @@ returns
subject
end
end
end