Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Nov 2, 2023
1 parent 3c9e29a commit d0af19d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
6 changes: 2 additions & 4 deletions _plugins/gtn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,13 @@ def get_default_link(material)
if contributor.key?('affiliations')
contributor['affiliations'].each do |affiliation|
if site.data['organisations'].key?(affiliation)
if ! site.data['organisations'][affiliation].key?('members')
if !site.data['organisations'][affiliation].key?('members')
site.data['organisations'][affiliation]['members'] = []
end

site.data['organisations'][affiliation]['members'] << name
elsif site.data['funders'].key?(affiliation)
if ! site.data['funders'][affiliation].key?('members')
site.data['funders'][affiliation]['members'] = []
end
site.data['funders'][affiliation]['members'] = [] if !site.data['funders'][affiliation].key?('members')

site.data['funders'][affiliation]['members'] << name
end
Expand Down
6 changes: 3 additions & 3 deletions _plugins/jekyll-tool-tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def render(context)
tool = context[m[2].tr('{}', '')] || m[2]
version = tool.split('/').last

if tool.count('/') == 0
if tool.count('/').zero?
"<span class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" aria-role=\"button\">" \
'<i class="fas fa-wrench" aria-hidden="true"></i> ' \
"<strong>#{m[1]}</strong>" \
'</span>'
'</span>'
else
"<span class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" aria-role=\"button\">" \
'<i class="fas fa-wrench" aria-hidden="true"></i> ' \
Expand All @@ -37,7 +37,7 @@ def render(context)
'<i class="fas fa-cubes" aria-hidden="true"></i> ' \
"Galaxy version #{version}" \
')' \
'</span>'
'</span>'
end
else
%(<span><strong>#{@text}</strong> <i class="fas fa-wrench" aria-hidden="true"></i></span>)
Expand Down
10 changes: 4 additions & 6 deletions bin/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ def format_news(news)
def format_tutorials(added, modified, kind: 'tutorials', updates: true)
output = ''
count = added.length
if updates
count += modified.length
end
count += modified.length if updates
output += "\n\n## #{count} #{kind}!" if count.positive?

if added.length.positive?
Expand Down Expand Up @@ -196,7 +194,7 @@ def build_news(data, filter: nil, updates: true)
output += data[:funders].map { |c| linkify("@#{c}", "hall-of-fame/#{c}") }.join("\n").gsub(/^/, '- ')
end

return [output, newsworthy]
[output, newsworthy]
end

def send_news(output, options, channel: 'default')
Expand Down Expand Up @@ -242,9 +240,9 @@ def send_news(output, options, channel: 'default')
end
end
else
puts "=============="
puts '=============='
puts output
puts "=============="
puts '=============='
end
end

Expand Down

0 comments on commit d0af19d

Please sign in to comment.