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