Sha256: ace91143a8c9cc63d2208660c8b7749e2c42286aeb1763977477bb132b5c3d86

Contents?: true

Size: 931 Bytes

Versions: 2

Compression:

Stored size: 931 Bytes

Contents

module Adhearsion
  module Rails

    ##
    # Adhearsion Plugin that defines the Rails configuration options
    # and includes a hook to start the Rails service in Adhearsion initialization process
    class Plugin < Adhearsion::Plugin
      extend ActiveSupport::Autoload

      autoload :Service

      # Default configuration for Rails integration.
      config :adhearsion_rails do
        path "", :desc => "Local path (absolute or relative) where the Rails application is located"
        environment :development, :desc => <<-__
          Identifies the Rails environment. Valid values are:
            - :development
            - :test
            - :production
            - any other environment that you have defined in your rails application
        __
      end

      # Include the RAils service in plugins initialization process
      init :adhearsion_rails do
        Service.start
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adhearsion-rails-1.0.0 lib/adhearsion/rails/plugin.rb
adhearsion-rails-0.1.0 lib/adhearsion/rails/plugin.rb