Merge remote-tracking branch 'parent/main' into upstream-20240109
This commit is contained in:
commit
d35fa72842
333 changed files with 4444 additions and 2541 deletions
|
@ -18,6 +18,8 @@ class SoftwareUpdate < ApplicationRecord
|
|||
|
||||
enum :type, { patch: 0, minor: 1, major: 2 }, suffix: :type
|
||||
|
||||
scope :urgent, -> { where(urgent: true) }
|
||||
|
||||
def gem_version
|
||||
Gem::Version.new(version)
|
||||
end
|
||||
|
@ -35,6 +37,10 @@ class SoftwareUpdate < ApplicationRecord
|
|||
Rails.configuration.x.mastodon.software_update_url.present?
|
||||
end
|
||||
|
||||
def by_version
|
||||
all.sort_by(&:gem_version)
|
||||
end
|
||||
|
||||
def pending_to_a
|
||||
return [] unless check_enabled?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue