lib/spina.rb in spina-2.2.0 vs lib/spina.rb in spina-2.3.0
- old
+ new
@@ -1,6 +1,5 @@
-require 'spina/importmap_helper'
require 'spina/engine'
require 'spina/admin_sectionable'
require 'spina/railtie'
require 'spina/plugin'
require 'spina/theme'
@@ -15,36 +14,47 @@
PARTS = []
PLUGINS = []
THEMES = []
- config_accessor :authentication,
+ config_accessor :api_key,
+ :api_path,
+ :authentication,
:backend_path,
+ :importmap,
:frontend_parent_controller,
:disable_frontend_routes,
:disable_decorator_load,
:locales,
:embedded_image_size,
+ :thumbnail_image_size,
:party_pooper,
:tailwind_purge_content,
:queues,
:transliterations
# Defaults
+ self.api_key = nil
+ self.api_path = "api"
self.authentication = "Spina::Authentication::Sessions"
self.backend_path = 'admin'
self.disable_frontend_routes = false
self.disable_decorator_load = false
self.embedded_image_size = [2000, 2000]
+ self.thumbnail_image_size = [400, 400]
self.frontend_parent_controller = "ApplicationController"
self.locales = [I18n.default_locale]
self.party_pooper = false
self.transliterations = %i(latin)
# Queues for background jobs
# - config.queues.page_updates
self.queues = ActiveSupport::InheritableOptions.new
+ # An importmap specifically meant for Spina
+ self.importmap = ActiveSupport::OrderedOptions.new
+ self.importmap.paths = Importmap::Paths.new
+
# Tailwind purging
# Spina will by default purge all unused Tailwind classes by scanning
# the files listed below. You probably don't want to override this in
# your main app. Spina Plugins can add files to this array.
self.tailwind_purge_content = Spina::Engine.root.glob("app/views/**/*.*") +