Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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
@ -26,7 +26,7 @@ END_DESC
task :read => :environment do
Mailer.with_synched_deliveries do
MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
MailHandler.safe_receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
end
end
@ -56,10 +56,14 @@ User and permissions options:
no_permission_check=1 disable permission checking when receiving
the email
no_account_notice=1 disable new user account notification
no_notification=1 disable email notification to new user
default_group=foo,bar adds created user to foo and bar groups
Issue attributes control options:
project=PROJECT identifier of the target project
project_from_subaddress=ADDR
select project from subaddress of ADDR found
in To, Cc, Bcc headers
status=STATUS name of the target status
tracker=TRACKER name of the target tracker
category=CATEGORY name of the target category
@ -157,13 +161,10 @@ END_DESC
user = User.find_by_login(args[:login])
abort l(:notice_email_error, "User #{args[:login]} not found") unless user && user.logged?
ActionMailer::Base.raise_delivery_errors = true
begin
Mailer.with_synched_deliveries do
Mailer.test_email(user).deliver
end
Mailer.deliver_test_email(user)
puts l(:notice_email_sent, user.mail)
rescue Exception => e
rescue => e
abort l(:notice_email_error, e.message)
end
end

View file

@ -168,12 +168,12 @@ END_DESC
puts "parsing #{filename}..."
begin
parser.parse File.open(filename)
rescue Exception => e1
rescue => e1
puts(e1.message)
puts("")
end
end
rescue Exception => e
rescue => e
puts(e.message)
end
end

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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
@ -453,7 +453,7 @@ namespace :redmine do
puts
# Trac 'resolution' field as a Redmine custom field
r = IssueCustomField.where(:name => "Resolution").first
r = IssueCustomField.find_by(:name => "Resolution")
r = IssueCustomField.new(:name => 'Resolution',
:field_format => 'list',
:is_filter => true) if r.nil?
@ -614,7 +614,7 @@ namespace :redmine do
raise "This directory doesn't exist!" unless File.directory?(path)
raise "#{trac_attachments_directory} doesn't exist!" unless File.directory?(trac_attachments_directory)
@@trac_directory
rescue Exception => e
rescue => e
puts e
return false
end
@ -629,7 +629,7 @@ namespace :redmine do
# If adapter is sqlite or sqlite3, make sure that trac.db exists
raise "#{trac_db_path} doesn't exist!" if %w(sqlite3).include?(adapter) && !File.exist?(trac_db_path)
@@trac_adapter = adapter
rescue Exception => e
rescue => e
puts e
return false
end

View file

@ -2,7 +2,7 @@ namespace :redmine do
desc "List all permissions and the actions registered with them"
task :permissions => :environment do
puts "Permission Name - controller/action pairs"
Redmine::AccessControl.permissions.sort {|a,b| a.name.to_s <=> b.name.to_s }.each do |permission|
Redmine::AccessControl.permissions.sort_by {|p| p.name.to_s}.each do |permission|
puts ":#{permission.name} - #{permission.actions.join(', ')}"
end
end

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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
@ -137,7 +137,12 @@ DESC
abort "Plugin #{name} was not found."
end
Rake::Task["db:schema:dump"].invoke
case ActiveRecord::Base.schema_format
when :ruby
Rake::Task["db:schema:dump"].invoke
when :sql
Rake::Task["db:structure:dump"].invoke
end
end
desc 'Copies plugins assets into the public directory.'
@ -156,35 +161,38 @@ DESC
Rake::Task["redmine:plugins:test:units"].invoke
Rake::Task["redmine:plugins:test:functionals"].invoke
Rake::Task["redmine:plugins:test:integration"].invoke
Rake::Task["redmine:plugins:test:system"].invoke
end
namespace :test do
desc 'Runs the plugins unit tests.'
Rake::TestTask.new :units => "db:test:prepare" do |t|
t.libs << "test"
t.verbose = true
t.pattern = "plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"
task :units => "db:test:prepare" do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
end
desc 'Runs the plugins functional tests.'
Rake::TestTask.new :functionals => "db:test:prepare" do |t|
t.libs << "test"
t.verbose = true
t.pattern = "plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"
task :functionals => "db:test:prepare" do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
end
desc 'Runs the plugins integration tests.'
Rake::TestTask.new :integration => "db:test:prepare" do |t|
t.libs << "test"
t.verbose = true
t.pattern = "plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"
task :integration => "db:test:prepare" do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
end
desc 'Runs the plugins system tests.'
task :system => "db:test:prepare" do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
end
desc 'Runs the plugins ui tests.'
Rake::TestTask.new :ui => "db:test:prepare" do |t|
t.libs << "test"
t.verbose = true
t.pattern = "plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"
task :ui => "db:test:prepare" do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
end
end
end

