mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-18 18:00:27 +08:00
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).
18 lines
430 B
Ruby
Vendored
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
|