summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorNicolas Braud-Santoni <nicoo@ffgraz.net>2016-08-07 16:39:42 +0200
committerNicolas Braud-Santoni <nicoo@ffgraz.net>2016-08-07 16:39:42 +0200
commitb6ca062670b342344df08b53fb216db619ef42bc (patch)
tree7680ac6b407239f6b7272c937e42f688b8de542c /config
Import legacy manman source
Copied from www.ffgraz.net
Diffstat (limited to 'config')
-rw-r--r--config/boot.rb44
-rw-r--r--config/database.yml35
-rw-r--r--config/environment.rb58
-rw-r--r--config/environments/development.rb21
-rw-r--r--config/environments/production.rb18
-rw-r--r--config/environments/test.rb19
-rw-r--r--config/routes.rb22
7 files changed, 217 insertions, 0 deletions
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644
index 0000000..d57f68a
--- /dev/null
+++ b/config/boot.rb
@@ -0,0 +1,44 @@
+# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
+
+unless defined?(RAILS_ROOT)
+ root_path = File.join(File.dirname(__FILE__), '..')
+
+ unless RUBY_PLATFORM =~ /mswin32/
+ require 'pathname'
+ root_path = Pathname.new(root_path).cleanpath(true).to_s
+ end
+
+ RAILS_ROOT = root_path
+end
+
+unless defined?(Rails::Initializer)
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+ else
+ require 'rubygems'
+
+ environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
+ environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
+ rails_gem_version = $1
+
+ if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
+ rails_gem = Gem.cache.search('rails', "=#{version}").first
+
+ if rails_gem
+ gem "rails", "=#{version}"
+ require rails_gem.full_gem_path + '/lib/initializer'
+ else
+ STDERR.puts %(Cannot find gem for Rails =#{version}:
+ Install the missing gem with 'gem install -v=#{version} rails', or
+ change environment.rb to define RAILS_GEM_VERSION with your desired version.
+ )
+ exit 1
+ end
+ else
+ gem "rails"
+ require 'initializer'
+ end
+ end
+
+ Rails::Initializer.run(:set_load_path)
+end
diff --git a/config/database.yml b/config/database.yml
new file mode 100644
index 0000000..f842c1e
--- /dev/null
+++ b/config/database.yml
@@ -0,0 +1,35 @@
+# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
+# On MacOS X:
+# gem install mysql -- --include=/usr/local/lib
+# On Windows:
+# There is no gem for Windows. Install mysql.so from RubyForApache.
+# http://rubyforge.org/projects/rubyforapache
+#
+# And be sure to use new-style password hashing:
+# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+development:
+ adapter: mysql
+ database: mappe
+ username: mappe
+ password: keuchfrosch
+ host: localhost
+
+# Warning: The database defined as 'test' will be erased and
+# re-generated from your development database when you run 'rake'.
+# Do not set this db to the same as development or production.
+test:
+ adapter: mysql
+ database: mappe
+ username: ffscript
+ password: woasinid
+ host: localhost
+
+production:
+ adapter: mysql
+ database: mappe
+ username: ffscript
+ password: woasinid
+ host: localhost
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644
index 0000000..a1b5a8a
--- /dev/null
+++ b/config/environment.rb
@@ -0,0 +1,58 @@
+# Be sure to restart your web server when you modify this file.
+
+# Uncomment below to force Rails into production mode when
+# you don't control web/app server and can't set it the proper way
+# ENV['RAILS_ENV'] ||= 'production'
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '1.2.1'
+
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+ # Settings in config/environments/* take precedence those specified here
+
+ # Skip frameworks you're not going to use (only works if using vendor/rails)
+ # config.frameworks -= [ :action_web_service, :action_mailer ]
+
+ # Add additional load paths for your own custom dirs
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+ # Force all environments to use the same logger level
+ # (by default production uses :info, the others :debug)
+ # config.log_level = :debug
+
+ # Use the database for sessions instead of the file system
+ # (create the session table with 'rake db:sessions:create')
+ # config.action_controller.session_store = :active_record_store
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector
+
+ # Make Active Record use UTC-base instead of local time
+ # config.active_record.default_timezone = :utc
+
+ # See Rails::Configuration for more options
+end
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+
+# Include your application configuration below
+ActiveRecord::Base.pluralize_table_names = false
+
+ActionMailer::Base.raise_delivery_errors = true
+ActionMailer::Base.perform_deliveries = true
+ActionMailer::Base.delivery_method = :sendmail
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644
index 0000000..0589aa9
--- /dev/null
+++ b/config/environments/development.rb
@@ -0,0 +1,21 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# In the development environment your application's code is reloaded on
+# every request. This slows down response time but is perfect for development
+# since you don't have to restart the webserver when you make code changes.
+config.cache_classes = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Enable the breakpoint server that script/breakpointer connects to
+config.breakpoint_server = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+config.action_view.cache_template_extensions = false
+config.action_view.debug_rjs = true
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644
index 0000000..5a4e2b1
--- /dev/null
+++ b/config/environments/production.rb
@@ -0,0 +1,18 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The production environment is meant for finished, "live" apps.
+# Code is not reloaded between requests
+config.cache_classes = true
+
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
+# Full error reports are disabled and caching is turned on
+config.action_controller.consider_all_requests_local = false
+config.action_controller.perform_caching = true
+
+# Enable serving of images, stylesheets, and javascripts from an asset server
+# config.action_controller.asset_host = "http://assets.example.com"
+
+# Disable delivery errors if you bad email addresses should just be ignored
+# config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644
index 0000000..f0689b9
--- /dev/null
+++ b/config/environments/test.rb
@@ -0,0 +1,19 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+config.cache_classes = true
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+
+# Tell ActionMailer not to deliver emails to the real world.
+# The :test delivery method accumulates sent emails in the
+# ActionMailer::Base.deliveries array.
+config.action_mailer.delivery_method = :test \ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..1a1c350
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,22 @@
+ActionController::Routing::Routes.draw do |map|
+ # The priority is based upon order of creation: first created -> highest priority.
+
+ # Sample of regular route:
+ # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # You can have the root of your site routed by hooking up ''
+ # -- just remember to delete public/index.html.
+ map.connect '', :controller => "person", :action => 'login'
+
+ # Allow downloading Web Service WSDL as a file with an extension
+ # instead of a file named 'wsdl'
+ map.connect ':controller/service.wsdl', :action => 'wsdl'
+
+ # Install the default route as the lowest priority.
+ map.connect ':controller/:action/:id'
+end