mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05: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).
19 lines
430 B
Ruby
19 lines
430 B
Ruby
# 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
|