Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Dec 20, 2023
1 parent 0d552a8 commit 229669b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions _plugins/gtn/supported.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def self.calculate(data, tool_list)
if data.nil? || data.empty? || tool_list.empty? || tool_list.nil?
return {
'exact' => [],
'inexact' => Gtn::Usegalaxy.servers.map{|x| x = x.map{|k, v| [k.to_s, v]}.to_h; x['usegalaxy'] = true; x }
'inexact' => Gtn::Usegalaxy.servers.map do |x|
x = x.transform_keys(&:to_s)
x['usegalaxy'] = true
x
end
}
end

Expand Down Expand Up @@ -68,19 +72,19 @@ def self.calculate(data, tool_list)
# generate a 'false' value when merging sets.
inexact_support -= exact_support

usegalaxy_server_urls = Gtn::Usegalaxy.servers.map{|x| x[:url]}
usegalaxy_server_urls = Gtn::Usegalaxy.servers.map { |x| x[:url] }

{
'exact' => (exact_support || []).map do |id|
data['servers'][id].update(
{ 'usegalaxy' => usegalaxy_server_urls.include?(data['servers'][id]['url']) }
)
end,
'inexact' => (inexact_support || []).map { |id|
'inexact' => (inexact_support || []).map do |id|
data['servers'][id].update(
{ 'usegalaxy' => usegalaxy_server_urls.include?(data['servers'][id]['url']) }
)
}
end
}
end
end
Expand Down

0 comments on commit 229669b

Please sign in to comment.