lib/caramelize/content_transferer.rb in caramelize-1.2.0 vs lib/caramelize/content_transferer.rb in caramelize-1.2.1
- old
+ new
@@ -8,11 +8,11 @@
require 'caramelize/database_connector'
require 'caramelize/output_wiki/gollum'
require 'caramelize/input_wiki/redmine_wiki'
require 'caramelize/input_wiki/wikkawiki'
- class ContentTransferer
+ class ContentTransferer # rubocop:todo Metrics/ClassLength
attr_reader :input_wiki, :options
DEFAULT_GOLLUM_HOME_TITLE = 'Home'
DEFAULT_AUTHOR_NAME = 'Caramelize'
DEFAULT_AUTHOR_EMAIL = 'caramelize@example.com'
@@ -92,11 +92,12 @@
@commit_history_progress_bar ||=
ProgressBar.create(title: 'Revisions',
total: revisions_count)
end
- def migrate_markup_of_latest_revisions
+ # rubocop:todo Metrics/MethodLength
+ def migrate_markup_of_latest_revisions # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
puts 'Convert latest revisions:' if verbose?
input_wiki.latest_revisions.each do |revision|
if input_wiki.excluded_pages.include?(revision.title)
puts "Exclude Page: #{revision.title}" if verbose?
next
@@ -109,12 +110,14 @@
end
migrate_markup_of_revision(revision)
end
end
+ # rubocop:enable Metrics/MethodLength
- def commit_history
+ # rubocop:todo Metrics/MethodLength
+ def commit_history # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
output_wiki.commit_history(revisions, options) do |page, index|
if input_wiki.excluded_pages.include?(page.title)
puts "Exclude Page: #{page.title}" if verbose?
next
end
@@ -124,9 +127,10 @@
else
commit_history_progress_bar.increment
end
end
end
+ # rubocop:enable Metrics/MethodLength
def migrate_markup_of_revision(revision)
body_new = filter_processor.run(revision.body)
return if body_new == revision.body