mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 23:36:21 +00:00
fix: simplificar
This commit is contained in:
parent
f076838be5
commit
a6195fbccc
3 changed files with 7 additions and 2 deletions
|
@ -22,7 +22,7 @@ class BuildStatsController < ApplicationController
|
|||
|
||||
@table = site.deployment_list.map do |deploy|
|
||||
type = deploy.class.name.underscore
|
||||
urls = (deploy.respond_to?(:urls) ? deploy.urls : [deploy.url].compact).map do |url|
|
||||
urls = deploy.urls.map do |url|
|
||||
URI.parse(url)
|
||||
rescue URI::Error
|
||||
nil
|
||||
|
|
|
@ -51,7 +51,7 @@ class DeployJob < ApplicationJob
|
|||
status = d.deploy(output: @output)
|
||||
seconds = d.build_stats.last.try(:seconds) || 0
|
||||
size = d.size
|
||||
urls = (d.respond_to?(:urls) ? d.urls : [d.url].compact).map do |url|
|
||||
urls = d.urls.map do |url|
|
||||
URI.parse url
|
||||
rescue URI::Error
|
||||
nil
|
||||
|
|
|
@ -23,6 +23,11 @@ class Deploy < ApplicationRecord
|
|||
raise NotImplementedError
|
||||
end
|
||||
|
||||
# @return [Array]
|
||||
def urls
|
||||
[url].compact
|
||||
end
|
||||
|
||||
def limit
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue