lib/maquina.rb in maquina-0.5.2 vs lib/maquina.rb in maquina-0.7.1
- old
+ new
@@ -1,38 +1,31 @@
# frozen_string_literal: true
require_relative "maquina/version"
require_relative "maquina/engine"
-require "importmap-rails"
require "money-rails"
require "turbo-rails"
require "action_policy"
require "pagy"
module Maquina
class << self
attr_accessor :configuration
-
- def postgresql?
- ActiveRecord::Base.connection_db_config.configuration_hash[:adapter].downcase == "postgresql"
- end
end
class Configuration
attr_accessor :password_retain_count, :temporary_block, :session_expiration, :signin_attempts, :tailwind_content,
- :importmap, :root_app_path, :membership_roles
+ :importmap, :root_app_path, :membership_roles, :search_adapter
def initialize
@password_retain_count = 3
@temporary_block = 5.minutes
@session_expiration = 2.days
@signin_attempts = 5
@root_app_path = "/"
@membership_roles = %w[admin member].index_by(&:itself)
-
- @importmap = Importmap::Map.new
- @importmap.draw(Engine.root.join("config/importmap.rb"))
+ @search_adapter = nil
@tailwind_content = [
"#{Maquina::Engine.root}/app/views/**/*.{rb,erb}",
"#{Maquina::Engine.root}/app/helpers/**/*.rb",
"#{Maquina::Engine.root}/app/controllers/**/*.rb",