Gemfile 2.94 KB
Newer Older
jplang's avatar
jplang committed
1
source 'https://rubygems.org'
2

jplang's avatar
jplang committed
3
if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
4
  abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
jplang's avatar
jplang committed
5 6
end

maeda's avatar
maeda committed
7
gem "rails", "5.2.2"
maeda's avatar
maeda committed
8
gem "rouge", "~> 3.3.0"
9
gem "request_store", "1.0.5"
10
gem "mini_mime", "~> 1.0.1"
11
gem "actionpack-xml_parser"
12
gem "roadie-rails", "~> 1.3.0"
13
gem "mimemagic"
maeda's avatar
maeda committed
14
gem "mail", "~> 2.7.1"
15
gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6"
jplang's avatar
jplang committed
16

17
gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1")
marutosijp's avatar
marutosijp committed
18
gem "i18n", "~> 0.7.0"
19

jplang's avatar
jplang committed
20
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
21
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
22
gem "rbpdf", "~> 1.19.6"
23 24 25

# Optional gem for LDAP authentication
group :ldap do
jplang's avatar
jplang committed
26
  gem "net-ldap", "~> 0.16.0"
27 28 29 30
end

# Optional gem for OpenID authentication
group :openid do
31
  gem "ruby-openid", "~> 2.3.0", :require => "openid"
jplang's avatar
jplang committed
32
  gem "rack-openid"
33 34
end

35
platforms :mri, :mingw, :x64_mingw do
jplang's avatar
jplang committed
36
  # Optional gem for exporting the gantt to a PNG file, not supported with jruby
37
  group :rmagick do
marutosijp's avatar
marutosijp committed
38
    gem "rmagick", ">= 2.14.0"
39
  end
jplang's avatar
jplang committed
40 41 42

  # Optional Markdown support, not for JRuby
  group :markdown do
43
    gem "redcarpet", "~> 3.4.0"
jplang's avatar
jplang committed
44
  end
45 46
end

47 48
# Include database gems for the adapters found in the database
# configuration file
49
require 'erb'
50
require 'yaml'
51 52
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
53
  database_config = YAML::load(ERB.new(IO.read(database_file)).result)
54 55 56 57
  adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  if adapters.any?
    adapters.each do |adapter|
      case adapter
58
      when 'mysql2'
maeda's avatar
maeda committed
59
        gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw]
60
      when /postgresql/
maeda's avatar
maeda committed
61
        gem "pg", "~> 1.0.0", :platforms => [:mri, :mingw, :x64_mingw]
62
      when /sqlite3/
63
        gem "sqlite3", "~>1.3.12", :platforms => [:mri, :mingw, :x64_mingw]
64
      when /sqlserver/
65
        gem "tiny_tds", "~> 1.0.5", :platforms => [:mri, :mingw, :x64_mingw]
66
        gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
67
      else
jplang's avatar
jplang committed
68
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
69 70 71
      end
    end
  else
72
    warn("No adapter found in config/database.yml, please configure it first")
73
  end
74
else
75
  warn("Please configure your config/database.yml first")
76 77 78
end

group :development do
emassip's avatar
emassip committed
79
  gem "yard"
80 81 82
end

group :test do
jplang's avatar
jplang committed
83
  gem "rails-dom-testing"
marutosijp's avatar
marutosijp committed
84
  gem "mocha"
jplang's avatar
jplang committed
85
  gem "simplecov", "~> 0.14.1", :require => false
86
  # For running system tests
jplang's avatar
jplang committed
87
  gem 'puma', '~> 3.7'
88 89
  gem "capybara", '~> 2.13'
  gem "selenium-webdriver"
90 91
end

92 93
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
jplang's avatar
jplang committed
94
  eval_gemfile local_gemfile
jplang's avatar
jplang committed
95 96
end

97
# Load plugins' Gemfiles
98
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
jplang's avatar
jplang committed
99
  eval_gemfile file
100
end