2015-01-07 14:59:41 +08:00
|
|
|
source 'https://rubygems.org'
|
|
|
|
|
|
|
|
unless RUBY_PLATFORM =~ /w32/
|
2015-01-10 16:30:56 +08:00
|
|
|
5
|
2015-01-07 14:59:41 +08:00
|
|
|
# unix-like only
|
2015-01-10 16:30:56 +08:00
|
|
|
6
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'iconv'
|
2015-01-10 16:30:56 +08:00
|
|
|
7
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'rubyzip'
|
2015-01-10 16:30:56 +08:00
|
|
|
8
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'zip-zip'
|
2015-01-10 16:30:56 +08:00
|
|
|
9
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
10
|
|
|
|
11
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'seems_rateable', path: 'lib/seems_rateable'
|
2015-01-10 16:30:56 +08:00
|
|
|
12
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "rails", "3.2.13"
|
2015-01-10 16:30:56 +08:00
|
|
|
13
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "jquery-rails", "~> 2.0.2"
|
2015-01-10 16:30:56 +08:00
|
|
|
14
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "i18n", "~> 0.6.0"
|
2015-01-10 16:30:56 +08:00
|
|
|
15
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "coderay", "~> 1.0.6"
|
2015-01-10 16:30:56 +08:00
|
|
|
16
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
2015-01-10 16:30:56 +08:00
|
|
|
17
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "builder", "3.0.0"
|
2015-01-10 16:30:56 +08:00
|
|
|
18
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'acts-as-taggable-on', '2.4.1'
|
2015-01-10 16:30:56 +08:00
|
|
|
19
|
|
|
|
gem 'spreadsheet'
|
|
|
|
20
|
|
|
|
gem 'ruby-ole'
|
|
|
|
21
|
|
|
|
22
|
2015-01-07 14:59:41 +08:00
|
|
|
group :development do
|
2015-01-10 16:30:56 +08:00
|
|
|
23
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'better_errors', path: 'lib/better_errors'
|
2015-01-10 16:30:56 +08:00
|
|
|
24
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
2015-01-10 16:30:56 +08:00
|
|
|
25
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
26
|
|
|
|
27
|
2015-01-07 14:59:41 +08:00
|
|
|
group :test do
|
2015-01-10 16:30:56 +08:00
|
|
|
28
|
|
|
|
gem "shoulda", "~> 3.5.0"
|
|
|
|
29
|
|
|
|
gem "mocha", "~> 1.1.0"
|
|
|
|
30
|
|
|
|
gem 'capybara', '~> 2.4.1'
|
|
|
|
31
|
|
|
|
gem 'nokogiri', '~> 1.6.3'
|
|
|
|
32
|
|
|
|
gem 'factory_girl', '~> 4.4.0'
|
|
|
|
33
|
|
|
|
gem 'selenium-webdriver', '~> 2.42.0'
|
|
|
|
34
|
|
|
|
35
|
|
|
|
36
|
|
|
|
platforms :mri, :mingw do
|
|
|
|
37
|
|
|
|
group :rmagick do
|
|
|
|
38
|
|
|
|
# RMagick 2 supports ruby 1.9
|
|
|
|
39
|
|
|
|
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
|
|
|
|
40
|
|
|
|
# different requirements for the same gem on different platforms
|
|
|
|
41
|
|
|
|
gem "rmagick", ">= 2.0.0"
|
|
|
|
42
|
|
|
|
end
|
|
|
|
43
|
|
|
|
end
|
|
|
|
44
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
45
|
|
|
|
46
|
|
|
|
group :development, :test do
|
|
|
|
47
|
|
|
|
gem "guard-rails", '~> 0.5.3'
|
|
|
|
48
|
|
|
|
gem 'spork-testunit', '~> 0.0.8'
|
|
|
|
49
|
|
|
|
gem 'guard-spork', '~> 1.5.1'
|
|
|
|
50
|
|
|
|
gem 'guard-test', '~> 1.0.0'
|
|
|
|
51
|
|
|
|
gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/
|
|
|
|
52
|
|
|
|
gem 'pry'
|
|
|
|
53
|
|
|
|
gem 'pry-nav'
|
|
|
|
54
|
|
|
|
55
|
|
|
|
end
|
|
|
|
56
|
|
|
|
57
|
|
|
|
58
|
2015-01-07 14:59:41 +08:00
|
|
|
# Gems used only for assets and not required
|
2015-01-10 16:30:56 +08:00
|
|
|
59
|
2015-01-07 14:59:41 +08:00
|
|
|
# in production environments by default.
|
2015-01-10 16:30:56 +08:00
|
|
|
60
|
2015-01-07 14:59:41 +08:00
|
|
|
group :assets do
|
2015-01-10 16:30:56 +08:00
|
|
|
61
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'sass-rails', '~> 3.2.3'
|
2015-01-10 16:30:56 +08:00
|
|
|
62
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'coffee-rails', '~> 3.2.1'
|
2015-01-10 16:30:56 +08:00
|
|
|
63
|
|
|
|
64
|
2015-01-07 14:59:41 +08:00
|
|
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
2015-01-10 16:30:56 +08:00
|
|
|
65
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'therubyracer', :platforms => :ruby
|
2015-01-10 16:30:56 +08:00
|
|
|
66
|
|
|
|
67
|
2015-01-07 14:59:41 +08:00
|
|
|
gem 'uglifier', '>= 1.0.3'
|
2015-01-10 16:30:56 +08:00
|
|
|
68
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
69
|
|
|
|
70
|
2015-01-07 14:59:41 +08:00
|
|
|
# Optional gem for LDAP authentication
|
2015-01-10 16:30:56 +08:00
|
|
|
71
|
2015-01-07 14:59:41 +08:00
|
|
|
group :ldap do
|
2015-01-10 16:30:56 +08:00
|
|
|
72
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "net-ldap", "~> 0.3.1"
|
2015-01-10 16:30:56 +08:00
|
|
|
73
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
74
|
|
|
|
75
|
|
|
|
76
|
2015-01-07 14:59:41 +08:00
|
|
|
# Optional gem for OpenID authentication
|
2015-01-10 16:30:56 +08:00
|
|
|
77
|
2015-01-07 14:59:41 +08:00
|
|
|
group :openid do
|
2015-01-10 16:30:56 +08:00
|
|
|
78
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "ruby-openid", "~> 2.1.4", :require => "openid"
|
2015-01-10 16:30:56 +08:00
|
|
|
79
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "rack-openid"
|
2015-01-10 16:30:56 +08:00
|
|
|
80
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
81
|
|
|
|
82
|
2015-01-07 14:59:41 +08:00
|
|
|
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
|
2015-01-10 16:30:56 +08:00
|
|
|
83
|
2015-01-07 14:59:41 +08:00
|
|
|
platforms :jruby do
|
2015-01-10 16:30:56 +08:00
|
|
|
84
|
2015-01-07 14:59:41 +08:00
|
|
|
# jruby-openssl is bundled with JRuby 1.7.0
|
2015-01-10 16:30:56 +08:00
|
|
|
85
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
|
2015-01-10 16:30:56 +08:00
|
|
|
86
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-jdbc-adapter", "1.2.5"
|
2015-01-10 16:30:56 +08:00
|
|
|
87
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
88
|
|
|
|
89
|
2015-01-07 14:59:41 +08:00
|
|
|
# Include database gems for the adapters found in the database
|
2015-01-10 16:30:56 +08:00
|
|
|
90
|
2015-01-07 14:59:41 +08:00
|
|
|
# configuration file
|
2015-01-10 16:30:56 +08:00
|
|
|
91
|
2015-01-07 14:59:41 +08:00
|
|
|
require 'erb'
|
2015-01-10 16:30:56 +08:00
|
|
|
92
|
2015-01-07 14:59:41 +08:00
|
|
|
require 'yaml'
|
2015-01-10 16:30:56 +08:00
|
|
|
93
|
2015-01-07 14:59:41 +08:00
|
|
|
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
2015-01-10 16:30:56 +08:00
|
|
|
94
|
2015-01-07 14:59:41 +08:00
|
|
|
if File.exist?(database_file)
|
2015-01-10 16:30:56 +08:00
|
|
|
95
|
2015-01-07 14:59:41 +08:00
|
|
|
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
|
2015-01-10 16:30:56 +08:00
|
|
|
96
|
2015-01-07 14:59:41 +08:00
|
|
|
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
|
2015-01-10 16:30:56 +08:00
|
|
|
97
|
2015-01-07 14:59:41 +08:00
|
|
|
if adapters.any?
|
2015-01-10 16:30:56 +08:00
|
|
|
98
|
2015-01-07 14:59:41 +08:00
|
|
|
adapters.each do |adapter|
|
2015-01-10 16:30:56 +08:00
|
|
|
99
|
2015-01-07 14:59:41 +08:00
|
|
|
case adapter
|
2015-01-10 16:30:56 +08:00
|
|
|
100
|
2015-01-07 14:59:41 +08:00
|
|
|
when 'mysql2'
|
2015-01-10 16:30:56 +08:00
|
|
|
101
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
102
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
2015-01-10 16:30:56 +08:00
|
|
|
103
|
2015-01-07 14:59:41 +08:00
|
|
|
when 'mysql'
|
2015-01-10 16:30:56 +08:00
|
|
|
104
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
105
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
|
2015-01-10 16:30:56 +08:00
|
|
|
106
|
2015-01-07 14:59:41 +08:00
|
|
|
when /postgresql/
|
2015-01-10 16:30:56 +08:00
|
|
|
107
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
108
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
|
2015-01-10 16:30:56 +08:00
|
|
|
109
|
2015-01-07 14:59:41 +08:00
|
|
|
when /sqlite3/
|
2015-01-10 16:30:56 +08:00
|
|
|
110
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "sqlite3", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
111
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
2015-01-10 16:30:56 +08:00
|
|
|
112
|
2015-01-07 14:59:41 +08:00
|
|
|
when /sqlserver/
|
2015-01-10 16:30:56 +08:00
|
|
|
113
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
114
|
2015-01-07 14:59:41 +08:00
|
|
|
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
|
2015-01-10 16:30:56 +08:00
|
|
|
115
|
2015-01-07 14:59:41 +08:00
|
|
|
else
|
2015-01-10 16:30:56 +08:00
|
|
|
116
|
2015-01-07 14:59:41 +08:00
|
|
|
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
|
2015-01-10 16:30:56 +08:00
|
|
|
117
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
118
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
119
|
2015-01-07 14:59:41 +08:00
|
|
|
else
|
2015-01-10 16:30:56 +08:00
|
|
|
120
|
2015-01-07 14:59:41 +08:00
|
|
|
warn("No adapter found in config/database.yml, please configure it first")
|
2015-01-10 16:30:56 +08:00
|
|
|
121
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
122
|
2015-01-07 14:59:41 +08:00
|
|
|
else
|
2015-01-10 16:30:56 +08:00
|
|
|
123
|
2015-01-07 14:59:41 +08:00
|
|
|
warn("Please configure your config/database.yml first")
|
2015-01-10 16:30:56 +08:00
|
|
|
124
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
125
|
|
|
|
126
|
2015-01-07 14:59:41 +08:00
|
|
|
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
2015-01-10 16:30:56 +08:00
|
|
|
127
|
2015-01-07 14:59:41 +08:00
|
|
|
if File.exists?(local_gemfile)
|
2015-01-10 16:30:56 +08:00
|
|
|
128
|
2015-01-07 14:59:41 +08:00
|
|
|
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
|
2015-01-10 16:30:56 +08:00
|
|
|
129
|
2015-01-07 14:59:41 +08:00
|
|
|
instance_eval File.read(local_gemfile)
|
2015-01-10 16:30:56 +08:00
|
|
|
130
|
2015-01-07 14:59:41 +08:00
|
|
|
end
|
2015-01-10 16:30:56 +08:00
|
|
|
131
|
|
|
|
132
|
2015-01-07 14:59:41 +08:00
|
|
|
# Load plugins' Gemfiles
|
2015-01-10 16:30:56 +08:00
|
|
|
133
|
2015-01-07 14:59:41 +08:00
|
|
|
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
|
2015-01-10 16:30:56 +08:00
|
|
|
134
|
2015-01-07 14:59:41 +08:00
|
|
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
2015-01-10 16:30:56 +08:00
|
|
|
135
|
2015-01-07 14:59:41 +08:00
|
|
|
instance_eval File.read(file)
|
2015-01-10 16:30:56 +08:00
|
|
|
136
|
|
|
|
end
|