Sha256: 2eefbcd35b91c877bf19c4900ac09e98f51d10f664a135ebf747d573a2a07b81

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

module AdhearsionSequel
  class Plugin < Adhearsion::Plugin
    extend ActiveSupport::Autoload

    autoload :Service, 'adhearsion_sequel/plugin/service'

    # Actions to perform when the plugin is loaded
    #
    init :adhearsion_sequel do
      logger.warn "AdhearsionSequel has been loaded"
      Service.start
    end

    # Basic configuration for the plugin
    #
    config :adhearsion_sequel do
      adapter   "mysql"     , :desc => "Database adapter. It should be an adapter supported by sequel"
      database  "test"      , :desc => "Database to connect to."
      username  "root"      , :desc => "Database username."
      password  ""          , :desc => "Database password."
      host      "localhost" , :desc => "host where the database is installed."
      port      3306        , :desc => "port where the database is listening."
      model_path "models"   , :desc => "location of the Sequel Models"
    end

    # Defining a Rake task is easy
    # The following can be invoked with:
    #   rake plugin_demo:info
    #
    tasks do
      namespace :adhearsion_sequel do
        desc "Prints the PluginTemplate information"
        task :info do
          STDOUT.puts "AdhearsionSequel plugin v. #{VERSION}"
        end
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adhearsion_sequel-0.0.1 lib/adhearsion_sequel/plugin.rb