Sha256: b1f107ff2da10e73f73c5c1212fa2b8e2ab5cf07ad34c5acb27e143d4a5e99a5
Contents?: true
Size: 1.71 KB
Versions: 3
Compression:
Stored size: 1.71 KB
Contents
# frozen_string_literal: true module Shipit class Engine < ::Rails::Engine isolate_namespace Shipit paths['app/models'] << 'app/serializers' << 'app/serializers/concerns' initializer 'shipit.config' do |app| Rails.application.routes.default_url_options[:host] = Shipit.host Shipit::Engine.routes.default_url_options[:host] = Shipit.host Pubsubstub.redis_url = Shipit.redis_url.to_s Rails.application.secrets.deep_symbolize_keys! app.config.assets.paths << Emoji.images_path app.config.assets.precompile += %w( favicon.ico task.js shipit.js shipit.css merge_status.js merge_status.css ) app.config.assets.precompile << proc do |path| path =~ %r{\Aplugins/[\-\w]+\.(js|css)\Z} end app.config.assets.precompile << proc do |path| path.end_with?('.svg') || (path.start_with?('emoji/') && path.end_with?('.png')) end ActionDispatch::ExceptionWrapper.rescue_responses[Shipit::TaskDefinition::NotFound.name] = :not_found ActiveModel::Serializer._root = false ActiveModel::ArraySerializer._root = false ActiveModel::Serializer.include(Engine.routes.url_helpers) if Shipit.github.oauth? OmniAuth::Strategies::GitHub.configure(path_prefix: '/github/auth') app.middleware.use(OmniAuth::Builder) do provider(:github, *Shipit.github.oauth_config) end end if Shipit.enable_samesite_middleware? app.config.middleware.insert_after(::Rack::Runtime, Shipit::SameSiteCookieMiddleware) end app.config.after_initialize do ActionController::Base.include(Shipit::ActiveModelSerializersPatch) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
shipit-engine-0.35.1 | lib/shipit/engine.rb |
shipit-engine-0.35.0 | lib/shipit/engine.rb |
shipit-engine-0.34.0 | lib/shipit/engine.rb |