Skip to content

Commit b176609

Browse files
author
Tom Copeland
committed
Just some trivial reformatting
1 parent d8cfde3 commit b176609

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

lib/tasks/migrate_from_gforge.rake

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -73,50 +73,34 @@ namespace :redmine do
7373
Member.create!(:principal => user, :project => project, :role_ids => [Role.find_by_name(role_name).id])
7474
end
7575
gforge_group.document_groups.each do |document_group|
76-
document_category = showing_migrated_ids(document_group) do
77-
document_group.convert_to_redmine_document_category_on(project)
78-
end
76+
document_category = showing_migrated_ids(document_group) { document_group.convert_to_redmine_document_category_on(project) }
7977
document_group.documents.each do |gforge_document|
80-
gforge_document = showing_migrated_ids(gforge_document) do
81-
gforge_document.convert_to_redmine_document_in(document_category)
82-
end
78+
showing_migrated_ids(gforge_document) { gforge_document.convert_to_redmine_document_in(document_category) }
8379
end
8480
end
8581
gforge_group.artifact_group_lists.each do |artifact_group_list|
8682
project.trackers << Tracker.find_by_name(artifact_group_list.corresponding_redmine_tracker_name) unless project.trackers.find_by_name(artifact_group_list.corresponding_redmine_tracker_name)
8783
artifact_group_list.artifacts.each do |artifact|
88-
issue = showing_migrated_ids(artifact) do
89-
artifact.convert_to_redmine_issue_in(project)
90-
end
84+
issue = showing_migrated_ids(artifact) { artifact.convert_to_redmine_issue_in(project) }
9185
artifact.monitors.each do |artifact_monitor|
92-
showing_migrated_ids(artifact_monitor) do
93-
artifact_monitor.convert_to_redmine_watcher_on(issue)
94-
end
86+
showing_migrated_ids(artifact_monitor) { artifact_monitor.convert_to_redmine_watcher_on(issue) }
9587
end
9688
artifact.messages.each do |artifact_message|
97-
showing_migrated_ids(artifact_message) do
98-
artifact_message.convert_to_redmine_journal_on(issue)
99-
end
89+
showing_migrated_ids(artifact_message) { artifact_message.convert_to_redmine_journal_on(issue) }
10090
end
10191
artifact.files.each do |artifact_file|
102-
showing_migrated_ids(artifact_file) do
103-
artifact_file.convert_to_redmine_attachment_to(issue)
104-
end
92+
showing_migrated_ids(artifact_file) { artifact_file.convert_to_redmine_attachment_to(issue) }
10593
end
10694
artifact.histories.find(:all, :order => "entrydate asc").each do |artifact_history|
107-
showing_migrated_ids(artifact_history) do
108-
artifact_history.convert_to_redmine_journal_on(issue)
109-
end
95+
showing_migrated_ids(artifact_history) { artifact_history.convert_to_redmine_journal_on(issue) }
11096
end
11197
end
11298
end
11399
gforge_group.forum_groups.active.each do |forum_group|
114100
board = forum_group.convert_to_redmine_board_in(project)
115101
board_threads = {}
116102
forum_group.forum_messages.find(:all, :order => "msg_id asc").each do |forum_message|
117-
message = showing_migrated_ids(forum_message) do
118-
forum_message.convert_to_redmine_message_in(board)
119-
end
103+
message = showing_migrated_ids(forum_message) { forum_message.convert_to_redmine_message_in(board) }
120104
board_threads[forum_message.id] = message
121105
if forum_message.is_followup_to
122106
possible_parent = board_threads[forum_message.is_followup_to]
@@ -132,9 +116,7 @@ namespace :redmine do
132116
end
133117
end
134118
forum_group.monitors.each do |monitor|
135-
showing_migrated_ids(monitor) do
136-
monitor.convert_to_redmine_watcher_on(board)
137-
end
119+
showing_migrated_ids(monitor) { monitor.convert_to_redmine_watcher_on(board) }
138120
end
139121
end
140122
#end

0 commit comments

Comments
 (0)