Sha256: 56d282f0e99be3bfa00e183690946916ae3791cf918af32779bc59260e643e5b

Contents?: true

Size: 1.18 KB

Versions: 20

Compression:

Stored size: 1.18 KB

Contents

require 'rails/all'
require 'zuora_connect'
require 'apartment'
require 'httparty'
require 'zuora_api'

module ZuoraConnect
  class Engine < ::Rails::Engine
    isolate_namespace ZuoraConnect

    initializer "connect", before: :load_config_initializers do |app|
      Rails.application.routes.prepend do
        get '/connect/internal/data' => 'zuora_observability/metrics#metrics'
        mount ZuoraConnect::Engine, at: "/connect"
        match '/api/connect/health', via: :all, to: 'zuora_connect/static#health'
        match '/api/connect/internal/data', via: :all, to: 'zuora_observability/metrics#metrics'
      end
    end


    initializer :append_migrations do |app|
      if ZuoraConnect.configuration.insert_migrations
        unless app.root.to_s.match root.to_s
          config.paths["db/migrate"].expanded.each do |expanded_path|
            app.config.paths["db/migrate"] << expanded_path
          end
        end
      end
    end

    initializer "connect.helpers" do
      ActiveSupport.on_load(:action_controller) do
        include ZuoraConnect::Controllers::Helpers
        include ZuoraConnect::Authenticate
        helper ZuoraConnect::ApplicationHelper
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
zuora_connect-3.0.2.pre.r lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.q lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.p lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.o lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.n lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.m lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.l lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.k lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.j lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.i lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.h lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.g lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.f lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.e lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.d lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.c lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.b lib/zuora_connect/engine.rb
zuora_connect-3.0.2.pre.a lib/zuora_connect/engine.rb
zuora_connect-3.0.1 lib/zuora_connect/engine.rb
zuora_connect-3.0.1.pre.d lib/zuora_connect/engine.rb