From 4c0b1953807e3ce8a652b2328bdd9ceb3dcfd546 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Fri, 6 Jan 2012 00:56:57 +0100 Subject: [PATCH 1/3] [#819] set RAILS_ENV if only RACK_ENV is provided --- config/environment.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/environment.rb b/config/environment.rb index 1d2bd651..5bc00595 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -18,6 +18,9 @@ # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' +# use RACK_ENV if we are running as a simple rack app +ENV['RAILS_ENV'] ||= ENV['RACK_ENV'] if ENV['RACK_ENV'] + # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION From cd0ea44ff8dcc1a931c9ed54860d786f97304605 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Tue, 10 Jan 2012 18:32:38 +0100 Subject: [PATCH 2/3] [#822] Provide a default log_encoding even if the db column is not present yet --- app/models/repository.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 9411dfb5..ef44345e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -200,6 +200,14 @@ class Repository < ActiveRecord::Base encoding.blank? ? 'UTF-8' : encoding end + # Provide a log encoding even if the column was not created yet + # It's used by 20100714111653_build_initial_journals_for_acts_as_journalized + # for initial journal creaetion of the changesets while the colum is only + # created by 20110228000000_add_repositories_log_encoding + def log_encoding + read_attribute(:log_encoding) + end + # Fetches new changesets for all repositories of active projects # Can be called periodically by an external script # eg. ruby script/runner "Repository.fetch_changesets" From 11b441f7453a11de8acdd5b734324ae2fd892e05 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Wed, 11 Jan 2012 12:02:25 +0100 Subject: [PATCH 3/3] Load Gemfiles from vendor/chiliproject_plugins --- Gemfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 06f02237..18282c9a 100644 --- a/Gemfile +++ b/Gemfile @@ -102,7 +102,9 @@ if File.readable?(gemfile_local) end # Load plugins' Gemfiles -Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file| - puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` - instance_eval File.read(file) -end +["plugins", "chiliproject_plugins"].each do |plugin_path| + Dir.glob File.expand_path("../vendor/#{plugin_path}/*/Gemfile", __FILE__) do |file| + puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(file) + end +end \ No newline at end of file