discourse/lib/discourse_gifs.rb
David Battersby 031e17658c
DEV: move discourse gifs to core (#40162)
Moves the theme component from Discourse Gifs and brings it into core as
an upcoming change. This PR also brings gifs under a single provider
(Klipy).
2026-06-10 11:35:44 +04:00

18 lines
430 B
Ruby
Vendored

# frozen_string_literal: true
module DiscourseGifs
REPO_URL = "https://github.com/discourse/discourse-gifs"
COMPONENT_NAME = "discourse-gifs"
REMOTE_URLS = [REPO_URL, "#{REPO_URL}.git"].freeze
def self.component_installed?
component_scope.exists?
end
def self.component_scope
Theme
.joins(:remote_theme)
.where(component: true)
.where(remote_themes: { remote_url: REMOTE_URLS })
end
end