View file

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# 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
@ -32,11 +32,11 @@ END_DESC
namespace :redmine do
task :send_reminders => :environment do
options = {}
options[:days] = ENV['days'].to_i if ENV['days']
options[:project] = ENV['project'] if ENV['project']
options[:tracker] = ENV['tracker'].to_i if ENV['tracker']
options[:users] = (ENV['users'] || '').split(',').each(&:strip!)
options[:version] = ENV['version'] if ENV['version']
options[:days] = ENV['days'].presence&.to_i
options[:project] = ENV['project'].presence
options[:tracker] = ENV['tracker'].presence&.to_i
options[:users] = ENV['users'].presence.to_s.split(',').each(&:strip!)
options[:version] = ENV['version'].presence
Mailer.with_synched_deliveries do
Mailer.reminders(options)

View file

@ -26,7 +26,7 @@ namespace :test do
FileUtils.mkdir_p Rails.root + '/tmp/test'
end
supported_scms = [:subversion, :cvs, :bazaar, :mercurial, :git, :darcs, :filesystem]
supported_scms = [:subversion, :cvs, :bazaar, :mercurial, :git, :filesystem]
desc "Creates a test subversion repository"
task :subversion => :create_dir do
@ -79,34 +79,22 @@ namespace :test do
end
end
Rake::TestTask.new(:units => "db:test:prepare") do |t|
t.libs << "test"
t.verbose = true
t.warning = false
t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
task(:units => "db:test:prepare") do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
end
Rake::Task['test:scm:units'].comment = "Run the scm unit tests"
Rake::TestTask.new(:functionals => "db:test:prepare") do |t|
t.libs << "test"
t.verbose = true
t.warning = false
t.test_files = FileList['test/functional/repositories*_test.rb']
task(:functionals => "db:test:prepare") do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run FileList['test/functional/repositories*_test.rb']
end
Rake::Task['test:scm:functionals'].comment = "Run the scm functional tests"
end
Rake::TestTask.new(:routing) do |t|
t.libs << "test"
t.verbose = true
t.test_files = FileList['test/integration/routing/*_test.rb'] + FileList['test/integration/api_test/*_routing_test.rb']
task(:routing) do |t|
$: << "test"
Rails::TestUnit::Runner.rake_run FileList['test/integration/routing/*_test.rb'] + FileList['test/integration/api_test/*_routing_test.rb']
end
Rake::Task['test:routing'].comment = "Run the routing tests"
Rake::TestTask.new(:ui => "db:test:prepare") do |t|
t.libs << "test"
t.verbose = true
t.test_files = FileList['test/ui/**/*_test_ui.rb']
end
Rake::Task['test:ui'].comment = "Run the UI tests with Capybara (PhantomJS listening on port 4444 is required)"
end

View file

@ -12,7 +12,7 @@ begin
'doc/RUNNING_TESTS',
'doc/UPGRADING'].join(',')
t.options += ['--output-dir', './doc/app', '--files', static_files]
t.options += ['--no-private', '--output-dir', './doc/app', '--files', static_files]
end
rescue LoadError