GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

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

jplang's avatar
jplang committed
3
gem "rails", "3.2.15"
4
gem "jquery-rails", "~> 2.0.2"
jplang's avatar
jplang committed
5
gem "coderay", "~> 1.1.0"
6
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
7
gem "builder", "3.0.0"
8 9 10

# Optional gem for LDAP authentication
group :ldap do
jplang's avatar
jplang committed
11
  gem "net-ldap", "~> 0.3.1"
12 13 14 15
end

# Optional gem for OpenID authentication
group :openid do
16
  gem "ruby-openid", "~> 2.3.0", :require => "openid"
jplang's avatar
jplang committed
17
  gem "rack-openid"
18 19
end

20 21 22 23 24 25 26 27
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
platforms :mri, :mingw do
  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
28 29 30
end

platforms :jruby do
31 32
  # jruby-openssl is bundled with JRuby 1.7.0
  gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
tmaruyama's avatar
tmaruyama committed
33
  gem "activerecord-jdbc-adapter", "~> 1.2.6"
34
end
35

36 37
# Include database gems for the adapters found in the database
# configuration file
38
require 'erb'
39
require 'yaml'
40 41
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
42
  database_config = YAML::load(ERB.new(IO.read(database_file)).result)
43 44 45 46
  adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  if adapters.any?
    adapters.each do |adapter|
      case adapter
47 48 49 50 51
      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]
52 53 54 55 56 57 58 59 60 61 62
        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
jplang's avatar
jplang committed
63
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
64 65 66
      end
    end
  else
67
    warn("No adapter found in config/database.yml, please configure it first")
68
  end
69
else
70
  warn("Please configure your config/database.yml first")
71 72 73 74
end

group :development do
  gem "rdoc", ">= 2.4.2"
emassip's avatar
emassip committed
75
  gem "yard"
76 77 78
end

group :test do
jplang's avatar
jplang committed
79
  gem "shoulda", "~> 3.3.2"
80
  gem "mocha", ">= 0.14", :require => 'mocha/api'
81
  if RUBY_VERSION >= '1.9.3'
tmaruyama's avatar
tmaruyama committed
82 83
    gem "capybara", "~> 2.1.0"
    gem "selenium-webdriver"
tmaruyama's avatar
tmaruyama committed
84
    gem "database_cleaner"
tmaruyama's avatar
tmaruyama committed
85
  end
86 87
end

88 89
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
jplang's avatar
jplang committed
90
  puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
91
  instance_eval File.read(local_gemfile)
jplang's avatar
jplang committed
92 93
end

94
# Load plugins' Gemfiles
95
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
96
  puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
97 98
  #TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
  instance_eval File.read(file), file
99
end