2013-02-26 15:40:58 +04:00
|
|
|
source 'https://rubygems.org'
|
2012-02-19 18:30:46 +04:00
|
|
|
|
2014-05-07 11:55:53 +04:00
|
|
|
gem "rails", "3.2.18"
|
2014-03-25 11:14:34 +04:00
|
|
|
gem "rake", "~> 10.1.1"
|
2012-07-22 17:29:26 +04:00
|
|
|
gem "jquery-rails", "~> 2.0.2"
|
2013-10-26 12:55:50 +04:00
|
|
|
gem "coderay", "~> 1.1.0"
|
2012-02-19 18:44:48 +04:00
|
|
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
2012-09-07 02:34:21 +04:00
|
|
|
gem "builder", "3.0.0"
|
2014-05-01 05:50:40 +04:00
|
|
|
gem "request_store"
|
2014-01-05 20:35:59 +04:00
|
|
|
gem "mime-types"
|
2012-02-19 18:30:46 +04:00
|
|
|
|
|
|
|
# Optional gem for LDAP authentication
|
|
|
|
group :ldap do
|
2012-02-19 19:05:20 +04:00
|
|
|
gem "net-ldap", "~> 0.3.1"
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
# Optional gem for OpenID authentication
|
|
|
|
group :openid do
|
2013-09-30 04:18:26 +04:00
|
|
|
gem "ruby-openid", "~> 2.3.0", :require => "openid"
|
2012-04-25 21:17:49 +04:00
|
|
|
gem "rack-openid"
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
2012-04-06 14:26:55 +04:00
|
|
|
platforms :mri, :mingw do
|
2013-12-23 21:07:51 +04:00
|
|
|
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
|
2012-04-06 14:26:55 +04:00
|
|
|
group :rmagick do
|
|
|
|
# RMagick 2 supports ruby 1.9
|
|
|
|
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
|
|
|
|
# different requirements for the same gem on different platforms
|
|
|
|
gem "rmagick", ">= 2.0.0"
|
|
|
|
end
|
2013-12-23 21:07:51 +04:00
|
|
|
|
|
|
|
# Optional Markdown support, not for JRuby
|
|
|
|
group :markdown do
|
|
|
|
# TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
|
|
|
|
gem "redcarpet", "~> 2.3.0"
|
|
|
|
end
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
platforms :jruby do
|
2012-12-08 13:22:46 +04:00
|
|
|
# jruby-openssl is bundled with JRuby 1.7.0
|
|
|
|
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
|
2013-11-09 20:44:44 +04:00
|
|
|
gem "activerecord-jdbc-adapter", "~> 1.3.2"
|
2013-01-15 23:23:03 +04:00
|
|
|
end
|
2012-02-19 18:30:46 +04:00
|
|
|
|
2013-01-15 23:23:03 +04:00
|
|
|
# Include database gems for the adapters found in the database
|
|
|
|
# configuration file
|
2013-01-29 22:02:20 +04:00
|
|
|
require 'erb'
|
2013-02-26 15:41:09 +04:00
|
|
|
require 'yaml'
|
2013-01-15 23:23:03 +04:00
|
|
|
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
|
|
|
if File.exist?(database_file)
|
2013-01-29 22:02:20 +04:00
|
|
|
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
|
2013-01-15 23:23:03 +04:00
|
|
|
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
|
|
|
|
if adapters.any?
|
|
|
|
adapters.each do |adapter|
|
|
|
|
case adapter
|
2013-02-28 21:20:28 +04:00
|
|
|
when 'mysql2'
|
|
|
|
gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
|
|
|
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
|
|
when 'mysql'
|
|
|
|
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
|
2013-01-15 23:23:03 +04:00
|
|
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
|
|
when /postgresql/
|
|
|
|
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
|
|
|
|
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
|
|
|
|
when /sqlite3/
|
|
|
|
gem "sqlite3", :platforms => [:mri, :mingw]
|
|
|
|
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
|
|
when /sqlserver/
|
|
|
|
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
|
|
|
|
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
|
|
|
|
else
|
2013-01-22 00:53:52 +04:00
|
|
|
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
|
2013-01-15 23:23:03 +04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
2013-01-19 18:44:26 +04:00
|
|
|
warn("No adapter found in config/database.yml, please configure it first")
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
2013-01-15 23:23:03 +04:00
|
|
|
else
|
2013-01-19 18:44:26 +04:00
|
|
|
warn("Please configure your config/database.yml first")
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
group :development do
|
|
|
|
gem "rdoc", ">= 2.4.2"
|
2012-05-18 17:52:49 +04:00
|
|
|
gem "yard"
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
group :test do
|
2013-02-03 19:49:02 +04:00
|
|
|
gem "shoulda", "~> 3.3.2"
|
2014-05-01 15:44:06 +04:00
|
|
|
gem "mocha", "~> 1.0.0", :require => 'mocha/api'
|
2013-05-09 17:03:28 +04:00
|
|
|
if RUBY_VERSION >= '1.9.3'
|
2013-05-09 16:21:45 +04:00
|
|
|
gem "capybara", "~> 2.1.0"
|
|
|
|
gem "selenium-webdriver"
|
|
|
|
end
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|
|
|
|
|
2012-04-19 13:22:55 +04:00
|
|
|
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
|
|
|
if File.exists?(local_gemfile)
|
2012-04-06 15:12:50 +04:00
|
|
|
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
|
2012-04-19 13:22:55 +04:00
|
|
|
instance_eval File.read(local_gemfile)
|
2012-04-06 15:12:50 +04:00
|
|
|
end
|
|
|
|
|
2012-02-19 18:30:46 +04:00
|
|
|
# Load plugins' Gemfiles
|
2012-05-02 20:20:32 +04:00
|
|
|
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
|
2012-02-19 18:30:46 +04:00
|
|
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
2013-05-11 15:19:21 +04:00
|
|
|
#TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
|
|
|
|
instance_eval File.read(file), file
|
2012-02-19 18:30:46 +04:00
|
|
|
end
|