Sha256: 1bea0599ab1a3eb052132d3241857c0b699c9f6723235eacef2aa6df0eb7b0d1

Contents?: true

Size: 1.19 KB

Versions: 33

Compression:

Stored size: 1.19 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

    config.to_prepare do
      ActionController::Base.send(:include, ZuoraConnect::Controllers::Helpers)
      ActionController::Base.send(:include, ZuoraConnect::Authenticate)
      ActionController::Base.send(:helper, ZuoraConnect::ApplicationHelper)
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
zuora_connect-3.2.10 lib/zuora_connect/engine.rb
zuora_connect-3.2.9 lib/zuora_connect/engine.rb
zuora_connect-3.2.8 lib/zuora_connect/engine.rb
zuora_connect-3.2.7 lib/zuora_connect/engine.rb
zuora_connect-3.2.6 lib/zuora_connect/engine.rb
zuora_connect-3.2.5 lib/zuora_connect/engine.rb
zuora_connect-3.2.4 lib/zuora_connect/engine.rb
zuora_connect-3.2.3 lib/zuora_connect/engine.rb
zuora_connect-3.2.2 lib/zuora_connect/engine.rb
zuora_connect-3.2.0 lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.g lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.f lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.e lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.d lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.c lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.b lib/zuora_connect/engine.rb
zuora_connect-3.1.5.pre.a lib/zuora_connect/engine.rb
zuora_connect-3.1.5 lib/zuora_connect/engine.rb
zuora_connect-3.1.4 lib/zuora_connect/engine.rb
zuora_connect-3.1.3 lib/zuora_connect/engine.rb