lib/caramelize/input_wiki/redmine_wiki.rb in caramelize-1.2.0 vs lib/caramelize/input_wiki/redmine_wiki.rb in caramelize-1.2.1
- old
+ new
@@ -40,11 +40,12 @@
authors
end
private
- def build_page(row_page)
+ # rubocop:todo Metrics/MethodLength
+ def build_page(row_page) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
results_contents = database.query(single_page_query(row_page['id']))
wiki = wikis.select { |row| row['id'] == row_page['wiki_id'] }.first
project_identifier = ''
@@ -60,10 +61,11 @@
results_contents.each do |row_content|
page = Page.new(build_properties(title, row_content))
revisions << page
end
end
+ # rubocop:enable Metrics/MethodLength
def add_projects_as_namespaces
projects.each do |row_project|
namespace = { identifier: row_project['identifier'],
name: row_project['name'] }
@@ -101,10 +103,10 @@
def wikis
@wikis ||= database.query(wikis_query)
end
- def build_properties(title, row_content)
+ def build_properties(title, row_content) # rubocop:todo Metrics/MethodLength
author = authors.fetch(row_content['author_id'], nil)
{
id: row_content['id'],
title:,
body: row_content['data'],