🚀 Sólo código modificado para instalar con docker
This commit is contained in:
parent
41d93da720
commit
de8d940598
2217 changed files with 1 additions and 278373 deletions
|
@ -1,10 +0,0 @@
|
|||
# Copy this file to additional_environment.rb and add any statements
|
||||
# that need to be passed to the Rails::Initializer. `config` is
|
||||
# available in this context.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# config.log_level = :debug
|
||||
# ...
|
||||
#
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails'
|
||||
# Pick the frameworks you want:
|
||||
require 'active_model/railtie'
|
||||
require 'active_job/railtie'
|
||||
require 'active_record/railtie'
|
||||
require 'active_storage/engine'
|
||||
require 'action_controller/railtie'
|
||||
require 'action_mailer/railtie'
|
||||
require 'action_view/railtie'
|
||||
require 'action_cable/engine'
|
||||
# require 'sprockets/railtie'
|
||||
require 'rails/test_unit/railtie'
|
||||
|
||||
Bundler.require(*Rails.groups)
|
||||
|
||||
module RedmineApp
|
||||
class Application < Rails::Application
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
||||
# Custom directories with classes and modules you want to be autoloadable.
|
||||
config.autoload_paths += %W(#{config.root}/lib)
|
||||
|
||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
||||
config.active_record.store_full_sti_class = true
|
||||
config.active_record.default_timezone = :local
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
# config.time_zone = 'Central Time (US & Canada)'
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
|
||||
config.i18n.enforce_available_locales = true
|
||||
config.i18n.fallbacks = true
|
||||
config.i18n.default_locale = 'en'
|
||||
|
||||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
config.filter_parameters += [:password]
|
||||
|
||||
config.action_mailer.perform_deliveries = false
|
||||
|
||||
# Do not include all helpers
|
||||
config.action_controller.include_all_helpers = false
|
||||
|
||||
# Since Redmine 4.0, boolean values are stored in sqlite3 databases as 1 and 0
|
||||
config.active_record.sqlite3.represent_boolean_as_integer = true
|
||||
|
||||
# Sets the Content-Length header on responses with fixed-length bodies
|
||||
config.middleware.insert_before Rack::Sendfile, Rack::ContentLength
|
||||
|
||||
# Verify validity of user sessions
|
||||
config.redmine_verify_sessions = true
|
||||
|
||||
# Specific cache for search results, the default file store cache is not
|
||||
# a good option as it could grow fast. A memory store (32MB max) is used
|
||||
# as the default. If you're running multiple server processes, it's
|
||||
# recommended to switch to a shared cache store (eg. mem_cache_store).
|
||||
# See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
|
||||
# for more options (same options as config.cache_store).
|
||||
config.redmine_search_cache_store = :memory_store
|
||||
|
||||
# Configure log level here so that additional environment file
|
||||
# can change it (environments/ENV.rb would take precedence over it)
|
||||
config.log_level = Rails.env.production? ? :info : :debug
|
||||
|
||||
config.session_store :cookie_store,
|
||||
:key => '_redmine_session',
|
||||
:path => config.relative_url_root || '/',
|
||||
:same_site => :lax
|
||||
|
||||
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
|
||||
instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
|
@ -1,143 +0,0 @@
|
|||
# CKEditor configuration:
|
||||
contentsCss: '/themes/circlepro/stylesheets/editor.css'
|
||||
allowedContent: true
|
||||
bodyClass: 'wiki'
|
||||
removePlugins: 'codemirror,div,flash,forms,iframe,copyformatting,elementspath'
|
||||
forcePasteAsPlainText: false
|
||||
entities: false
|
||||
|
||||
# CodeSnipet plugin configuration:
|
||||
codeSnippet_languages: {
|
||||
apache: 'Apache',
|
||||
awk: 'Awk',
|
||||
bash: 'Bash',
|
||||
bat: '.bat / DOS',
|
||||
cpp: 'C++',
|
||||
css: 'CSS',
|
||||
diff: 'Diff',
|
||||
dockerfile: 'Dockerfile',
|
||||
html: 'HTML',
|
||||
ini: '.ini / TOML',
|
||||
java: 'Java',
|
||||
javascript: 'JavaScript',
|
||||
json: 'JSON',
|
||||
makefile: 'Makefile',
|
||||
markdown: 'Markdown',
|
||||
nginx: 'Nginx',
|
||||
php: 'PHP',
|
||||
perl: 'Perl',
|
||||
ruby: 'Ruby',
|
||||
rust: 'Rust',
|
||||
sql: 'SQL',
|
||||
xhtml: 'XHTML',
|
||||
xml: 'XML',
|
||||
yaml: 'YAML'
|
||||
}
|
||||
|
||||
# Youtube plugin defaults:
|
||||
youtube_responsive: true
|
||||
|
||||
# HTML sanitizer configuration:
|
||||
allowedProtocols:
|
||||
- afs
|
||||
- aim
|
||||
- callto
|
||||
- ed2k
|
||||
- feed
|
||||
- ftp
|
||||
- gopher
|
||||
- http
|
||||
- https
|
||||
- irc
|
||||
- mailto
|
||||
- news
|
||||
- nntp
|
||||
- rsync
|
||||
- rtsp
|
||||
- sftp
|
||||
- ssh
|
||||
- tag
|
||||
- telnet
|
||||
- urn
|
||||
- webcal
|
||||
- xmpp
|
||||
|
||||
allowedTags:
|
||||
- a
|
||||
- abbr
|
||||
- acronym
|
||||
- address
|
||||
- b
|
||||
- big
|
||||
- blockquote
|
||||
- br
|
||||
- caption
|
||||
- cite
|
||||
- code
|
||||
- dd
|
||||
- del
|
||||
- dfn
|
||||
- div
|
||||
- dt
|
||||
- em
|
||||
- h1
|
||||
- h2
|
||||
- h3
|
||||
- h4
|
||||
- h5
|
||||
- h6
|
||||
- hr
|
||||
- i
|
||||
- iframe
|
||||
- img
|
||||
- ins
|
||||
- kbd
|
||||
- li
|
||||
- ol
|
||||
- p
|
||||
- pre
|
||||
- s
|
||||
- samp
|
||||
- small
|
||||
- span
|
||||
- strike
|
||||
- strong
|
||||
- sub
|
||||
- sup
|
||||
- table
|
||||
- tbody
|
||||
- td
|
||||
- tfoot
|
||||
- th
|
||||
- thead
|
||||
- tr
|
||||
- tt
|
||||
- u
|
||||
- ul
|
||||
- var
|
||||
|
||||
allowedAttributes:
|
||||
- abbr
|
||||
- align
|
||||
- alt
|
||||
- border
|
||||
- cellpadding
|
||||
- cellspacing
|
||||
- cite
|
||||
- class
|
||||
- colspan
|
||||
- datetime
|
||||
- dir
|
||||
- height
|
||||
- href
|
||||
- name
|
||||
- nowrap
|
||||
- reversed
|
||||
- rowspan
|
||||
- src
|
||||
- start
|
||||
- style
|
||||
- title
|
||||
- valign
|
||||
- width
|
||||
- xml:lang
|
|
@ -1,232 +0,0 @@
|
|||
# = Redmine configuration file
|
||||
#
|
||||
# Each environment has its own configuration options. If you are only
|
||||
# running in production, only the production block needs to be configured.
|
||||
# Environment specific configuration options override the default ones.
|
||||
#
|
||||
# Note that this file needs to be a valid YAML file.
|
||||
# DO NOT USE TABS! Use 2 spaces instead of tabs for indentation.
|
||||
|
||||
# default configuration options for all environments
|
||||
default:
|
||||
# Outgoing emails configuration
|
||||
# See the examples below and the Rails guide for more configuration options:
|
||||
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
|
||||
email_delivery:
|
||||
|
||||
# ==== Simple SMTP server at localhost
|
||||
#
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: "localhost"
|
||||
# port: 25
|
||||
#
|
||||
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
|
||||
#
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: "example.com"
|
||||
# port: 25
|
||||
# authentication: :login
|
||||
# domain: 'foo.com'
|
||||
# user_name: 'myaccount'
|
||||
# password: 'password'
|
||||
#
|
||||
# ==== SMTP server at example.com using PLAIN authentication
|
||||
#
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: "example.com"
|
||||
# port: 25
|
||||
# authentication: :plain
|
||||
# domain: 'example.com'
|
||||
# user_name: 'myaccount'
|
||||
# password: 'password'
|
||||
#
|
||||
# ==== SMTP server at using TLS (GMail)
|
||||
# This might require some additional configuration. See the guides at:
|
||||
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
|
||||
#
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# enable_starttls_auto: true
|
||||
# address: "smtp.gmail.com"
|
||||
# port: 587
|
||||
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
|
||||
# authentication: :plain
|
||||
# user_name: "your_email@gmail.com"
|
||||
# password: "your_password"
|
||||
#
|
||||
# ==== Sendmail command
|
||||
#
|
||||
# email_delivery:
|
||||
# delivery_method: :sendmail
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
# Your Redmine instance needs to have write permission on this
|
||||
# directory.
|
||||
# Examples:
|
||||
# attachments_storage_path: /var/redmine/files
|
||||
# attachments_storage_path: D:/redmine/files
|
||||
attachments_storage_path:
|
||||
|
||||
# Configuration of the autologin cookie.
|
||||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||
# autologin_cookie_path: the cookie path (default: /)
|
||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||
autologin_cookie_name:
|
||||
autologin_cookie_path:
|
||||
autologin_cookie_secure:
|
||||
|
||||
# Configuration of SCM executable command.
|
||||
#
|
||||
# Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
|
||||
# On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
|
||||
#
|
||||
# On Windows + JRuby 1.6.2, path which contains spaces does not work.
|
||||
# For example, "C:\Program Files\TortoiseHg\hg.exe".
|
||||
# If you want to this feature, you need to install to the path which does not contains spaces.
|
||||
# For example, "C:\TortoiseHg\hg.exe".
|
||||
#
|
||||
# Examples:
|
||||
# scm_subversion_command: svn # (default: svn)
|
||||
# scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
|
||||
# scm_git_command: /usr/local/bin/git # (default: git)
|
||||
# scm_cvs_command: cvs # (default: cvs)
|
||||
# scm_bazaar_command: bzr.exe # (default: bzr)
|
||||
#
|
||||
scm_subversion_command:
|
||||
scm_mercurial_command:
|
||||
scm_git_command:
|
||||
scm_cvs_command:
|
||||
scm_bazaar_command:
|
||||
|
||||
# SCM paths validation.
|
||||
#
|
||||
# You can configure a regular expression for each SCM that will be used to
|
||||
# validate the path of new repositories (eg. path entered by users with the
|
||||
# "Manage repositories" permission and path returned by reposman.rb).
|
||||
# The regexp will be wrapped with \A \z, so it must match the whole path.
|
||||
# And the regexp is case sensitive.
|
||||
#
|
||||
# You can match the project identifier by using %project% in the regexp.
|
||||
#
|
||||
# You can also set a custom hint message for each SCM that will be displayed
|
||||
# on the repository form instead of the default one.
|
||||
#
|
||||
# Examples:
|
||||
# scm_subversion_path_regexp: file:///svnpath/[a-z0-9_]+
|
||||
# scm_subversion_path_info: SVN URL (eg. file:///svnpath/foo)
|
||||
#
|
||||
# scm_git_path_regexp: /gitpath/%project%(\.[a-z0-9_])?/
|
||||
#
|
||||
scm_subversion_path_regexp:
|
||||
scm_mercurial_path_regexp:
|
||||
scm_git_path_regexp:
|
||||
scm_cvs_path_regexp:
|
||||
scm_bazaar_path_regexp:
|
||||
scm_filesystem_path_regexp:
|
||||
|
||||
# Absolute path to the SCM commands errors (stderr) log file.
|
||||
# The default is to log in the 'log' directory of your Redmine instance.
|
||||
# Example:
|
||||
# scm_stderr_log_file: /var/log/redmine_scm_stderr.log
|
||||
scm_stderr_log_file:
|
||||
|
||||
# Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
|
||||
# If you don't want to enable data encryption, just leave it blank.
|
||||
# WARNING: losing/changing this key will make encrypted data unreadable.
|
||||
#
|
||||
# If you want to encrypt existing passwords in your database:
|
||||
# * set the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
#
|
||||
# If you have encrypted data and want to change this key, you have to:
|
||||
# * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
|
||||
# * change the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
database_cipher_key:
|
||||
|
||||
# Set this to false to disable plugins' assets mirroring on startup.
|
||||
# You can use `rake redmine:plugins:assets` to manually mirror assets
|
||||
# to public/plugin_assets when you install/upgrade a Redmine plugin.
|
||||
#
|
||||
#mirror_plugins_assets_on_startup: false
|
||||
|
||||
# Your secret key for verifying cookie session data integrity. If you
|
||||
# change this key, all old sessions will become invalid! Make sure the
|
||||
# secret is at least 30 characters and all random, no regular words or
|
||||
# you'll be exposed to dictionary attacks.
|
||||
#
|
||||
# If you have a load-balancing Redmine cluster, you have to use the
|
||||
# same secret token on each machine.
|
||||
#secret_token: 'change it to a long random string'
|
||||
|
||||
# Requires users to re-enter their password for sensitive actions (editing
|
||||
# of account data, project memberships, application settings, user, group,
|
||||
# role, auth source management and project deletion). Disabled by default.
|
||||
# Timeout is set in minutes.
|
||||
#
|
||||
#sudo_mode: true
|
||||
#sudo_mode_timeout: 15
|
||||
|
||||
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
|
||||
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
||||
#imagemagick_convert_command:
|
||||
|
||||
# Absolute path (e.g. /usr/bin/gs, c:/ghostscript/gs.exe) to
|
||||
# the `gs` binary. Used to generate attachment thumbnails of PDF files.
|
||||
#gs_command:
|
||||
|
||||
# Configuration of MiniMagick font.
|
||||
#
|
||||
# Redmine uses MiniMagick in order to export a gantt chart to a PNG image.
|
||||
# This setting is necessary to properly display CJK (Chinese, Japanese,
|
||||
# and Korean) characters in the PNG image. Please make sure that the
|
||||
# specified font is installed in the Redmine server.
|
||||
#
|
||||
# This setting is necessary only when CJK characters are used in gantt.
|
||||
#
|
||||
# Note that rmagick_font_path in prior to Redmine 4.1.0 has been renamed
|
||||
# to minimagick_font_path.
|
||||
#
|
||||
# Examples for Japanese:
|
||||
# Windows:
|
||||
# minimagick_font_path: C:\windows\fonts\msgothic.ttc
|
||||
# Linux:
|
||||
# minimagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
#
|
||||
minimagick_font_path:
|
||||
|
||||
# Maximum number of simultaneous AJAX uploads
|
||||
#max_concurrent_ajax_uploads: 2
|
||||
|
||||
# Configure OpenIdAuthentication.store
|
||||
#
|
||||
# allowed values: :memory, :file, :memcache
|
||||
#openid_authentication_store: :memory
|
||||
|
||||
# URL of the avatar server
|
||||
#
|
||||
# By default, Redmine uses Gravatar as the avatar server for displaying
|
||||
# user icons. You can switch to another Gravatar-compatible server such
|
||||
# as Libravatar and opensource servers listed on
|
||||
# https://wiki.libravatar.org/running_your_own/
|
||||
#
|
||||
# URL of each avatar is: #{avatar_server_url}/avatar/#{hash}
|
||||
#
|
||||
#avatar_server_url: https://www.gravatar.com # default
|
||||
#avatar_server_url: https://seccdn.libravatar.org
|
||||
|
||||
# specific configuration options for production environment
|
||||
# that overrides the default ones
|
||||
production:
|
||||
|
||||
# specific configuration options for development environment
|
||||
# that overrides the default ones
|
||||
development:
|
|
@ -1,54 +0,0 @@
|
|||
# Default setup is given for MySQL 5.7.7 or later.
|
||||
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
|
||||
# Line indentation must be 2 spaces (no tabs).
|
||||
|
||||
production:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
host: localhost
|
||||
username: root
|
||||
password: ""
|
||||
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
|
||||
encoding: utf8mb4
|
||||
|
||||
development:
|
||||
adapter: mysql2
|
||||
database: redmine_development
|
||||
host: localhost
|
||||
username: root
|
||||
password: ""
|
||||
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
|
||||
encoding: utf8mb4
|
||||
|
||||
# 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: mysql2
|
||||
database: redmine_test
|
||||
host: localhost
|
||||
username: root
|
||||
password: ""
|
||||
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
|
||||
encoding: utf8mb4
|
||||
|
||||
# PostgreSQL configuration example
|
||||
#production:
|
||||
# adapter: postgresql
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: postgres
|
||||
# password: "postgres"
|
||||
|
||||
# SQLite3 configuration example
|
||||
#production:
|
||||
# adapter: sqlite3
|
||||
# database: db/redmine.sqlite3
|
||||
|
||||
# SQL Server configuration example
|
||||
#production:
|
||||
# adapter: sqlserver
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: jenkins
|
||||
# password: jenkins
|
|
@ -1,16 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Load the Rails application
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Make sure there's no plugin in vendor/plugin before starting
|
||||
vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")
|
||||
if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
|
||||
$stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " \
|
||||
"Please, put your Redmine plugins in the `plugins` directory at the root of your " \
|
||||
"Redmine directory (#{File.join(Rails.root, "plugins")})"
|
||||
exit 1
|
||||
end
|
||||
|
||||
# Initialize the Rails application
|
||||
Rails.application.initialize!
|
|
@ -1,23 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.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
|
||||
|
||||
# Do not eager load code on boot.
|
||||
config.eager_load = false
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Disable delivery errors
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Print deprecation notices to stderr and the Rails logger.
|
||||
config.active_support.deprecation = [:stderr, :log]
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests.
|
||||
config.cache_classes = true
|
||||
|
||||
# Eager load code on boot. This eager loads most of Rails and
|
||||
# your application in memory, allowing both threaded web servers
|
||||
# and those relying on copy on write to perform better.
|
||||
# Rake tasks automatically ignore this option for performance.
|
||||
config.eager_load = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on.
|
||||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Disable delivery errors
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# No email in production log
|
||||
config.action_mailer.logger = nil
|
||||
|
||||
# Print deprecation notices to the Rails logger.
|
||||
config.active_support.deprecation = :log
|
||||
end
|
|
@ -1,43 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.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
|
||||
|
||||
# Do not eager load code on boot. This avoids loading your whole application
|
||||
# just for the purpose of running a single test. If you are using a tool that
|
||||
# preloads Rails for running tests, you may have to set it to true.
|
||||
config.eager_load = false
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
|
||||
# Tell Action Mailer 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
|
||||
|
||||
# Disable Async delivery
|
||||
config.active_job.queue_adapter = :inline
|
||||
|
||||
# Disable request forgery protection in test environment.
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
# Disable sessions verifications in test environment.
|
||||
config.redmine_verify_sessions = false
|
||||
|
||||
# Print deprecation notices to stderr and the Rails logger.
|
||||
config.active_support.deprecation = [:stderr, :log]
|
||||
|
||||
config.secret_key_base = 'a secret token for running the tests'
|
||||
|
||||
config.active_support.test_order = :random
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Same as test.rb
|
||||
instance_eval File.read(File.join(File.dirname(__FILE__), 'test.rb'))
|
|
@ -1,4 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Same as test.rb
|
||||
instance_eval File.read(File.join(File.dirname(__FILE__), 'test.rb'))
|
|
@ -1,17 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Loads the core plugins located in lib/plugins
|
||||
Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory|
|
||||
if File.directory?(directory)
|
||||
lib = File.join(directory, "lib")
|
||||
if File.directory?(lib)
|
||||
$:.unshift lib
|
||||
ActiveSupport::Dependencies.autoload_paths += [lib]
|
||||
end
|
||||
initializer = File.join(directory, "init.rb")
|
||||
if File.file?(initializer)
|
||||
config = RedmineApp::Application.config
|
||||
eval(File.read(initializer), binding, initializer)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,229 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'active_record'
|
||||
|
||||
module ActiveRecord
|
||||
class Base
|
||||
include Redmine::I18n
|
||||
# Translate attribute names for validation errors display
|
||||
def self.human_attribute_name(attr, options = {})
|
||||
prepared_attr = attr.to_s.sub(/_id$/, '').sub(/^.+\./, '')
|
||||
class_prefix = name.underscore.tr('/', '_')
|
||||
|
||||
redmine_default = [
|
||||
:"field_#{class_prefix}_#{prepared_attr}",
|
||||
:"field_#{prepared_attr}"
|
||||
]
|
||||
|
||||
options[:default] = redmine_default + Array(options[:default])
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
# Undefines private Kernel#open method to allow using `open` scopes in models.
|
||||
# See Defect #11545 (http://www.redmine.org/issues/11545) for details.
|
||||
class Base
|
||||
class << self
|
||||
undef open
|
||||
end
|
||||
end
|
||||
class Relation ; undef open ; end
|
||||
end
|
||||
|
||||
module ActionView
|
||||
module Helpers
|
||||
module DateHelper
|
||||
# distance_of_time_in_words breaks when difference is greater than 30 years
|
||||
def distance_of_date_in_words(from_date, to_date = 0, options = {})
|
||||
from_date = from_date.to_date if from_date.respond_to?(:to_date)
|
||||
to_date = to_date.to_date if to_date.respond_to?(:to_date)
|
||||
distance_in_days = (to_date - from_date).abs
|
||||
|
||||
I18n.with_options :locale => options[:locale], :scope => :'datetime.distance_in_words' do |locale|
|
||||
case distance_in_days
|
||||
when 0..60 then locale.t :x_days, :count => distance_in_days.round
|
||||
when 61..720 then locale.t :about_x_months, :count => (distance_in_days / 30).round
|
||||
else locale.t :over_x_years, :count => (distance_in_days / 365).floor
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Resolver
|
||||
def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[])
|
||||
cached(key, [name, prefix, partial], details, locals) do
|
||||
if (details[:formats] & [:xml, :json]).any?
|
||||
details = details.dup
|
||||
details[:formats] = details[:formats].dup + [:api]
|
||||
end
|
||||
find_templates(name, prefix, partial, details)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| html_tag || ''.html_safe }
|
||||
|
||||
# HTML5: <option value=""></option> is invalid, use <option value=""> </option> instead
|
||||
module ActionView
|
||||
module Helpers
|
||||
module Tags
|
||||
class Base
|
||||
private
|
||||
alias :add_options_without_non_empty_blank_option :add_options
|
||||
def add_options(option_tags, options, value = nil)
|
||||
if options[:include_blank] == true
|
||||
options = options.dup
|
||||
options[:include_blank] = ' '.html_safe
|
||||
end
|
||||
add_options_without_non_empty_blank_option(option_tags, options, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module FormTagHelper
|
||||
alias :select_tag_without_non_empty_blank_option :select_tag
|
||||
def select_tag(name, option_tags = nil, options = {})
|
||||
if options.delete(:include_blank)
|
||||
options[:prompt] = ' '.html_safe
|
||||
end
|
||||
select_tag_without_non_empty_blank_option(name, option_tags, options)
|
||||
end
|
||||
end
|
||||
|
||||
module FormOptionsHelper
|
||||
alias :options_for_select_without_non_empty_blank_option :options_for_select
|
||||
def options_for_select(container, selected = nil)
|
||||
if container.is_a?(Array)
|
||||
container = container.map {|element| element.presence || [" ".html_safe, ""]}
|
||||
end
|
||||
options_for_select_without_non_empty_blank_option(container, selected)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'mail'
|
||||
|
||||
module DeliveryMethods
|
||||
class TmpFile
|
||||
def initialize(*args); end
|
||||
|
||||
def deliver!(mail)
|
||||
dest_dir = File.join(Rails.root, 'tmp', 'emails')
|
||||
Dir.mkdir(dest_dir) unless File.directory?(dest_dir)
|
||||
filename = "#{Time.now.to_i}_#{mail.message_id.gsub(/[<>]/, '')}.eml"
|
||||
File.open(File.join(dest_dir, filename), 'wb') {|f| f.write(mail.encoded) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionMailer::Base.add_delivery_method :tmp_file, DeliveryMethods::TmpFile
|
||||
|
||||
# Changes how sent emails are logged
|
||||
# Rails doesn't log cc and bcc which is misleading when using bcc only (#12090)
|
||||
module ActionMailer
|
||||
class LogSubscriber < ActiveSupport::LogSubscriber
|
||||
def deliver(event)
|
||||
recipients = [:to, :cc, :bcc].inject(+"") do |s, header|
|
||||
r = Array.wrap(event.payload[header])
|
||||
if r.any?
|
||||
s << "\n #{header}: #{r.join(', ')}"
|
||||
end
|
||||
s
|
||||
end
|
||||
info("\nSent email \"#{event.payload[:subject]}\" (%1.fms)#{recipients}" % event.duration)
|
||||
debug(event.payload[:mail])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module ActionController
|
||||
module MimeResponds
|
||||
class Collector
|
||||
def api(&block)
|
||||
any(:xml, :json, &block)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module ActionController
|
||||
class Base
|
||||
# Displays an explicit message instead of a NoMethodError exception
|
||||
# when trying to start Redmine with an old session_store.rb
|
||||
# TODO: remove it in a later version
|
||||
def self.session=(*args)
|
||||
$stderr.puts "Please remove config/initializers/session_store.rb and run `rake generate_secret_token`.\n" +
|
||||
"Setting the session secret with ActionController.session= is no longer supported."
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Adds asset_id parameters to assets like Rails 3 to invalidate caches in browser
|
||||
module ActionView
|
||||
module Helpers
|
||||
module AssetUrlHelper
|
||||
@@cache_asset_timestamps = Rails.env.production?
|
||||
@@asset_timestamps_cache = {}
|
||||
@@asset_timestamps_cache_guard = Mutex.new
|
||||
|
||||
def asset_path_with_asset_id(source, options = {})
|
||||
asset_id = rails_asset_id(source, options)
|
||||
unless asset_id.blank?
|
||||
source += "?#{asset_id}"
|
||||
end
|
||||
asset_path(source, options.merge(skip_pipeline: true))
|
||||
end
|
||||
alias :path_to_asset :asset_path_with_asset_id
|
||||
|
||||
def rails_asset_id(source, options = {})
|
||||
if asset_id = ENV["RAILS_ASSET_ID"]
|
||||
asset_id
|
||||
else
|
||||
if @@cache_asset_timestamps && (asset_id = @@asset_timestamps_cache[source])
|
||||
asset_id
|
||||
else
|
||||
extname = compute_asset_extname(source, options)
|
||||
path = File.join(Rails.public_path, "#{source}#{extname}")
|
||||
exist = false
|
||||
if File.exist? path
|
||||
exist = true
|
||||
else
|
||||
path = File.join(Rails.public_path, public_compute_asset_path("#{source}#{extname}", options))
|
||||
if File.exist? path
|
||||
exist = true
|
||||
end
|
||||
end
|
||||
asset_id = exist ? File.mtime(path).to_i.to_s : ''
|
||||
|
||||
if @@cache_asset_timestamps
|
||||
@@asset_timestamps_cache_guard.synchronize do
|
||||
@@asset_timestamps_cache[source] = asset_id
|
||||
end
|
||||
end
|
||||
|
||||
asset_id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# https://github.com/rack/rack/pull/1703
|
||||
# TODO: remove this when Rack is updated to 3.0.0
|
||||
require 'rack'
|
||||
module Rack
|
||||
class RewindableInput
|
||||
unless method_defined?(:size)
|
||||
def size
|
||||
make_rewindable unless @rewindable_io
|
||||
@rewindable_io.size
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
|
@ -1,40 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
I18n.backend = Redmine::I18n::Backend.new
|
||||
# Forces I18n to load available locales from the backend
|
||||
I18n.config.available_locales = nil
|
||||
|
||||
require 'redmine'
|
||||
|
||||
# Load the secret token from the Redmine configuration file
|
||||
secret = Redmine::Configuration['secret_token']
|
||||
if secret.present?
|
||||
RedmineApp::Application.config.secret_token = secret
|
||||
end
|
||||
|
||||
if Object.const_defined?(:OpenIdAuthentication)
|
||||
openid_authentication_store = Redmine::Configuration['openid_authentication_store']
|
||||
OpenIdAuthentication.store = openid_authentication_store.presence || :memory
|
||||
end
|
||||
|
||||
Redmine::Plugin.load
|
||||
|
||||
plugin_assets_dirs = {}
|
||||
Redmine::Plugin.all.each do |plugin|
|
||||
plugin_assets_dirs[plugin.assets_directory] = ["*"]
|
||||
end
|
||||
plugin_assets_reloader = ActiveSupport::FileUpdateChecker.new([], plugin_assets_dirs) do
|
||||
Redmine::Plugin.mirror_assets
|
||||
end
|
||||
Rails.application.reloaders << plugin_assets_reloader
|
||||
unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
|
||||
plugin_assets_reloader.execute
|
||||
end
|
||||
|
||||
Rails.application.config.to_prepare do
|
||||
Redmine::FieldFormat::RecordList.subclasses.each do |klass|
|
||||
klass.instance.reset_target_class
|
||||
end
|
||||
|
||||
plugin_assets_reloader.execute_if_updated
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||
|
||||
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
||||
# Rails.backtrace_cleaner.remove_silencers!
|
||||
|
||||
# Do not remove plugins backtrace
|
||||
Rails.backtrace_cleaner.remove_silencers!
|
||||
Rails.backtrace_cleaner.add_silencer { |line| line !~ /^\/?(app|config|lib|plugins|test)/ }
|
|
@ -1,12 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
# (all these examples are active by default):
|
||||
# ActiveSupport::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
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
377
config/routes.rb
377
config/routes.rb
|
@ -1,377 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2019 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.
|
||||
|
||||
Rails.application.routes.draw do
|
||||
root :to => 'welcome#index', :as => 'home'
|
||||
|
||||
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
||||
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
||||
match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register'
|
||||
match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password'
|
||||
match 'account/activate', :to => 'account#activate', :via => :get
|
||||
get 'account/activation_email', :to => 'account#activation_email', :as => 'activation_email'
|
||||
|
||||
match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put, :patch]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put, :patch]
|
||||
match '/preview/text', :to => 'previews#text', :as => 'preview_text', :via => [:get, :post, :put, :patch]
|
||||
|
||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
||||
get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message'
|
||||
match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post]
|
||||
get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit'
|
||||
|
||||
post 'boards/:board_id/topics/preview', :to => 'messages#preview', :as => 'preview_board_message'
|
||||
post 'boards/:board_id/topics/:id/replies', :to => 'messages#reply'
|
||||
post 'boards/:board_id/topics/:id/edit', :to => 'messages#edit'
|
||||
post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy'
|
||||
|
||||
# Misc issue routes. TODO: move into resources
|
||||
match '/issues/auto_complete', :to => 'auto_completes#issues', :via => :get, :as => 'auto_complete_issues'
|
||||
match '/issues/context_menu', :to => 'context_menus#issues', :as => 'issues_context_menu', :via => [:get, :post]
|
||||
match '/issues/changes', :to => 'journals#index', :as => 'issue_changes', :via => :get
|
||||
match '/issues/:id/quoted', :to => 'journals#new', :id => /\d+/, :via => :post, :as => 'quoted_issue'
|
||||
|
||||
resources :journals, :only => [:edit, :update] do
|
||||
member do
|
||||
get 'diff'
|
||||
end
|
||||
end
|
||||
|
||||
get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt'
|
||||
get '/issues/gantt', :to => 'gantts#show'
|
||||
|
||||
get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar'
|
||||
get '/issues/calendar', :to => 'calendars#show'
|
||||
|
||||
get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report'
|
||||
get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details'
|
||||
|
||||
get '/issues/imports/new', :to => 'imports#new', :defaults => { :type => 'IssueImport' }, :as => 'new_issues_import'
|
||||
get '/time_entries/imports/new', :to => 'imports#new', :defaults => { :type => 'TimeEntryImport' }, :as => 'new_time_entries_import'
|
||||
post '/imports', :to => 'imports#create', :as => 'imports'
|
||||
get '/imports/:id', :to => 'imports#show', :as => 'import'
|
||||
match '/imports/:id/settings', :to => 'imports#settings', :via => [:get, :post], :as => 'import_settings'
|
||||
match '/imports/:id/mapping', :to => 'imports#mapping', :via => [:get, :post], :as => 'import_mapping'
|
||||
match '/imports/:id/run', :to => 'imports#run', :via => [:get, :post], :as => 'import_run'
|
||||
|
||||
match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :put]
|
||||
match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post]
|
||||
match 'my/page', :controller => 'my', :action => 'page', :via => :get
|
||||
post 'my/page', :to => 'my#update_page'
|
||||
match 'my', :controller => 'my', :action => 'index', :via => :get # Redirects to my/page
|
||||
get 'my/api_key', :to => 'my#show_api_key', :as => 'my_api_key'
|
||||
post 'my/api_key', :to => 'my#reset_api_key'
|
||||
post 'my/rss_key', :to => 'my#reset_rss_key', :as => 'my_rss_key'
|
||||
match 'my/password', :controller => 'my', :action => 'password', :via => [:get, :post]
|
||||
match 'my/add_block', :controller => 'my', :action => 'add_block', :via => :post
|
||||
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
|
||||
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
|
||||
|
||||
resources :users do
|
||||
resources :memberships, :controller => 'principal_memberships'
|
||||
resources :email_addresses, :only => [:index, :create, :update, :destroy]
|
||||
end
|
||||
|
||||
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
|
||||
delete 'watchers/watch', :to => 'watchers#unwatch'
|
||||
get 'watchers/new', :to => 'watchers#new', :as => 'new_watchers'
|
||||
post 'watchers', :to => 'watchers#create'
|
||||
post 'watchers/append', :to => 'watchers#append'
|
||||
delete 'watchers', :to => 'watchers#destroy'
|
||||
get 'watchers/autocomplete_for_user', :to => 'watchers#autocomplete_for_user'
|
||||
# Specific routes for issue watchers API
|
||||
post 'issues/:object_id/watchers', :to => 'watchers#create', :object_type => 'issue'
|
||||
delete 'issues/:object_id/watchers/:user_id' => 'watchers#destroy', :object_type => 'issue'
|
||||
|
||||
resources :projects do
|
||||
collection do
|
||||
get 'autocomplete'
|
||||
end
|
||||
|
||||
member do
|
||||
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
||||
post 'archive'
|
||||
post 'unarchive'
|
||||
post 'close'
|
||||
post 'reopen'
|
||||
match 'copy', :via => [:get, :post]
|
||||
match 'bookmark', :via => [:delete, :post]
|
||||
end
|
||||
|
||||
shallow do
|
||||
resources :memberships, :controller => 'members' do
|
||||
collection do
|
||||
get 'autocomplete'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resource :enumerations, :controller => 'project_enumerations', :only => [:update, :destroy]
|
||||
|
||||
get 'issues/:copy_from/copy', :to => 'issues#new', :as => 'copy_issue'
|
||||
resources :issues, :only => [:index, :new, :create]
|
||||
# Used when updating the form of a new issue
|
||||
post 'issues/new', :to => 'issues#new'
|
||||
|
||||
resources :files, :only => [:index, :new, :create]
|
||||
|
||||
resources :versions, :except => [:index, :show, :edit, :update, :destroy] do
|
||||
collection do
|
||||
put 'close_completed'
|
||||
end
|
||||
end
|
||||
get 'versions.:format', :to => 'versions#index'
|
||||
get 'roadmap', :to => 'versions#index', :format => false
|
||||
get 'versions', :to => 'versions#index'
|
||||
|
||||
resources :news, :except => [:show, :edit, :update, :destroy]
|
||||
resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do
|
||||
get 'report', :on => :collection
|
||||
end
|
||||
resources :queries, :only => [:new, :create]
|
||||
shallow do
|
||||
resources :issue_categories
|
||||
end
|
||||
resources :documents, :except => [:show, :edit, :update, :destroy]
|
||||
resources :boards
|
||||
shallow do
|
||||
resources :repositories, :except => [:index, :show] do
|
||||
member do
|
||||
match 'committers', :via => [:get, :post]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
|
||||
resources :wiki, :except => [:index, :create], :as => 'wiki_page' do
|
||||
member do
|
||||
get 'rename'
|
||||
post 'rename'
|
||||
get 'history'
|
||||
get 'diff'
|
||||
match 'preview', :via => [:post, :put, :patch]
|
||||
post 'protect'
|
||||
post 'add_attachment'
|
||||
end
|
||||
collection do
|
||||
get 'export'
|
||||
get 'date_index'
|
||||
post 'new'
|
||||
end
|
||||
end
|
||||
match 'wiki', :controller => 'wiki', :action => 'show', :via => :get
|
||||
get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/}
|
||||
delete 'wiki/:id/:version', :to => 'wiki#destroy_version'
|
||||
get 'wiki/:id/:version/annotate', :to => 'wiki#annotate'
|
||||
get 'wiki/:id/:version/diff', :to => 'wiki#diff'
|
||||
end
|
||||
|
||||
resources :issues do
|
||||
member do
|
||||
# Used when updating the form of an existing issue
|
||||
patch 'edit', :to => 'issues#edit'
|
||||
get 'tab/:name', :action => 'issue_tab', :as => 'tab'
|
||||
end
|
||||
collection do
|
||||
match 'bulk_edit', :via => [:get, :post]
|
||||
post 'bulk_update'
|
||||
end
|
||||
resources :time_entries, :controller => 'timelog', :only => [:new, :create]
|
||||
shallow do
|
||||
resources :relations, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
|
||||
end
|
||||
end
|
||||
# Used when updating the form of a new issue outside a project
|
||||
post '/issues/new', :to => 'issues#new'
|
||||
match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete
|
||||
|
||||
resources :queries, :except => [:show]
|
||||
get '/queries/filter', :to => 'queries#filter', :as => 'queries_filter'
|
||||
|
||||
resources :news, :only => [:index, :show, :edit, :update, :destroy]
|
||||
match '/news/:id/comments', :to => 'comments#create', :via => :post
|
||||
match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete
|
||||
|
||||
resources :versions, :only => [:show, :edit, :update, :destroy] do
|
||||
post 'status_by', :on => :member
|
||||
end
|
||||
|
||||
resources :documents, :only => [:show, :edit, :update, :destroy] do
|
||||
post 'add_attachment', :on => :member
|
||||
end
|
||||
|
||||
match '/time_entries/context_menu', :to => 'context_menus#time_entries', :as => :time_entries_context_menu, :via => [:get, :post]
|
||||
|
||||
resources :time_entries, :controller => 'timelog', :except => :destroy do
|
||||
member do
|
||||
# Used when updating the edit form of an existing time entry
|
||||
patch 'edit', :to => 'timelog#edit'
|
||||
end
|
||||
collection do
|
||||
get 'report'
|
||||
get 'bulk_edit'
|
||||
post 'bulk_update'
|
||||
end
|
||||
end
|
||||
match '/time_entries/:id', :to => 'timelog#destroy', :via => :delete, :id => /\d+/
|
||||
# TODO: delete /time_entries for bulk deletion
|
||||
match '/time_entries/destroy', :to => 'timelog#destroy', :via => :delete
|
||||
# Used to update the new time entry form
|
||||
post '/time_entries/new', :to => 'timelog#new'
|
||||
# Used to update the bulk edit time entry form
|
||||
post '/time_entries/bulk_edit', :to => 'timelog#bulk_edit'
|
||||
|
||||
get 'projects/:id/activity', :to => 'activities#index', :as => :project_activity
|
||||
get 'activity', :to => 'activities#index'
|
||||
|
||||
# repositories routes
|
||||
get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats'
|
||||
get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph'
|
||||
|
||||
get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision'
|
||||
get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision'
|
||||
post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
||||
delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
||||
get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
|
||||
%w(browse show entry raw annotate).each do |action|
|
||||
get "projects/:id/repository/:repository_id/revisions/:rev/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => 'html',
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||||
end
|
||||
|
||||
%w(browse entry raw changes annotate).each do |action|
|
||||
get "projects/:id/repository/:repository_id/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => 'html',
|
||||
:constraints => {:path => /.*/}
|
||||
end
|
||||
|
||||
get "projects/:id/repository/:repository_id/revisions/:rev/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||||
get "projects/:id/repository/:repository_id/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:path => /.*/}
|
||||
|
||||
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
|
||||
|
||||
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
||||
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
||||
|
||||
# additional routes for having the file name at the end of url
|
||||
get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment', :format => 'html'
|
||||
get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment'
|
||||
get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/
|
||||
get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail'
|
||||
resources :attachments, :only => [:show, :update, :destroy]
|
||||
get 'attachments/:object_type/:object_id/edit', :to => 'attachments#edit_all', :as => :object_attachments_edit
|
||||
patch 'attachments/:object_type/:object_id', :to => 'attachments#update_all', :as => :object_attachments
|
||||
|
||||
resources :groups do
|
||||
resources :memberships, :controller => 'principal_memberships'
|
||||
member do
|
||||
get 'autocomplete_for_user'
|
||||
end
|
||||
end
|
||||
|
||||
get 'groups/:id/users/new', :to => 'groups#new_users', :id => /\d+/, :as => 'new_group_users'
|
||||
post 'groups/:id/users', :to => 'groups#add_users', :id => /\d+/, :as => 'group_users'
|
||||
delete 'groups/:id/users/:user_id', :to => 'groups#remove_user', :id => /\d+/, :as => 'group_user'
|
||||
|
||||
resources :trackers, :except => :show do
|
||||
collection do
|
||||
match 'fields', :via => [:get, :post]
|
||||
end
|
||||
end
|
||||
resources :issue_statuses, :except => :show do
|
||||
collection do
|
||||
post 'update_issue_done_ratio'
|
||||
end
|
||||
end
|
||||
resources :custom_fields, :except => :show do
|
||||
resources :enumerations, :controller => 'custom_field_enumerations', :except => [:show, :new, :edit]
|
||||
put 'enumerations', :to => 'custom_field_enumerations#update_each'
|
||||
end
|
||||
resources :roles do
|
||||
collection do
|
||||
get 'permissions'
|
||||
post 'permissions', :to => 'roles#update_permissions'
|
||||
end
|
||||
end
|
||||
resources :enumerations, :except => :show
|
||||
match 'enumerations/:type', :to => 'enumerations#index', :via => :get
|
||||
|
||||
get 'projects/:id/search', :controller => 'search', :action => 'index'
|
||||
get 'search', :controller => 'search', :action => 'index'
|
||||
|
||||
|
||||
get 'mail_handler', :to => 'mail_handler#new'
|
||||
post 'mail_handler', :to => 'mail_handler#index'
|
||||
|
||||
get 'admin', :to => 'admin#index'
|
||||
get 'admin/projects', :to => 'admin#projects'
|
||||
get 'admin/plugins', :to => 'admin#plugins'
|
||||
get 'admin/info', :to => 'admin#info'
|
||||
post 'admin/test_email', :to => 'admin#test_email', :as => 'test_email'
|
||||
post 'admin/default_configuration', :to => 'admin#default_configuration'
|
||||
|
||||
resources :auth_sources do
|
||||
member do
|
||||
get 'test_connection', :as => 'try_connection'
|
||||
end
|
||||
collection do
|
||||
get 'autocomplete_for_new_user'
|
||||
end
|
||||
end
|
||||
|
||||
match 'workflows', :controller => 'workflows', :action => 'index', :via => :get
|
||||
match 'workflows/edit', :controller => 'workflows', :action => 'edit', :via => [:get, :post]
|
||||
match 'workflows/permissions', :controller => 'workflows', :action => 'permissions', :via => [:get, :post]
|
||||
match 'workflows/copy', :controller => 'workflows', :action => 'copy', :via => [:get, :post]
|
||||
match 'settings', :controller => 'settings', :action => 'index', :via => :get
|
||||
match 'settings/edit', :controller => 'settings', :action => 'edit', :via => [:get, :post]
|
||||
match 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :via => [:get, :post], :as => 'plugin_settings'
|
||||
|
||||
match 'sys/projects', :to => 'sys#projects', :via => :get
|
||||
match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post
|
||||
match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => [:get, :post]
|
||||
|
||||
match 'uploads', :to => 'attachments#upload', :via => :post
|
||||
|
||||
get 'robots', :to => 'welcome#robots'
|
||||
|
||||
Dir.glob File.expand_path("#{Redmine::Plugin.directory}/*") do |plugin_dir|
|
||||
file = File.join(plugin_dir, "config/routes.rb")
|
||||
if File.exists?(file)
|
||||
begin
|
||||
instance_eval File.read(file)
|
||||
rescue SyntaxError, StandardError => e
|
||||
puts "An error occurred while loading the routes definition of #{File.basename(plugin_dir)} plugin (#{file}): #{e.message}."
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,330 +0,0 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2019 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
|
||||
welcome_text:
|
||||
default:
|
||||
login_required:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
self_registration:
|
||||
default: '2'
|
||||
security_notifications: 1
|
||||
show_custom_fields_on_registration:
|
||||
default: 1
|
||||
lost_password:
|
||||
default: 1
|
||||
security_notifications: 1
|
||||
unsubscribe:
|
||||
default: 1
|
||||
password_required_char_classes:
|
||||
serialized: true
|
||||
default: []
|
||||
security_notifications: 1
|
||||
password_min_length:
|
||||
format: int
|
||||
default: 8
|
||||
security_notifications: 1
|
||||
# Maximum password age in days
|
||||
password_max_age:
|
||||
format: int
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
# Maximum number of additional email addresses per user
|
||||
max_additional_emails:
|
||||
format: int
|
||||
default: 5
|
||||
# Maximum lifetime of user sessions in minutes
|
||||
session_lifetime:
|
||||
format: int
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
# User session timeout in minutes
|
||||
session_timeout:
|
||||
format: int
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
attachment_max_size:
|
||||
format: int
|
||||
default: 5120
|
||||
attachment_extensions_allowed:
|
||||
default:
|
||||
attachment_extensions_denied:
|
||||
default:
|
||||
issues_export_limit:
|
||||
format: int
|
||||
default: 500
|
||||
activity_days_default:
|
||||
format: int
|
||||
default: 30
|
||||
per_page_options:
|
||||
default: '25,50,100'
|
||||
search_results_per_page:
|
||||
default: 10
|
||||
mail_from:
|
||||
default: redmine@example.net
|
||||
bcc_recipients:
|
||||
default: 1
|
||||
plain_text_mail:
|
||||
default: 0
|
||||
text_formatting:
|
||||
default: textile
|
||||
cache_formatted_text:
|
||||
default: 0
|
||||
wiki_compression:
|
||||
default: ""
|
||||
default_language:
|
||||
default: en
|
||||
force_default_language_for_anonymous:
|
||||
default: 0
|
||||
force_default_language_for_loggedin:
|
||||
default: 0
|
||||
host_name:
|
||||
default: localhost:3000
|
||||
protocol:
|
||||
default: http
|
||||
security_notifications: 1
|
||||
feeds_limit:
|
||||
format: int
|
||||
default: 15
|
||||
gantt_items_limit:
|
||||
format: int
|
||||
default: 500
|
||||
gantt_months_limit:
|
||||
format: int
|
||||
default: 24
|
||||
# Maximum size of files that can be displayed
|
||||
# inline through the file viewer (in KB)
|
||||
file_max_size_displayed:
|
||||
format: int
|
||||
default: 512
|
||||
diff_max_lines_displayed:
|
||||
format: int
|
||||
default: 1500
|
||||
enabled_scm:
|
||||
serialized: true
|
||||
default:
|
||||
- Subversion
|
||||
- Mercurial
|
||||
- Cvs
|
||||
- Bazaar
|
||||
- Git
|
||||
security_notifications: 1
|
||||
autofetch_changesets:
|
||||
default: 1
|
||||
sys_api_enabled:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
sys_api_key:
|
||||
default: ''
|
||||
security_notifications: 1
|
||||
commit_cross_project_ref:
|
||||
default: 0
|
||||
commit_ref_keywords:
|
||||
default: 'refs,references,IssueID'
|
||||
commit_update_keywords:
|
||||
serialized: true
|
||||
default: []
|
||||
commit_logtime_enabled:
|
||||
default: 0
|
||||
commit_logtime_activity_id:
|
||||
format: int
|
||||
default: 0
|
||||
# autologin duration in days
|
||||
# 0 means autologin is disabled
|
||||
autologin:
|
||||
format: int
|
||||
default: 0
|
||||
# date format
|
||||
date_format:
|
||||
default: ''
|
||||
time_format:
|
||||
default: ''
|
||||
timespan_format:
|
||||
default: 'decimal'
|
||||
user_format:
|
||||
default: :firstname_lastname
|
||||
format: symbol
|
||||
cross_project_issue_relations:
|
||||
default: 0
|
||||
# Enables subtasks to be in other projects
|
||||
cross_project_subtasks:
|
||||
default: 'tree'
|
||||
parent_issue_dates:
|
||||
default: 'derived'
|
||||
parent_issue_priority:
|
||||
default: 'derived'
|
||||
parent_issue_done_ratio:
|
||||
default: 'derived'
|
||||
link_copied_issue:
|
||||
default: 'ask'
|
||||
close_duplicate_issues:
|
||||
default: 1
|
||||
issue_group_assignment:
|
||||
default: 0
|
||||
default_issue_start_date_to_creation_date:
|
||||
default: 1
|
||||
notified_events:
|
||||
serialized: true
|
||||
default:
|
||||
- issue_added
|
||||
- issue_updated
|
||||
mail_handler_body_delimiters:
|
||||
default: ''
|
||||
mail_handler_enable_regex_delimiters:
|
||||
default: 0
|
||||
mail_handler_enable_regex_excluded_filenames:
|
||||
default: 0
|
||||
mail_handler_excluded_filenames:
|
||||
default: ''
|
||||
mail_handler_api_enabled:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
mail_handler_api_key:
|
||||
default:
|
||||
security_notifications: 1
|
||||
mail_handler_preferred_body_part:
|
||||
default: plain
|
||||
issue_list_default_columns:
|
||||
serialized: true
|
||||
default:
|
||||
- tracker
|
||||
- status
|
||||
- priority
|
||||
- subject
|
||||
- assigned_to
|
||||
- updated_on
|
||||
issue_list_default_totals:
|
||||
serialized: true
|
||||
default: []
|
||||
display_subprojects_issues:
|
||||
default: 1
|
||||
time_entry_list_defaults:
|
||||
serialized: true
|
||||
default:
|
||||
column_names:
|
||||
- spent_on
|
||||
- user
|
||||
- activity
|
||||
- issue
|
||||
- comments
|
||||
- hours
|
||||
totalable_names:
|
||||
- hours
|
||||
project_list_defaults:
|
||||
serialized: true
|
||||
default:
|
||||
column_names:
|
||||
- name
|
||||
- identifier
|
||||
- short_description
|
||||
issue_done_ratio:
|
||||
default: 'issue_field'
|
||||
default_projects_public:
|
||||
default: 1
|
||||
default_projects_modules:
|
||||
serialized: true
|
||||
default:
|
||||
- issue_tracking
|
||||
- time_tracking
|
||||
- news
|
||||
- documents
|
||||
- files
|
||||
- wiki
|
||||
- repository
|
||||
- boards
|
||||
- calendar
|
||||
- gantt
|
||||
default_projects_tracker_ids:
|
||||
serialized: true
|
||||
default:
|
||||
# Role given to a non-admin user who creates a project
|
||||
new_project_user_role_id:
|
||||
format: int
|
||||
default: ''
|
||||
sequential_project_identifiers:
|
||||
default: 0
|
||||
# encodings used to convert repository files content to UTF-8
|
||||
# multiple values accepted, comma separated
|
||||
default_users_hide_mail:
|
||||
default: 1
|
||||
default_users_time_zone:
|
||||
default: ""
|
||||
repositories_encodings:
|
||||
default: ''
|
||||
# encoding used to convert commit logs to UTF-8
|
||||
commit_logs_encoding:
|
||||
default: 'UTF-8'
|
||||
commit_logs_formatting:
|
||||
default: 1
|
||||
repository_log_display_limit:
|
||||
format: int
|
||||
default: 100
|
||||
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
|
||||
openid:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
gravatar_default:
|
||||
default: ''
|
||||
start_of_week:
|
||||
default: ''
|
||||
rest_api_enabled:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
jsonp_enabled:
|
||||
default: 0
|
||||
security_notifications: 1
|
||||
default_notification_option:
|
||||
default: 'only_my_events'
|
||||
emails_header:
|
||||
default: ''
|
||||
thumbnails_enabled:
|
||||
default: 1
|
||||
thumbnails_size:
|
||||
format: int
|
||||
default: 100
|
||||
non_working_week_days:
|
||||
serialized: true
|
||||
default:
|
||||
- '6'
|
||||
- '7'
|
||||
new_item_menu_tab:
|
||||
default: 2
|
||||
timelog_required_fields:
|
||||
serialized: true
|
||||
default: []
|
||||
timelog_accept_0_hours:
|
||||
default: 1
|
||||
timelog_max_hours_per_day:
|
||||
format: int
|
||||
default: 999
|
||||
timelog_accept_future_dates:
|
||||
default: 1
|
||||
show_status_changes_in_mail_subject:
|
||||
default: 1
|
Loading…
Add table
Add a link
Reference in a new issue