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

Ondřej Surý ondrej at sury.org
Wed Oct 17 11:19:36 UTC 2012


The following commit has been merged in the master-experimental branch:
commit c997ec59c32e3e4cf4db0b8c47f9044d4fe0a9fe
Author: Ondřej Surý <ondrej at sury.org>
Date:   Mon Oct 15 21:46:59 2012 +0200

    Move everything to config/application.rb - setting ENV from environment.rb doesn't work

diff --git a/debian/patches/2002_FHS_through_env_vars.patch b/debian/patches/2002_FHS_through_env_vars.patch
index e6fd53d..b238be8 100644
--- a/debian/patches/2002_FHS_through_env_vars.patch
+++ b/debian/patches/2002_FHS_through_env_vars.patch
@@ -50,7 +50,25 @@ Last-Update: 2012-01-19
            pdf_encoding = l(:general_pdf_encoding).upcase
 --- a/config/application.rb
 +++ b/config/application.rb
-@@ -52,6 +52,17 @@ module RedmineApp
+@@ -2,6 +2,17 @@ require File.expand_path('../boot', __FI
+ 
+ require 'rails/all'
+ 
++# Force Rails environment to be production
++Rails.env ||= ActiveSupport::StringInquirer.new('production')
++
++# for debian package : setup proper environment variables and paths
++# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
++ENV['X_DEBIAN_SITEID'] ||= 'default'
++ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
++
+ if defined?(Bundler)
+   # If you precompile assets before deploying to production, use this line
+   Bundler.require(*Rails.groups(:assets => %w(development test)))
+@@ -52,6 +63,17 @@ module RedmineApp
  
      config.session_store :cookie_store, :key => '_redmine_session'
  
@@ -83,22 +101,3 @@ Last-Update: 2012-01-19
    
    cattr_accessor :decoder
  		
-diff --git a/config/environment.rb b/config/environment.rb
-index 1d9a396..956fd3c 100644
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -1,3 +1,14 @@
-+# Force Rails environment to be production
-+Rails.env ||= ActiveSupport::StringInquirer.new('production')
-+
-+# for debian package : setup proper environment variables and paths
-+# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
-+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+
- # Load the rails application
- require File.expand_path('../application', __FILE__)
- 
diff --git a/debian/patches/2003_externalize_session_config.patch b/debian/patches/2003_externalize_session_config.patch
index cc8e3d4..d8a30fc 100644
--- a/debian/patches/2003_externalize_session_config.patch
+++ b/debian/patches/2003_externalize_session_config.patch
@@ -50,7 +50,7 @@ Last-Update: 2010-01-10
 -task :generate_secret_token => ['config/initializers/secret_token.rb']
 --- a/config/application.rb
 +++ b/config/application.rb
-@@ -50,7 +50,16 @@ module RedmineApp
+@@ -61,7 +61,16 @@ module RedmineApp
  
      config.action_mailer.perform_deliveries = false
  
diff --git a/debian/patches/2009_FHS_thin_config.patch b/debian/patches/2009_FHS_thin_config.patch
index 24a0de8..f66f974 100644
--- a/debian/patches/2009_FHS_thin_config.patch
+++ b/debian/patches/2009_FHS_thin_config.patch
@@ -3,9 +3,9 @@ Description: FHS support for thin config
 Forwarded: not-needed
 Author: Jérémy Lal <kapouer at melix.org>
 Last-Update: 2010-11-01
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -3,6 +3,7 @@ Rails.env ||= ActiveSupport::StringInqui
+--- a/config/application.rb
++++ b/config/application.rb
+@@ -7,6 +7,7 @@ Rails.env ||= ActiveSupport::StringInqui
  
  # for debian package : setup proper environment variables and paths
  # To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian

-- 
redmine.git



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