Sha256: 6d08be0bcfd08383ee8a760a12236cd5105f06b622ec45b75d571a760e8b0410
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
# encoding: utf-8 # This file is distributed under Ting Yun's license terms. # == TingYun Initialization # # When installed as a gem, you can activate the Ting Yun agent one of the following ways: # # For Rails, add: # config.gem 'tingyun_rpm' # to your initialization sequence. # # For merb, do # dependency 'tingyun_rpm' # in the Merb config/init.rb # # For Sinatra, do # require 'tingyun_rpm' # after requiring 'sinatra'. # # For other frameworks, or to manage the agent manually, invoke TingYun::Agent#manual_start # directly. # require 'ting_yun/frameworks' if defined?(Rails::VERSION) if Rails::VERSION::MAJOR.to_i >= 3 module TingYun class Railtie < Rails::Railtie initializer "tingyun_rpm.start_plugin" do |app| TingYun::Agent.logger.info('initialize tingyun_rpm start_plugin') TingYun::Frameworks.init_start(:config => app.config) end end end else # After version 2.0 of Rails we can access the configuration directly. # We need it to add dev mode routes after initialization finished. config = nil config = Rails.configuration if Rails.respond_to?(:configuration) TingYun::Frameworks.init_start(:config => config) end else TingYun::Frameworks.init_start end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
tingyun_rpm-1.1.2 | lib/tingyun_rpm.rb |
tingyun_rpm-1.1.1 | lib/tingyun_rpm.rb |
tingyun_rpm-1.1.0 | lib/tingyun_rpm.rb |
tingyun_rpm-1.0.7 | lib/tingyun_rpm.rb |
tingyun_rpm-1.0.6 | lib/tingyun_rpm.rb |