Sha256: ba8e8089f090780c0d20b6ad1fb6fc9fdcacd1d1373cf0aa1093acbec40fd10f

Contents?: true

Size: 1.76 KB

Versions: 16

Compression:

Stored size: 1.76 KB

Contents

# encoding: UTF-8

# this file sets up the basic framework.

# Using pathname extentions for setting public folder
require 'pathname'
#set up root object, it might be used by the environment and\or the plezi extension gems.
Root ||= Pathname.new(File.dirname(__FILE__)).expand_path

# make sure all file access and file loading is relative to the application's root folder
Dir.chdir Root.to_s

# ensure development mode? (comment before production, environment dependent)
ENV['ENV'] ||= ENV["RACK_ENV"] ||= "development"

# save the process id (pid) to file - notice Heroku doesn't allow to write files.
(IO.write File.expand_path(File.join 'tmp','pid'), Process.pid unless ENV["DYNO"]) rescue true

# using bundler to load gems (including the plezi gem)
require 'bundler'
Bundler.require(:default, ENV['ENV'].to_s.to_sym)

# require tilt/sass in a thread safe way (before multi-threading cycle begins)
require 'tilt/sass' if defined?(::Slim) && defined?(::Sass)

# # set up Plezi's logs to a log file?
# Iodine.logger = Logger.new(File.expand_path(File.join 'logs','server.log')) unless ENV["DYNO"]

# set the session token name?
Iodine::Http.session_token = 'appname_uui'

## Allow forking? ONLY if your code is fully scalable across processes.
# Iodine.processes = 4

# load all config files
Dir[File.join "{initialize}", "**" , "*.rb"].each {|file| load File.expand_path(file)}

# load all library files
Dir[File.join "{lib}", "**" , "*.rb"].each {|file| load File.expand_path(file)}

# load all application files
Dir[File.join "{app}", "**" , "*.rb"].each {|file| load File.expand_path(file)}

# change some of the default settings here.
host host: :default,
	public: Root.join('public').to_s,
	assets: Root.join('assets').to_s,
	assets_public: '/assets',
	templates: Root.join('app','views').to_s

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
plezi-0.12.22 resources/initialize.rb
plezi-0.12.21 resources/initialize.rb
plezi-0.12.20 resources/initialize.rb
plezi-0.12.19 resources/initialize.rb
plezi-0.12.18 resources/initialize.rb
plezi-0.12.17 resources/initialize.rb
plezi-0.12.16 resources/initialize.rb
plezi-0.12.15 resources/initialize.rb
plezi-0.12.14 resources/initialize.rb
plezi-0.12.13 resources/initialize.rb
plezi-0.12.11 resources/initialize.rb
plezi-0.12.10 resources/initialize.rb
plezi-0.12.9 resources/initialize.rb
plezi-0.12.8 resources/initialize.rb
plezi-0.12.7 resources/initialize.rb
plezi-0.12.6 resources/initialize.rb