|
@@
-1,105
+1,106
|
|
1
|
source 'https://rubygems.org'
|
|
1
|
source 'https://rubygems.org'
|
|
2
|
|
|
2
|
|
|
3
|
gem "rails", "3.2.16"
|
|
3
|
gem "rails", "3.2.16"
|
|
4
|
gem "jquery-rails", "~> 2.0.2"
|
|
4
|
gem "jquery-rails", "~> 2.0.2"
|
|
5
|
gem "coderay", "~> 1.1.0"
|
|
5
|
gem "coderay", "~> 1.1.0"
|
|
6
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
|
6
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
|
7
|
gem "builder", "3.0.0"
|
|
7
|
gem "builder", "3.0.0"
|
|
8
|
gem "mime-types"
|
|
8
|
gem "mime-types"
|
|
|
|
|
9
|
gem "awesome_nested_set", "2.1.6"
|
|
9
|
|
|
10
|
|
|
10
|
# Optional gem for LDAP authentication
|
|
11
|
# Optional gem for LDAP authentication
|
|
11
|
group :ldap do
|
|
12
|
group :ldap do
|
|
12
|
gem "net-ldap", "~> 0.3.1"
|
|
13
|
gem "net-ldap", "~> 0.3.1"
|
|
13
|
end
|
|
14
|
end
|
|
14
|
|
|
15
|
|
|
15
|
# Optional gem for OpenID authentication
|
|
16
|
# Optional gem for OpenID authentication
|
|
16
|
group :openid do
|
|
17
|
group :openid do
|
|
17
|
gem "ruby-openid", "~> 2.3.0", :require => "openid"
|
|
18
|
gem "ruby-openid", "~> 2.3.0", :require => "openid"
|
|
18
|
gem "rack-openid"
|
|
19
|
gem "rack-openid"
|
|
19
|
end
|
|
20
|
end
|
|
20
|
|
|
21
|
|
|
21
|
platforms :mri, :mingw do
|
|
22
|
platforms :mri, :mingw do
|
|
22
|
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
|
|
23
|
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
|
|
23
|
group :rmagick do
|
|
24
|
group :rmagick do
|
|
24
|
# RMagick 2 supports ruby 1.9
|
|
25
|
# RMagick 2 supports ruby 1.9
|
|
25
|
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
|
|
26
|
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
|
|
26
|
# different requirements for the same gem on different platforms
|
|
27
|
# different requirements for the same gem on different platforms
|
|
27
|
gem "rmagick", ">= 2.0.0"
|
|
28
|
gem "rmagick", ">= 2.0.0"
|
|
28
|
end
|
|
29
|
end
|
|
29
|
|
|
30
|
|
|
30
|
# Optional Markdown support, not for JRuby
|
|
31
|
# Optional Markdown support, not for JRuby
|
|
31
|
group :markdown do
|
|
32
|
group :markdown do
|
|
32
|
# TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
|
|
33
|
# TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
|
|
33
|
gem "redcarpet", "~> 2.3.0"
|
|
34
|
gem "redcarpet", "~> 2.3.0"
|
|
34
|
end
|
|
35
|
end
|
|
35
|
end
|
|
36
|
end
|
|
36
|
|
|
37
|
|
|
37
|
platforms :jruby do
|
|
38
|
platforms :jruby do
|
|
38
|
# jruby-openssl is bundled with JRuby 1.7.0
|
|
39
|
# jruby-openssl is bundled with JRuby 1.7.0
|
|
39
|
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
|
|
40
|
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
|
|
40
|
gem "activerecord-jdbc-adapter", "~> 1.3.2"
|
|
41
|
gem "activerecord-jdbc-adapter", "~> 1.3.2"
|
|
41
|
end
|
|
42
|
end
|
|
42
|
|
|
43
|
|
|
43
|
# Include database gems for the adapters found in the database
|
|
44
|
# Include database gems for the adapters found in the database
|
|
44
|
# configuration file
|
|
45
|
# configuration file
|
|
45
|
require 'erb'
|
|
46
|
require 'erb'
|
|
46
|
require 'yaml'
|
|
47
|
require 'yaml'
|
|
47
|
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
|
48
|
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
|
48
|
if File.exist?(database_file)
|
|
49
|
if File.exist?(database_file)
|
|
49
|
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
|
|
50
|
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
|
|
50
|
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
|
|
51
|
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
|
|
51
|
if adapters.any?
|
|
52
|
if adapters.any?
|
|
52
|
adapters.each do |adapter|
|
|
53
|
adapters.each do |adapter|
|
|
53
|
case adapter
|
|
54
|
case adapter
|
|
54
|
when 'mysql2'
|
|
55
|
when 'mysql2'
|
|
55
|
gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
|
|
56
|
gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
|
|
56
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
57
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
57
|
when 'mysql'
|
|
58
|
when 'mysql'
|
|
58
|
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
|
|
59
|
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
|
|
59
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
60
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
|
60
|
when /postgresql/
|
|
61
|
when /postgresql/
|
|
61
|
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
|
|
62
|
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
|
|
62
|
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
|
|
63
|
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
|
|
63
|
when /sqlite3/
|
|
64
|
when /sqlite3/
|
|
64
|
gem "sqlite3", :platforms => [:mri, :mingw]
|
|
65
|
gem "sqlite3", :platforms => [:mri, :mingw]
|
|
65
|
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
66
|
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
66
|
when /sqlserver/
|
|
67
|
when /sqlserver/
|
|
67
|
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
|
|
68
|
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
|
|
68
|
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
|
|
69
|
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
|
|
69
|
else
|
|
70
|
else
|
|
70
|
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
|
|
71
|
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
|
|
71
|
end
|
|
72
|
end
|
|
72
|
end
|
|
73
|
end
|
|
73
|
else
|
|
74
|
else
|
|
74
|
warn("No adapter found in config/database.yml, please configure it first")
|
|
75
|
warn("No adapter found in config/database.yml, please configure it first")
|
|
75
|
end
|
|
76
|
end
|
|
76
|
else
|
|
77
|
else
|
|
77
|
warn("Please configure your config/database.yml first")
|
|
78
|
warn("Please configure your config/database.yml first")
|
|
78
|
end
|
|
79
|
end
|
|
79
|
|
|
80
|
|
|
80
|
group :development do
|
|
81
|
group :development do
|
|
81
|
gem "rdoc", ">= 2.4.2"
|
|
82
|
gem "rdoc", ">= 2.4.2"
|
|
82
|
gem "yard"
|
|
83
|
gem "yard"
|
|
83
|
end
|
|
84
|
end
|
|
84
|
|
|
85
|
|
|
85
|
group :test do
|
|
86
|
group :test do
|
|
86
|
gem "shoulda", "~> 3.3.2"
|
|
87
|
gem "shoulda", "~> 3.3.2"
|
|
87
|
gem "mocha", ">= 0.14", :require => 'mocha/api'
|
|
88
|
gem "mocha", ">= 0.14", :require => 'mocha/api'
|
|
88
|
if RUBY_VERSION >= '1.9.3'
|
|
89
|
if RUBY_VERSION >= '1.9.3'
|
|
89
|
gem "capybara", "~> 2.1.0"
|
|
90
|
gem "capybara", "~> 2.1.0"
|
|
90
|
gem "selenium-webdriver"
|
|
91
|
gem "selenium-webdriver"
|
|
91
|
end
|
|
92
|
end
|
|
92
|
end
|
|
93
|
end
|
|
93
|
|
|
94
|
|
|
94
|
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
|
95
|
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
|
95
|
if File.exists?(local_gemfile)
|
|
96
|
if File.exists?(local_gemfile)
|
|
96
|
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
|
|
97
|
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
|
|
97
|
instance_eval File.read(local_gemfile)
|
|
98
|
instance_eval File.read(local_gemfile)
|
|
98
|
end
|
|
99
|
end
|
|
99
|
|
|
100
|
|
|
100
|
# Load plugins' Gemfiles
|
|
101
|
# Load plugins' Gemfiles
|
|
101
|
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
|
|
102
|
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
|
|
102
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
|
103
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
|
103
|
#TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
|
|
104
|
#TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
|
|
104
|
instance_eval File.read(file), file
|
|
105
|
instance_eval File.read(file), file
|
|
105
|
end
|
|
106
|
end
|