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