# 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 end class Configuration attr_accessor :password_retain_count, :temporary_block, :session_expiration, :signin_attempts, :tailwind_content, :importmap, :root_app_path def initialize @password_retain_count = 3 @temporary_block = 5.minutes @session_expiration = 2.days @signin_attempts = 5 @importmap = Importmap::Map.new @root_app_path = nil @tailwind_content = [ "#{Maquina::Engine.root}/app/views/**/*.{rb,erb}", "#{Maquina::Engine.root}/app/helpers/**/*.rb", "#{Maquina::Engine.root}/app/controllers/**/*.rb", "#{Maquina::Engine.root}/app/javascript/**/*.js", "#{Maquina::Engine.root}/app/assets/**/application.tailwind.css" ] end end def self.init_config self.configuration ||= Configuration.new end def self.configure init_config yield(configuration) end end Maquina.init_config