Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2018 07:00:23 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486320 - head/www/redmine/files
Message-ID:  <201812010700.wB170NIi038907@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sat Dec  1 07:00:23 2018
New Revision: 486320
URL: https://svnweb.freebsd.org/changeset/ports/486320

Log:
  Clean up Gemfile
  
  The optional databases, markdown and rmagick sections are already handled by
  our option framework.

Modified:
  head/www/redmine/files/patch-Gemfile

Modified: head/www/redmine/files/patch-Gemfile
==============================================================================
--- head/www/redmine/files/patch-Gemfile	Sat Dec  1 06:58:11 2018	(r486319)
+++ head/www/redmine/files/patch-Gemfile	Sat Dec  1 07:00:23 2018	(r486320)
@@ -1,4 +1,4 @@
---- Gemfile.orig	2018-01-08 19:38:18 UTC
+--- Gemfile.orig	2018-06-10 06:36:07 UTC
 +++ Gemfile
 @@ -4,24 +4,24 @@ if Gem::Version.new(Bundler::VERSION) < 
    abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
@@ -32,7 +32,7 @@
  gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0"
  
  # Request at least rails-html-sanitizer 1.0.3 because of security advisories
-@@ -33,27 +33,15 @@ gem "rbpdf", "~> 1.19.3"
+@@ -33,76 +33,15 @@ gem "rbpdf", "~> 1.19.3"
  
  # Optional gem for LDAP authentication
  group :ldap do
@@ -59,13 +59,38 @@
 -  end
 -end
 -
- # Include database gems for the adapters found in the database
- # configuration file
- require 'erb'
-@@ -86,23 +74,6 @@ else
-   warn("Please configure your config/database.yml first")
- end
- 
+-# Include database gems for the adapters found in the database
+-# configuration file
+-require 'erb'
+-require 'yaml'
+-database_file = File.join(File.dirname(__FILE__), "config/database.yml")
+-if File.exist?(database_file)
+-  database_config = YAML::load(ERB.new(IO.read(database_file)).result)
+-  adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
+-  if adapters.any?
+-    adapters.each do |adapter|
+-      case adapter
+-      when 'mysql2'
+-        gem "mysql2", "~> 0.4.6", :platforms => [:mri, :mingw, :x64_mingw]
+-      when /postgresql/
+-        gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw]
+-      when /sqlite3/
+-        gem "sqlite3", (RUBY_VERSION < "2.0" && RUBY_PLATFORM =~ /mingw/ ? "1.3.12" : "~>1.3.12"),
+-                       :platforms => [:mri, :mingw, :x64_mingw]
+-      when /sqlserver/
+-        gem "tiny_tds", (RUBY_VERSION >= "2.0" ? "~> 1.0.5" : "~> 0.7.0"), :platforms => [:mri, :mingw, :x64_mingw]
+-        gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
+-      else
+-        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
+-      end
+-    end
+-  else
+-    warn("No adapter found in config/database.yml, please configure it first")
+-  end
+-else
+-  warn("Please configure your config/database.yml first")
+-end
+-
 -group :development do
 -  gem "rdoc", "~> 4.3"
 -  gem "yard"
@@ -86,7 +111,7 @@
  local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
  if File.exists?(local_gemfile)
    eval_gemfile local_gemfile
-@@ -112,3 +83,7 @@ end
+@@ -112,3 +51,7 @@ end
  Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
    eval_gemfile file
  end



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812010700.wB170NIi038907>