Adds a branch for unlimited project hierarchy.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
# Don't change this file!
|
||||
# Configure your app in config/environment.rb and config/environments/*.rb
|
||||
|
||||
RAILS_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") unless defined?(RAILS_ROOT)
|
||||
|
||||
module Rails
|
||||
class << self
|
||||
def boot!
|
||||
unless booted?
|
||||
preinitialize
|
||||
pick_boot.run
|
||||
end
|
||||
end
|
||||
|
||||
def booted?
|
||||
defined? Rails::Initializer
|
||||
end
|
||||
|
||||
def pick_boot
|
||||
(vendor_rails? ? VendorBoot : GemBoot).new
|
||||
end
|
||||
|
||||
def vendor_rails?
|
||||
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
||||
end
|
||||
|
||||
def preinitialize
|
||||
load(preinitializer_path) if File.exist?(preinitializer_path)
|
||||
end
|
||||
|
||||
def preinitializer_path
|
||||
"#{RAILS_ROOT}/config/preinitializer.rb"
|
||||
end
|
||||
end
|
||||
|
||||
class Boot
|
||||
def run
|
||||
load_initializer
|
||||
Rails::Initializer.run(:set_load_path)
|
||||
end
|
||||
end
|
||||
|
||||
class VendorBoot < Boot
|
||||
def load_initializer
|
||||
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
||||
Rails::Initializer.run(:install_gem_spec_stubs)
|
||||
end
|
||||
end
|
||||
|
||||
class GemBoot < Boot
|
||||
def load_initializer
|
||||
self.class.load_rubygems
|
||||
load_rails_gem
|
||||
require 'initializer'
|
||||
end
|
||||
|
||||
def load_rails_gem
|
||||
if version = self.class.gem_version
|
||||
gem 'rails', version
|
||||
else
|
||||
gem 'rails'
|
||||
end
|
||||
rescue Gem::LoadError => load_error
|
||||
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
||||
exit 1
|
||||
end
|
||||
|
||||
class << self
|
||||
def rubygems_version
|
||||
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
||||
end
|
||||
|
||||
def gem_version
|
||||
if defined? RAILS_GEM_VERSION
|
||||
RAILS_GEM_VERSION
|
||||
elsif ENV.include?('RAILS_GEM_VERSION')
|
||||
ENV['RAILS_GEM_VERSION']
|
||||
else
|
||||
parse_gem_version(read_environment_rb)
|
||||
end
|
||||
end
|
||||
|
||||
def load_rubygems
|
||||
require 'rubygems'
|
||||
|
||||
unless rubygems_version >= '0.9.4'
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
||||
exit 1
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
||||
exit 1
|
||||
end
|
||||
|
||||
def parse_gem_version(text)
|
||||
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
||||
end
|
||||
|
||||
private
|
||||
def read_environment_rb
|
||||
File.read("#{RAILS_ROOT}/config/environment.rb")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# All that for this:
|
||||
Rails.boot!
|
||||
@@ -0,0 +1,47 @@
|
||||
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
|
||||
#
|
||||
# Get the fast C bindings:
|
||||
# gem install mysql
|
||||
# (on OS X: gem install mysql -- --include=/usr/local/lib)
|
||||
# And be sure to use new-style password hashing:
|
||||
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
||||
|
||||
production:
|
||||
adapter: mysql
|
||||
database: redmine
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8
|
||||
|
||||
development:
|
||||
adapter: mysql
|
||||
database: redmine_development
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8
|
||||
|
||||
test:
|
||||
adapter: mysql
|
||||
database: redmine_test
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8
|
||||
|
||||
test_pgsql:
|
||||
adapter: postgresql
|
||||
database: redmine_test
|
||||
host: localhost
|
||||
username: postgres
|
||||
password: "postgres"
|
||||
|
||||
test_sqlite3:
|
||||
adapter: sqlite3
|
||||
dbfile: db/test.db
|
||||
|
||||
demo:
|
||||
adapter: sqlite3
|
||||
dbfile: db/demo.db
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Outgoing email settings
|
||||
|
||||
production:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: smtp.example.net
|
||||
port: 25
|
||||
domain: example.net
|
||||
authentication: :login
|
||||
user_name: redmine@example.net
|
||||
password: redmine
|
||||
|
||||
development:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: 127.0.0.1
|
||||
port: 25
|
||||
domain: example.net
|
||||
authentication: :login
|
||||
user_name: redmine@example.net
|
||||
password: redmine
|
||||
@@ -0,0 +1,57 @@
|
||||
# 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 = '2.1.2' unless defined? RAILS_GEM_VERSION
|
||||
|
||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||
require File.join(File.dirname(__FILE__), 'boot')
|
||||
|
||||
# Load Engine plugin if available
|
||||
begin
|
||||
require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
|
||||
rescue LoadError
|
||||
# Not available
|
||||
end
|
||||
|
||||
Rails::Initializer.run do |config|
|
||||
# Settings in config/environments/* take precedence those specified here
|
||||
|
||||
# Skip frameworks you're not going to use
|
||||
# config.frameworks -= [ :action_web_service, :action_mailer ]
|
||||
|
||||
# Add additional load paths for sweepers
|
||||
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )
|
||||
|
||||
# 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
|
||||
config.action_controller.session_store = :PStore
|
||||
|
||||
# Enable page/fragment caching by setting a file-based store
|
||||
# (remember to create the caching directory and make it readable to the application)
|
||||
# config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
||||
|
||||
# Activate observers that should always be running
|
||||
# config.active_record.observers = :cacher, :garbage_collector
|
||||
config.active_record.observers = :message_observer
|
||||
|
||||
# Make Active Record use UTC-base instead of local time
|
||||
# config.active_record.default_timezone = :utc
|
||||
|
||||
# Use Active Record's schema dumper instead of SQL when creating the test database
|
||||
# (enables use of different database adapters for development and test environments)
|
||||
# config.active_record.schema_format = :ruby
|
||||
|
||||
# Deliveries are disabled by default. Do NOT modify this section.
|
||||
# Define your email configuration in email.yml instead.
|
||||
# It will automatically turn deliveries on
|
||||
config.action_mailer.perform_deliveries = false
|
||||
end
|
||||
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
config.log_level = :info
|
||||
|
||||
# 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 mail delivery
|
||||
config.action_mailer.perform_deliveries = false
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# 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
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.action_controller.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
|
||||
# No email in production log
|
||||
config.action_mailer.logger = nil
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
config.action_mailer.delivery_method = :test
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
config.action_mailer.delivery_method = :test
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
config.action_mailer.delivery_method = :test
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
ActiveRecord::Errors.default_error_messages = {
|
||||
:inclusion => "activerecord_error_inclusion",
|
||||
:exclusion => "activerecord_error_exclusion",
|
||||
:invalid => "activerecord_error_invalid",
|
||||
:confirmation => "activerecord_error_confirmation",
|
||||
:accepted => "activerecord_error_accepted",
|
||||
:empty => "activerecord_error_empty",
|
||||
:blank => "activerecord_error_blank",
|
||||
:too_long => "activerecord_error_too_long",
|
||||
:too_short => "activerecord_error_too_short",
|
||||
:wrong_length => "activerecord_error_wrong_length",
|
||||
:taken => "activerecord_error_taken",
|
||||
:not_a_number => "activerecord_error_not_a_number"
|
||||
}
|
||||
|
||||
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
|
||||
@@ -0,0 +1,5 @@
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
|
||||
Mime::SET << Mime::CSV unless Mime::SET.include?(Mime::CSV)
|
||||
Mime::Type.register 'application/pdf', :pdf
|
||||
Mime::Type.register 'image/png', :png
|
||||
@@ -0,0 +1,7 @@
|
||||
GLoc.set_config :default_language => :en
|
||||
GLoc.clear_strings
|
||||
GLoc.set_kcode
|
||||
GLoc.load_localized_strings
|
||||
GLoc.set_config(:raise_string_not_found_errors => false)
|
||||
|
||||
require 'redmine'
|
||||
@@ -0,0 +1,17 @@
|
||||
# Loads action_mailer settings from email.yml
|
||||
# and turns deliveries on if configuration file is found
|
||||
|
||||
filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
|
||||
if File.file?(filename)
|
||||
mailconfig = YAML::load_file(filename)
|
||||
|
||||
if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
|
||||
# Enable deliveries
|
||||
ActionMailer::Base.perform_deliveries = true
|
||||
|
||||
mailconfig[Rails.env].each do |k, v|
|
||||
v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
|
||||
ActionMailer::Base.send("#{k}=", v)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,51 @@
|
||||
ActionController::Routing::Routes.draw do |map|
|
||||
# Add your own custom routes here.
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
|
||||
# Here's a sample route:
|
||||
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
||||
# Keep in mind you can assign values other than :controller and :action
|
||||
|
||||
# Allow Redmine plugins to map routes and potentially override them
|
||||
Rails.plugins.each do |plugin|
|
||||
map.from_plugin plugin.name.to_sym
|
||||
end
|
||||
|
||||
map.home '', :controller => 'welcome'
|
||||
map.signin 'login', :controller => 'account', :action => 'login'
|
||||
map.signout 'logout', :controller => 'account', :action => 'logout'
|
||||
|
||||
map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
|
||||
map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
|
||||
map.connect 'help/:ctrl/:page', :controller => 'help'
|
||||
#map.connect ':controller/:action/:id/:sort_key/:sort_order'
|
||||
|
||||
map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations'
|
||||
map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
|
||||
map.connect 'projects/:project_id/news/:action', :controller => 'news'
|
||||
map.connect 'projects/:project_id/documents/:action', :controller => 'documents'
|
||||
map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
|
||||
map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
|
||||
map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
|
||||
|
||||
map.with_options :controller => 'repositories' do |omap|
|
||||
omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
|
||||
omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes'
|
||||
omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff'
|
||||
omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry'
|
||||
omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
|
||||
omap.repositories_revision 'repositories/revision/:id/:rev', :action => 'revision'
|
||||
end
|
||||
|
||||
map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
|
||||
map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
|
||||
map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,142 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
# DO NOT MODIFY THIS FILE !!!
|
||||
# Settings can be defined through the application in Admin -> Settings
|
||||
|
||||
app_title:
|
||||
default: Redmine
|
||||
app_subtitle:
|
||||
default: Project management
|
||||
welcome_text:
|
||||
default:
|
||||
login_required:
|
||||
default: 0
|
||||
self_registration:
|
||||
default: '2'
|
||||
lost_password:
|
||||
default: 1
|
||||
attachment_max_size:
|
||||
format: int
|
||||
default: 5120
|
||||
issues_export_limit:
|
||||
format: int
|
||||
default: 500
|
||||
activity_days_default:
|
||||
format: int
|
||||
default: 30
|
||||
per_page_options:
|
||||
default: '25,50,100'
|
||||
mail_from:
|
||||
default: redmine@example.net
|
||||
bcc_recipients:
|
||||
default: 1
|
||||
plain_text_mail:
|
||||
default: 0
|
||||
text_formatting:
|
||||
default: textile
|
||||
wiki_compression:
|
||||
default: ""
|
||||
default_language:
|
||||
default: en
|
||||
host_name:
|
||||
default: localhost:3000
|
||||
protocol:
|
||||
default: http
|
||||
feeds_limit:
|
||||
format: int
|
||||
default: 15
|
||||
diff_max_lines_displayed:
|
||||
format: int
|
||||
default: 1500
|
||||
enabled_scm:
|
||||
serialized: true
|
||||
default:
|
||||
- Subversion
|
||||
- Darcs
|
||||
- Mercurial
|
||||
- Cvs
|
||||
- Bazaar
|
||||
- Git
|
||||
autofetch_changesets:
|
||||
default: 1
|
||||
sys_api_enabled:
|
||||
default: 0
|
||||
commit_ref_keywords:
|
||||
default: 'refs,references,IssueID'
|
||||
commit_fix_keywords:
|
||||
default: 'fixes,closes'
|
||||
commit_fix_status_id:
|
||||
format: int
|
||||
default: 0
|
||||
commit_fix_done_ratio:
|
||||
default: 100
|
||||
# autologin duration in days
|
||||
# 0 means autologin is disabled
|
||||
autologin:
|
||||
format: int
|
||||
default: 0
|
||||
# date format
|
||||
date_format:
|
||||
default: ''
|
||||
time_format:
|
||||
default: ''
|
||||
user_format:
|
||||
default: :firstname_lastname
|
||||
format: symbol
|
||||
cross_project_issue_relations:
|
||||
default: 0
|
||||
notified_events:
|
||||
serialized: true
|
||||
default:
|
||||
- issue_added
|
||||
- issue_updated
|
||||
mail_handler_api_enabled:
|
||||
default: 0
|
||||
mail_handler_api_key:
|
||||
default:
|
||||
issue_list_default_columns:
|
||||
serialized: true
|
||||
default:
|
||||
- tracker
|
||||
- status
|
||||
- priority
|
||||
- subject
|
||||
- assigned_to
|
||||
- updated_on
|
||||
display_subprojects_issues:
|
||||
default: 1
|
||||
default_projects_public:
|
||||
default: 1
|
||||
sequential_project_identifiers:
|
||||
default: 0
|
||||
# encodings used to convert repository files content to UTF-8
|
||||
# multiple values accepted, comma separated
|
||||
repositories_encodings:
|
||||
default: ''
|
||||
# encoding used to convert commit logs to UTF-8
|
||||
commit_logs_encoding:
|
||||
default: 'UTF-8'
|
||||
ui_theme:
|
||||
default: ''
|
||||
emails_footer:
|
||||
default: |-
|
||||
You have received this notification because you have either subscribed to it, or are involved in it.
|
||||
To change your notification preferences, please click here: http://hostname/my/account
|
||||
gravatar_enabled:
|
||||
default: 0
|
||||
Reference in New Issue
Block a user