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

marutosijp's avatar
marutosijp committed
3
gem "rails", "4.1.8"
4
gem "jquery-rails", "~> 3.1.1"
jplang's avatar
jplang committed
5
gem "coderay", "~> 1.1.0"
6
gem "builder", ">= 3.0.4"
7
gem "request_store", "1.0.5"
8
gem "mime-types"
jplang's avatar
jplang committed
9 10 11 12 13 14
gem "awesome_nested_set", "3.0.0"
gem "protected_attributes"
gem "actionpack-action_caching"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
15
gem "rbpdf", "~> 1.18.2"
16 17 18

# Optional gem for LDAP authentication
group :ldap do
jplang's avatar
jplang committed
19
  gem "net-ldap", "~> 0.3.1"
20 21 22 23
end

# Optional gem for OpenID authentication
group :openid do
24
  gem "ruby-openid", "~> 2.3.0", :require => "openid"
jplang's avatar
jplang committed
25
  gem "rack-openid"
26 27
end

28
platforms :mri, :mingw do
jplang's avatar
jplang committed
29
  # Optional gem for exporting the gantt to a PNG file, not supported with jruby
30 31 32
  group :rmagick do
    gem "rmagick", ">= 2.0.0"
  end
jplang's avatar
jplang committed
33 34 35

  # Optional Markdown support, not for JRuby
  group :markdown do
jplang's avatar
jplang committed
36
    gem "redcarpet", "~> 3.1.2"
jplang's avatar
jplang committed
37
  end
38 39 40
end

platforms :jruby do
41 42
  # jruby-openssl is bundled with JRuby 1.7.0
  gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
43
  gem "activerecord-jdbc-adapter", "~> 1.3.2"
44
end
45

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

group :development do
  gem "rdoc", ">= 2.4.2"
emassip's avatar
emassip committed
84
  gem "yard"
85 86 87
end

group :test do
jplang's avatar
jplang committed
88 89
  gem "minitest"
  gem "shoulda-context"
90
  gem "mocha", "~> 1.0.0", :require => 'mocha/api'
jplang's avatar
jplang committed
91 92 93
  # For running UI tests
  gem "capybara", "~> 2.1.0"
  gem "selenium-webdriver"
94 95
end

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

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