Merge remote-tracking branch 'parent/main' into upstream-20240109

This commit is contained in:
KMY 2025-01-09 13:20:56 +09:00
commit d35fa72842
333 changed files with 4444 additions and 2541 deletions

View file

@ -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?