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

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'."
5 6
end

7
gem "rails", "4.2.8"
8
gem "addressable", "2.4.0" if RUBY_VERSION < "2.0"
9
gem "jquery-rails", "~> 3.1.4"
10
gem "coderay", "~> 1.1.1"
11
gem "request_store", "1.0.5"
12
gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99")
13
gem "protected_attributes"
14
gem "actionpack-xml_parser"
15
gem "roadie-rails", "~> 1.1.1"
16
gem "roadie", "~> 3.2.1"
17
gem "mimemagic"
18

19
gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.7.2" : "~> 1.6.8")
20
gem "i18n", "~> 0.7.0"
21
gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0"
22

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

26
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
27
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
28
gem "rbpdf", "~> 1.19.2"
29 30 31

# Optional gem for LDAP authentication
group :ldap do
marutosijp's avatar
marutosijp committed
32
  gem "net-ldap", "~> 0.12.0"
33 34 35 36
end

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

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

  # Optional Markdown support, not for JRuby
  group :markdown do
49
    gem "redcarpet", "~> 3.4.0"
50
  end
51 52
end

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

group :development do
marutosijp's avatar
marutosijp committed
86
  gem "rdoc", "~> 4.3"
87
  gem "yard"
88 89 90
end

group :test do
91
  gem "minitest"
92
  gem "rails-dom-testing"
93
  gem "mocha"
94
  gem "simplecov", "~> 0.9.1", :require => false
95
  # TODO: remove this after upgrading to Rails 5
96
  gem "test_after_commit", "~> 0.4.2"
97
  # For running UI tests
98
  gem "capybara"
jplang's avatar
jplang committed
99
  gem "selenium-webdriver", "~> 2.53.4"
100 101
end

102 103
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
104
  eval_gemfile local_gemfile
jplang's avatar
jplang committed
105 106
end

107
# Load plugins' Gemfiles
108
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
109
  eval_gemfile file
110
end