Gemfile 2.95 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.2"
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"
jplang's avatar
jplang committed
15

jplang's avatar
jplang committed
16
gem "nokogiri", "~> 1.7.2"
marutosijp's avatar
marutosijp committed
17
gem "i18n", "~> 0.7.0"
18

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

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

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

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

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

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

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

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

group :test do
jplang's avatar
jplang committed
86
  gem "rails-dom-testing"
marutosijp's avatar
marutosijp committed
87
  gem "mocha"
jplang's avatar
jplang committed
88
  gem "simplecov", "~> 0.14.1", :require => false
jplang's avatar
jplang committed
89
  # For running UI tests
90
  gem "capybara"
jplang's avatar
jplang committed
91
  gem "selenium-webdriver", "~> 2.53.4"
92 93
end

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

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