Sha256: d1affd7c3303694b12c5587af76562b4d12f678a55f0d9600b4ed4efbd9af996

Contents?: true

Size: 1.05 KB

Versions: 56

Compression:

Stored size: 1.05 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
        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_connect/static#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
        helper ZuoraConnect::ApplicationHelper
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
zuora_connect-2.0.60v lib/zuora_connect/engine.rb
zuora_connect-2.1.1 lib/zuora_connect/engine.rb
zuora_connect-2.0.60u lib/zuora_connect/engine.rb
zuora_connect-2.0.60t lib/zuora_connect/engine.rb
zuora_connect-2.0.60s lib/zuora_connect/engine.rb
zuora_connect-2.0.60r lib/zuora_connect/engine.rb
zuora_connect-2.0.60q lib/zuora_connect/engine.rb
zuora_connect-2.0.60p lib/zuora_connect/engine.rb
zuora_connect-2.0.60o lib/zuora_connect/engine.rb
zuora_connect-2.0.60n lib/zuora_connect/engine.rb
zuora_connect-2.0.60m lib/zuora_connect/engine.rb
zuora_connect-2.0.60l lib/zuora_connect/engine.rb
zuora_connect-2.0.60k lib/zuora_connect/engine.rb
zuora_connect-2.0.60j lib/zuora_connect/engine.rb
zuora_connect-2.0.60i lib/zuora_connect/engine.rb
zuora_connect-2.0.60h lib/zuora_connect/engine.rb
zuora_connect-2.0.60g lib/zuora_connect/engine.rb
zuora_connect-2.0.60f lib/zuora_connect/engine.rb
zuora_connect-2.0.60e lib/zuora_connect/engine.rb
zuora_connect-2.0.60d lib/zuora_connect/engine.rb