Class: Caramelize::ContentTransferer

Inherits:
Object
  • Object
show all
Defined in:
lib/caramelize/content_transferer.rb

Constant Summary collapse

DEFAULT_GOLLUM_HOME_TITLE =
'Home'
DEFAULT_AUTHOR_NAME =
'Caramelize'
DEFAULT_AUTHOR_EMAIL =
'[email protected]'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_wiki, options) ⇒ ContentTransferer

Returns a new instance of ContentTransferer.



20
21
22
23
24
25
26
# File 'lib/caramelize/content_transferer.rb', line 20

def initialize(input_wiki, options)
  @input_wiki = input_wiki
  @options = options

  options[:default_author] = options.fetch(:default_author, 'Caramelize')
  options[:markup] = target_markup
end

Instance Attribute Details

#input_wikiObject (readonly)

Returns the value of attribute input_wiki.



14
15
16
# File 'lib/caramelize/content_transferer.rb', line 14

def input_wiki
  @input_wiki
end

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/caramelize/content_transferer.rb', line 14

def options
  @options
end

Instance Method Details

#executeObject



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/caramelize/content_transferer.rb', line 28

def execute
  input_wiki.read_authors
  commit_history
   if verbose?

  migrate_markup_of_latest_revisions

  create_overview_page_of_namespaces if options[:create_namespace_overview]

  rename_home_page if options[:home_page_title]
end