##// END OF EJS Templates
back out r11486...
Toshi MARUYAMA -
r11257:2ffbfacf5f8b
parent child
Show More
@@ -1,93 +1,92
1 source 'http://rubygems.org'
1 source 'https://rubygems.org'
2
2
3 gem 'rails', '3.2.12'
3 gem 'rails', '3.2.12'
4 gem "jquery-rails", "~> 2.0.2"
4 gem "jquery-rails", "~> 2.0.2"
5 gem "i18n", "~> 0.6.0"
5 gem "i18n", "~> 0.6.0"
6 gem "coderay", "~> 1.0.6"
6 gem "coderay", "~> 1.0.6"
7 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
7 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
8 gem "builder", "3.0.0"
8 gem "builder", "3.0.0"
9
9
10 # Optional gem for LDAP authentication
10 # Optional gem for LDAP authentication
11 group :ldap do
11 group :ldap do
12 gem "net-ldap", "~> 0.3.1"
12 gem "net-ldap", "~> 0.3.1"
13 end
13 end
14
14
15 # Optional gem for OpenID authentication
15 # Optional gem for OpenID authentication
16 group :openid do
16 group :openid do
17 gem "ruby-openid", "~> 2.1.4", :require => "openid"
17 gem "ruby-openid", "~> 2.1.4", :require => "openid"
18 gem "rack-openid"
18 gem "rack-openid"
19 end
19 end
20
20
21 # Optional gem for exporting the gantt to a PNG file, not supported with jruby
21 # Optional gem for exporting the gantt to a PNG file, not supported with jruby
22 platforms :mri, :mingw do
22 platforms :mri, :mingw do
23 group :rmagick do
23 group :rmagick do
24 # RMagick 2 supports ruby 1.9
24 # RMagick 2 supports ruby 1.9
25 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
25 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
26 # different requirements for the same gem on different platforms
26 # different requirements for the same gem on different platforms
27 gem "rmagick", ">= 2.0.0"
27 gem "rmagick", ">= 2.0.0"
28 end
28 end
29 end
29 end
30
30
31 platforms :jruby do
31 platforms :jruby do
32 # jruby-openssl is bundled with JRuby 1.7.0
32 # jruby-openssl is bundled with JRuby 1.7.0
33 gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
33 gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
34 gem "activerecord-jdbc-adapter", "1.2.5"
34 gem "activerecord-jdbc-adapter", "1.2.5"
35 end
35 end
36
36
37 # Include database gems for the adapters found in the database
37 # Include database gems for the adapters found in the database
38 # configuration file
38 # configuration file
39 require 'erb'
39 require 'erb'
40 require 'yaml'
41 database_file = File.join(File.dirname(__FILE__), "config/database.yml")
40 database_file = File.join(File.dirname(__FILE__), "config/database.yml")
42 if File.exist?(database_file)
41 if File.exist?(database_file)
43 database_config = YAML::load(ERB.new(IO.read(database_file)).result)
42 database_config = YAML::load(ERB.new(IO.read(database_file)).result)
44 adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
43 adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
45 if adapters.any?
44 if adapters.any?
46 adapters.each do |adapter|
45 adapters.each do |adapter|
47 case adapter
46 case adapter
48 when /mysql/
47 when /mysql/
49 gem "mysql", "~> 2.8.1", :platforms => [:mri_18, :mingw_18]
48 gem "mysql", "~> 2.8.1", :platforms => [:mri_18, :mingw_18]
50 gem "mysql2", "~> 0.3.11", :platforms => [:mri_19, :mingw_19]
49 gem "mysql2", "~> 0.3.11", :platforms => [:mri_19, :mingw_19]
51 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
50 gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
52 when /postgresql/
51 when /postgresql/
53 gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
52 gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
54 gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
53 gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
55 when /sqlite3/
54 when /sqlite3/
56 gem "sqlite3", :platforms => [:mri, :mingw]
55 gem "sqlite3", :platforms => [:mri, :mingw]
57 gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
56 gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
58 when /sqlserver/
57 when /sqlserver/
59 gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
58 gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
60 gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
59 gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
61 else
60 else
62 warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
61 warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
63 end
62 end
64 end
63 end
65 else
64 else
66 warn("No adapter found in config/database.yml, please configure it first")
65 warn("No adapter found in config/database.yml, please configure it first")
67 end
66 end
68 else
67 else
69 warn("Please configure your config/database.yml first")
68 warn("Please configure your config/database.yml first")
70 end
69 end
71
70
72 group :development do
71 group :development do
73 gem "rdoc", ">= 2.4.2"
72 gem "rdoc", ">= 2.4.2"
74 gem "yard"
73 gem "yard"
75 end
74 end
76
75
77 group :test do
76 group :test do
78 gem "shoulda", "~> 3.3.2"
77 gem "shoulda", "~> 3.3.2"
79 gem "mocha"
78 gem "mocha"
80 gem 'capybara', '~> 2.0.0'
79 gem 'capybara', '~> 2.0.0'
81 end
80 end
82
81
83 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
82 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
84 if File.exists?(local_gemfile)
83 if File.exists?(local_gemfile)
85 puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
84 puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
86 instance_eval File.read(local_gemfile)
85 instance_eval File.read(local_gemfile)
87 end
86 end
88
87
89 # Load plugins' Gemfiles
88 # Load plugins' Gemfiles
90 Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
89 Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
91 puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
90 puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
92 instance_eval File.read(file)
91 instance_eval File.read(file)
93 end
92 end
General Comments 0
You need to be logged in to leave comments. Login now