From f417996ff0542efe7f35e4aa8a8a3cade6eed1cf Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sun, 29 Jan 2012 19:41:18 +0100 Subject: [PATCH 1/5] [#839] Remove ruby-debug dependency - Backport for 2.7 It completely breaks on Ruby 1.9.3-p0. This is a stopper for people installing all groups. For the rest it is rarely used at all. Developers and testers requiring it can include it into their Gemfile.local --- Gemfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 4de499f3..904673e4 100644 --- a/Gemfile +++ b/Gemfile @@ -13,9 +13,7 @@ group :test do gem 'shoulda', '~> 2.10.3' gem 'edavis10-object_daddy', :require => 'object_daddy' gem 'mocha' - - platforms :mri_18, :mingw_18 do gem 'ruby-debug' end - platforms :mri_19, :mingw_19 do gem 'ruby-debug19', :require => 'ruby-debug' end + gem 'capybara' end group :ldap do @@ -107,4 +105,4 @@ end puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` instance_eval File.read(file) end -end \ No newline at end of file +end From 6fd9bc490f063a36f9aa673059195a9779dffd5f Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sun, 29 Jan 2012 21:46:33 +0100 Subject: [PATCH 2/5] [#849 #789] Remove config.ru - Backport for 2.7 Rails 2.3 doesn't work well as a rack-only app --- config.ru | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 config.ru diff --git a/config.ru b/config.ru deleted file mode 100644 index 9d07fec7..00000000 --- a/config.ru +++ /dev/null @@ -1,5 +0,0 @@ -require File.expand_path("../config/environment", __FILE__) - -use Rails::Rack::LogTailer -use Rails::Rack::Static -run ActionController::Dispatcher.new From aa5be5132dd57cb6f58b021c6c9f9e4f2baed1e1 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 6 Feb 2012 14:31:06 +0100 Subject: [PATCH 3/5] [#593] Generate wiki content notifications in the JournalObserver - backported for 2.7 This will prevent the usage of the wrong wiki_content status. The code is not overly pretty and deserves a thorough refactoring, but at least it solves the problem at hand. --- app/models/journal_observer.rb | 20 ++++++++++++++++++-- app/models/wiki_content_observer.rb | 25 ------------------------- config/environment.rb | 2 +- 3 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 app/models/wiki_content_observer.rb diff --git a/app/models/journal_observer.rb b/app/models/journal_observer.rb index ab3571a1..d2aa6e5b 100644 --- a/app/models/journal_observer.rb +++ b/app/models/journal_observer.rb @@ -16,8 +16,24 @@ class JournalObserver < ActiveRecord::Observer attr_accessor :send_notification def after_create(journal) - if journal.type == "IssueJournal" and !journal.initial? and send_notification - after_create_issue_journal(journal) + case journal.type + when "IssueJournal" + if !journal.initial? && send_notification + after_create_issue_journal(journal) + end + when "WikiContentJournal" + wiki_content = journal.journaled + wiki_page = wiki_content.page + + if journal.initial? + if Setting.notified_events.include?('wiki_content_added') + Mailer.deliver_wiki_content_added(wiki_content) + end + else + if Setting.notified_events.include?('wiki_content_updated') + Mailer.deliver_wiki_content_updated(wiki_content) + end + end end clear_notification end diff --git a/app/models/wiki_content_observer.rb b/app/models/wiki_content_observer.rb deleted file mode 100644 index d771cdff..00000000 --- a/app/models/wiki_content_observer.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- encoding: UTF-8 -#-- copyright -# ChiliProject is a project management system. -# -# Copyright (C) 2010-2012 the ChiliProject Team -# -# 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. -# -# See doc/COPYRIGHT.rdoc for more details. -#++ - -class WikiContentObserver < ActiveRecord::Observer - def after_create(wiki_content) - Mailer.deliver_wiki_content_added(wiki_content) if Setting.notified_events.include?('wiki_content_added') - end - - def after_update(wiki_content) - if wiki_content.text_changed? - Mailer.deliver_wiki_content_updated(wiki_content) if Setting.notified_events.include?('wiki_content_updated') - end - end -end diff --git a/config/environment.rb b/config/environment.rb index 5bc00595..57f43194 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -58,7 +58,7 @@ Rails::Initializer.run do |config| # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector - config.active_record.observers = :journal_observer, :message_observer, :issue_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer + config.active_record.observers = :journal_observer, :message_observer, :issue_observer, :news_observer, :document_observer, :comment_observer # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc From a059cb489286ef16dda416b5d68bf1e0c152ef26 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 6 Feb 2012 23:36:29 +0100 Subject: [PATCH 4/5] Update changelog for 2.7.0 release --- doc/CHANGELOG.rdoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/CHANGELOG.rdoc b/doc/CHANGELOG.rdoc index 7c174f5c..89374a9f 100644 --- a/doc/CHANGELOG.rdoc +++ b/doc/CHANGELOG.rdoc @@ -1,5 +1,16 @@ = ChiliProject changelog +== 2012-02-06 v2.7.0 + +* Bug #593: Notification Mail for Wiki-Changes has wrong Diff +* Bug #775: Activity view too verbose +* Bug #819: RAILS_ENV is not properly set if running under thin +* Bug #822: Initial journal creation fails because of the missing log_encoding of Repositories +* Bug #823: Plugin in new directory not picking up Gemfile +* Bug #839: ruby-debug19 breaks on Ruby 1.9.3 +* Bug #849: Prefix parameter of thin is not working +* Bug #857: Gemfile has an non ASCII character + == 2012-01-03 v2.6.0 * Bug #356: Clicking on login while logged-in logs you out From 608fd61138257663bbfd3723db5cc0c80842b13f Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 6 Feb 2012 23:36:58 +0100 Subject: [PATCH 5/5] Bump version to 2.7.0 --- lib/chili_project/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chili_project/version.rb b/lib/chili_project/version.rb index 420b338f..d0e9a7ba 100644 --- a/lib/chili_project/version.rb +++ b/lib/chili_project/version.rb @@ -18,7 +18,7 @@ module ChiliProject module VERSION #:nodoc: MAJOR = 2 - MINOR = 6 + MINOR = 7 PATCH = 0 TINY = PATCH # Redmine compat