Gemfile 3.04 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

jplang's avatar
jplang committed
7
gem "rails", "5.1.6"
jplang's avatar
jplang committed
8
gem "coderay", "~> 1.1.1"
9
gem "request_store", "1.0.5"
10
gem "mime-types", "~> 3.0"
11
gem "actionpack-xml_parser"
jplang's avatar
jplang committed
12
gem "roadie-rails", "~> 1.2.1"
13
gem "roadie", "~> 3.2.1"
14
gem "mimemagic"
15
gem "mail", "~> 2.6.4"
16
gem "csv", "~> 1.0.2" if RUBY_VERSION >= "2.3"
jplang's avatar
jplang committed
17

18
gem "nokogiri", "~> 1.8.0"
marutosijp's avatar
marutosijp committed
19
gem "i18n", "~> 0.7.0"
20

21
# Request at least rails-html-sanitizer 1.0.3 because of security advisories
22 23
gem "rails-html-sanitizer", ">= 1.0.3"

jplang's avatar
jplang committed
24
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
25
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
26
gem "rbpdf", "~> 1.19.3"
27 28 29

# Optional gem for LDAP authentication
group :ldap do
jplang's avatar
jplang committed
30
  gem "net-ldap", "~> 0.16.0"
31 32 33 34
end

# Optional gem for OpenID authentication
group :openid do
35
  gem "ruby-openid", "~> 2.3.0", :require => "openid"
jplang's avatar
jplang committed
36
  gem "rack-openid"
37 38
end

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

  # Optional Markdown support, not for JRuby
  group :markdown do
47
    gem "redcarpet", "~> 3.4.0"
jplang's avatar
jplang committed
48
  end
49 50
end

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

group :development do
marutosijp's avatar
marutosijp committed
83
  gem "rdoc", "~> 4.3"
emassip's avatar
emassip committed
84
  gem "yard"
85 86 87
end

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

97 98
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
jplang's avatar
jplang committed
99
  eval_gemfile local_gemfile
jplang's avatar
jplang committed
100 101
end

102
# Load plugins' Gemfiles
103
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
jplang's avatar
jplang committed
104
  eval_gemfile file
105
end