Gemfile 3.39 KB
Newer Older
tmaruyama's avatar
tmaruyama 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.5"
8
gem "jquery-rails", "~> 3.1.4"
jplang's avatar
jplang committed
9
gem "coderay", "~> 1.1.0"
10
gem "builder", ">= 3.0.4"
11
gem "request_store", "1.0.5"
12
gem "mime-types"
jplang's avatar
jplang committed
13 14
gem "protected_attributes"
gem "actionpack-action_caching"
15
gem "actionpack-xml_parser"
16
gem "roadie-rails"
jplang's avatar
jplang committed
17 18

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
19
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby]
20
gem "rbpdf", "~> 1.19.0"
21 22 23

# Optional gem for LDAP authentication
group :ldap do
24
  gem "net-ldap", "~> 0.12.0"
25 26 27 28
end

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

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

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

platforms :jruby do
46 47
  # jruby-openssl is bundled with JRuby 1.7.0
  gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
48
  gem "activerecord-jdbc-adapter", "~> 1.3.2"
49
end
50

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.3.11", :platforms => [:mri, :mingw, :x64_mingw]
64 65
        gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
      when 'mysql'
66 67
        gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
      when /postgresql/
marutosijp's avatar
marutosijp committed
68
        gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw]
69 70
        gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
      when /sqlite3/
71
        gem "sqlite3", :platforms => [:mri, :mingw, :x64_mingw]
72
        gem "jdbc-sqlite3", ">= 3.8.10.1", :platforms => :jruby
73
        gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
74
      when /sqlserver/
75 76
        gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw, :x64_mingw]
        gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
77
      else
jplang's avatar
jplang committed
78
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
79 80 81
      end
    end
  else
82
    warn("No adapter found in config/database.yml, please configure it first")
83
  end
84
else
85
  warn("Please configure your config/database.yml first")
86 87 88 89
end

group :development do
  gem "rdoc", ">= 2.4.2"
emassip's avatar
emassip committed
90
  gem "yard"
91 92 93
end

group :test do
jplang's avatar
jplang committed
94
  gem "minitest"
jplang's avatar
jplang committed
95
  gem "rails-dom-testing"
marutosijp's avatar
marutosijp committed
96
  gem "mocha"
97
  gem "simplecov", "~> 0.9.1", :require => false
jplang's avatar
jplang committed
98
  # For running UI tests
99
  gem "capybara"
jplang's avatar
jplang committed
100
  gem "selenium-webdriver"
101 102
end

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

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