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

maeda's avatar
maeda committed
3
gem "bundler", ">= 1.5.0"
jplang's avatar
jplang committed
4

maeda's avatar
maeda committed
5
gem "rails", "5.2.2"
maeda's avatar
maeda committed
6
gem "rouge", "~> 3.3.0"
7
gem "request_store", "1.0.5"
8
gem "mini_mime", "~> 1.0.1"
9
gem "actionpack-xml_parser"
10
gem "roadie-rails", "~> 1.3.0"
11
gem "mimemagic"
maeda's avatar
maeda committed
12
gem "mail", "~> 2.7.1"
13
gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6"
14
gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1")
marutosijp's avatar
marutosijp committed
15
gem "i18n", "~> 0.7.0"
maeda's avatar
maeda committed
16
gem "rbpdf", "~> 1.19.6"
17

jplang's avatar
jplang committed
18
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
19
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
20 21 22

# Optional gem for LDAP authentication
group :ldap do
jplang's avatar
jplang committed
23
  gem "net-ldap", "~> 0.16.0"
24 25 26 27
end

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

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

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

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

group :development do
emassip's avatar
emassip committed
76
  gem "yard"
77 78 79
end

group :test do
jplang's avatar
jplang committed
80
  gem "rails-dom-testing"
marutosijp's avatar
marutosijp committed
81
  gem "mocha"
jplang's avatar
jplang committed
82
  gem "simplecov", "~> 0.14.1", :require => false
83
  # For running system tests
jplang's avatar
jplang committed
84
  gem 'puma', '~> 3.7'
85 86
  gem "capybara", '~> 2.13'
  gem "selenium-webdriver"
87 88
end

89 90
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
jplang's avatar
jplang committed
91
  eval_gemfile local_gemfile
jplang's avatar
jplang committed
92 93
end

94
# Load plugins' Gemfiles
95
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
jplang's avatar
jplang committed
96
  eval_gemfile file
97
end