@@ -131,15 +131,14 @@ def prepare_coversheet
131131 hash
132132 end
133133 # rubocop:enable Metrics/AbcSize
134- # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
135134
136- # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity
135+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
137136 def prepare_coversheet_for_csv ( csv , _headings , hash )
138- csv << [ if hash [ :attribution ] . many?
139- _ ( 'Creators: ' )
140- else
141- _ ( 'Creator:' )
142- end , format ( _ ( '%{authors}' ) , authors : hash [ :attribution ] . join ( ', ' ) ) ]
137+ csv << if Array ( hash [ :attribution ] ) . many?
138+ [ _ ( 'Creators: ' ) , format ( _ ( '%{authors}' ) , authors : Array ( hash [ :attribution ] ) . join ( ', ' ) ) ]
139+ else
140+ [ _ ( 'Creator:' ) , format ( _ ( '%{authors}' ) , authors : hash [ :attribution ] ) ]
141+ end
143142 csv << [ 'Affiliation: ' , format ( _ ( '%{affiliation}' ) , affiliation : hash [ :affiliation ] ) ]
144143 csv << if hash [ :funder ] . present?
145144 [ _ ( 'Template: ' ) , format ( _ ( '%{funder}' ) , funder : hash [ :funder ] ) ]
@@ -161,10 +160,9 @@ def prepare_coversheet_for_csv(csv, _headings, hash)
161160 csv << [ ]
162161 csv << [ ]
163162 end
164- # rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity
163+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
165164
166165 # rubocop:disable Metrics/AbcSize, Metrics/BlockLength, Metrics/MethodLength
167- # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
168166 # rubocop:disable Metrics/ParameterLists
169167 def show_section_for_csv ( csv , phase , section , headings , unanswered , hash )
170168 section [ :questions ] . each do |question |
0 commit comments