[DRE-commits] [SCM] redmine.git branch, master-experimental, updated. debian/1.4.4+dfsg1-1-93-gbf76368

Ondřej Surý ondrej at sury.org
Thu Mar 21 14:37:26 UTC 2013


The following commit has been merged in the master-experimental branch:
commit 1a7b59e65c6dba3912ca6948ba1d64087782743d
Author: Ondřej Surý <ondrej at sury.org>
Date:   Thu Mar 21 13:15:00 2013 +0100

    Remove patch reverting caching of I18N, we just need to ensure that /var/cache/redmine is cleared properly

diff --git a/debian/patches/revert-r10844.diff b/debian/patches/revert-r10844.diff
deleted file mode 100644
index c48b2bc..0000000
--- a/debian/patches/revert-r10844.diff
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/app/helpers/application_helper.rb
-+++ b/app/helpers/application_helper.rb
-@@ -926,7 +926,8 @@ module ApplicationHelper
-   end
- 
-   def lang_options_for_select(blank=true)
--    (blank ? [["(auto)", ""]] : []) + languages_options
-+    (blank ? [["(auto)", ""]] : []) +
-+      valid_languages.collect{|lang| [ ll(lang.to_s, :general_lang_name), lang.to_s]}.sort{|x,y| x.last <=> y.last }
-   end
- 
-   def label_tag_for(name, option_tags = nil, options = {})
---- a/lib/redmine/i18n.rb
-+++ b/lib/redmine/i18n.rb
-@@ -87,16 +87,6 @@ module Redmine
-       ::I18n.available_locales
-     end
- 
--    # Returns an array of languages names and code sorted by names, example:
--    # [["Deutsch", "de"], ["English", "en"] ...]
--    #
--    # The result is cached to prevent from loading all translations files.
--    def languages_options
--      ActionController::Base.cache_store.fetch "i18n/languages_options" do
--        valid_languages.map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.sort {|x,y| x.first <=> y.first }
--      end      
--    end
--
-     def find_language(lang)
-       @@languages_lookup = valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k }
-       @@languages_lookup[lang.to_s.downcase]
---- a/test/unit/lib/redmine/i18n_test.rb
-+++ b/test/unit/lib/redmine/i18n_test.rb
-@@ -194,17 +194,6 @@ class Redmine::I18nTest < ActiveSupport:
-     assert valid_languages.first.is_a?(Symbol)
-   end
- 
--  def test_languages_options
--    options = languages_options
--
--    assert options.is_a?(Array)
--    assert_equal valid_languages.size, options.size
--    assert_nil options.detect {|option| !option.is_a?(Array)}
--    assert_nil options.detect {|option| option.size != 2}
--    assert_nil options.detect {|option| !option.first.is_a?(String) || !option.last.is_a?(String)}
--    assert_include ["English", "en"], options
--  end
--
-   def test_locales_validness
-     lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size
-     assert_equal lang_files_count, valid_languages.size
diff --git a/debian/patches/series b/debian/patches/series
index 54c7665..5cb94da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,4 +5,3 @@
 2009_FHS_thin_config.patch
 2017_Gemfile_debian.patch
 2018_get_rid_of_rdoctask.patch
-revert-r10844.diff
diff --git a/debian/postinst b/debian/postinst
index 84164e4..9d3e33a 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -278,6 +278,15 @@ This may take a while."
 			else
 				echo "Redmine instance \"${lInstance}\" database must be configured manually."
 			fi
+			rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
+			if [ $fCode -ne 0 ];
+				echo "Error when clearing cache. You might need to clear the cache manually."
+			fi
+			rake -s tmp:sessions:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
+			if [ $fCode -ne 0 ];
+				echo "Error when clearing sessions. You might need to clear the session directory manually."
+			fi
+			
 			cd $savedir || true
 		;;
 	

-- 
redmine.git



More information about the Pkg-ruby-extras-commits mailing list