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

marutosijp's avatar
marutosijp committed
7
gem "rails", "4.2.8"
8
gem "addressable", "2.4.0" if RUBY_VERSION < "2.0"
9
gem "jquery-rails", "~> 3.1.4"
jplang's avatar
jplang committed
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")
jplang's avatar
jplang committed
13
gem "protected_attributes"
14
gem "actionpack-xml_parser"
15
gem "roadie-rails"
16
gem "mimemagic"
jplang's avatar
jplang committed
17

18
gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8")
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, :jruby]
26
gem "rbpdf", "~> 1.19.1"
27 28 29

# Optional gem for LDAP authentication
group :ldap do
marutosijp's avatar
marutosijp committed
30
  gem "net-ldap", "~> 0.12.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
jplang's avatar
jplang committed
47
    gem "redcarpet", "~> 3.3.2"
jplang's avatar
jplang committed
48
  end
49 50 51
end

platforms :jruby do
52 53
  # jruby-openssl is bundled with JRuby 1.7.0
  gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
54
  gem "activerecord-jdbc-adapter", "~> 1.3.2"
55
end
56

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

group :development do
marutosijp's avatar
marutosijp committed
95
  gem "rdoc", "~> 4.3"
emassip's avatar
emassip committed
96
  gem "yard"
97 98 99
end

group :test do
jplang's avatar
jplang committed
100
  gem "minitest"
jplang's avatar
jplang committed
101
  gem "rails-dom-testing"
marutosijp's avatar
marutosijp committed
102
  gem "mocha"
103
  gem "simplecov", "~> 0.9.1", :require => false
jplang's avatar
jplang committed
104
  # For running UI tests
105
  gem "capybara"
jplang's avatar
jplang committed
106
  gem "selenium-webdriver", "~> 2.53.4"
107 108
end

109 110
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
jplang's avatar
jplang committed
111
  eval_gemfile local_gemfile
jplang's avatar
jplang committed
112 113
end

114
# Load plugins' Gemfiles
115
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
jplang's avatar
jplang committed
116
  eval_gemfile file
117
end