Refactoring: Namespace cleanup. Mixins should be placed the most specific path possible.
This commit is contained in:
parent
e47b366d6a
commit
92930a0e8f
8 changed files with 28 additions and 35 deletions
|
@ -1,18 +0,0 @@
|
|||
class Sequencer
|
||||
module Mixin
|
||||
module Exchange
|
||||
module Folder
|
||||
|
||||
def self.included(base)
|
||||
base.uses :ews_connection
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ews_folder
|
||||
@ews_folder ||= ::Import::Exchange::Folder.new(ews_connection)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,11 +1,9 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
|
||||
class Sequencer
|
||||
class Unit
|
||||
module Exchange
|
||||
module Folders
|
||||
class ByIds < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
|
||||
uses :ews_folder_ids
|
||||
provides :ews_folders
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
|
||||
class Sequencer
|
||||
class Unit
|
||||
module Exchange
|
||||
module Folders
|
||||
class IdPathMap < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
|
||||
provides :ews_folder_id_path_map
|
||||
|
||||
|
|
22
lib/sequencer/unit/exchange/folders/mixin/folder.rb
Normal file
22
lib/sequencer/unit/exchange/folders/mixin/folder.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
class Sequencer
|
||||
class Unit
|
||||
module Exchange
|
||||
module Folders
|
||||
module Mixin
|
||||
module Folder
|
||||
|
||||
def self.included(base)
|
||||
base.uses :ews_connection
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ews_folder
|
||||
@ews_folder ||= ::Import::Exchange::Folder.new(ews_connection)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,11 +1,9 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
|
||||
class Sequencer
|
||||
class Unit
|
||||
module Import
|
||||
module Exchange
|
||||
class AttributeExamples < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
|
||||
uses :ews_folder_ids
|
||||
provides :ews_attributes_examples
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
|
||||
class Sequencer
|
||||
class Unit
|
||||
module Import
|
||||
module Exchange
|
||||
module FolderContacts
|
||||
class FolderIds < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
|
||||
provides :ews_folder_ids
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
require 'sequencer/mixin/import_job/resource_loop'
|
||||
|
||||
class Sequencer
|
||||
|
@ -7,7 +6,7 @@ class Sequencer
|
|||
module Exchange
|
||||
module FolderContacts
|
||||
class SubSequence < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
include ::Sequencer::Mixin::ImportJob::ResourceLoop
|
||||
|
||||
uses :ews_folder_ids, :import_job
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
require 'sequencer/mixin/exchange/folder'
|
||||
|
||||
class Sequencer
|
||||
class Unit
|
||||
module Import
|
||||
module Exchange
|
||||
module FolderContacts
|
||||
class Sum < Sequencer::Unit::Base
|
||||
include ::Sequencer::Mixin::Exchange::Folder
|
||||
include ::Sequencer::Unit::Exchange::Folders::Mixin::Folder
|
||||
|
||||
uses :ews_folder_ids
|
||||
provides :statistics_diff
|
||||
|
|
Loading…
Reference in a new issue