Sha256: 7e2dc64e7e9c9f12f096f86a01bc2be558cb52871564c88f99c69b6476c6503f

Contents?: true

Size: 1.72 KB

Versions: 1

Compression:

Stored size: 1.72 KB

Contents

#
#  Project <%= @conf.appname %>
#
#  Created using bivouac on <%= Time.now %>.
#  Copyright (c) <%= Time.now.year %> __My__. All rights reserved.
#

require 'ostruct'
require 'yaml'

module Bivouac
  class Environment
  
    attr_reader :environment
    
    def initialize
      @environment = OpenStruct.new( 
        # Address to bind to
        :address  => "<%= @conf.address %>",
        
        # Application port
        :port     => <%= @conf.port %>,
        
        # To force using a specific server, uncomment the line below
        # You can use "mongrel", "thin" or "webrick"
        #:server_force => "mongrel",
        
        # Database configuration
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :db       => open("#{File.dirname( __FILE__ )}/database.yml") {|f| YAML.load(f)},
        
        # Name of the application
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :appname  => "<%= @conf.appname %>",
        
        # Path of the application
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :appdir   => "<%= @conf.appdir %>",

        # File of the application
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :appfile  => "<%= @conf.appfile %>",

        # Organisation type of the application
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :orgtype  => "<%= @conf.orgtype %>",
        
        # Session type  
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :session  => "<%= @conf.session %>",
        
        # Session type  
        # DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
        :versions => <%= @conf.versions %>
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bivouac-0.3.0 lib/bivouac/template/environment.rb