Sha256: f2077749c8ff9dd38778ac9bc1cb7422668939f4bb34e3af501553e068333a73
Contents?: true
Size: 1.83 KB
Versions: 4
Compression:
Stored size: 1.83 KB
Contents
# frozen_string_literal: true module Archangel ## # Archangel engine # class Engine < ::Rails::Engine isolate_namespace Archangel engine_name "archangel" require "responders" initializer "archangel.load_locales" do |app| Archangel::THEME_DIRECTORIES.each.each do |path| path ||= Rails.root full_path = "#{path}/app/themes/*/locales/**/*.yml" Dir.glob(full_path).each { |dir| app.config.i18n.load_paths << dir } end end initializer "archangel.assets_path" do |app| Archangel::THEME_DIRECTORIES.each.each do |path| path ||= Rails.root full_path = "#{path}/app/themes/*/assets/*" Dir.glob(full_path).each { |dir| app.config.assets.paths << dir } end end initializer "archangel.precompile" do |app| Archangel::THEME_DIRECTORIES.each.each do |path| path ||= Rails.root full_path = Pathname.new("#{path}/app/themes/*/assets/**/*") allowed_regex = %r{ ([^/]+) /assets/(javascripts|stylesheets)/ ([^/]+) /(auth|backend|frontend).(js|css) }x Dir.glob(full_path).each do |file| next unless File.file?(file) file_path = Pathname.new(file).relative_path_from(path).to_s app.config.assets.precompile << file if file_path =~ allowed_regex end end end config.action_controller.include_all_helpers = false config.generators do |gen| gen.test_framework :rspec, fixtures: false, view_specs: false, helper_specs: true, routing_specs: false, controller_specs: true, request_specs: true gen.fixture_replacement :factory_bot, dir: "spec/factories" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
archangel-0.0.5 | lib/archangel/engine.rb |
archangel-0.0.4 | lib/archangel/engine.rb |
archangel-0.0.3 | lib/archangel/engine.rb |
archangel-0.0.2 | lib/archangel/engine.rb |