Feature #5638 » bundler-20111019-full-r7628.diff
Gemfile | ||
---|---|---|
1 |
source :rubygems |
|
2 |
source :rubyforge |
|
3 |
source :gemcutter |
|
4 | ||
5 |
gem 'bundler', '~> 1.0.0' |
|
6 |
gem 'rails', '2.3.11' |
|
7 |
gem 'rack' , '~> 1.1.1' |
|
8 |
gem 'i18n', '>= 0.4.2' |
|
9 |
gem 'rubytree', '0.5.2', :require => 'tree' |
|
10 |
# gem 'coderay', '~> 0.9.7' |
|
11 |
gem 'coderay' |
|
12 | ||
13 |
# Please uncomment lines for your databases. |
|
14 |
# Alternatively you may want to add these lines to specific groups below. |
|
15 |
# gem 'sqlite3-ruby', :require => 'sqlite3' # for SQLite 3 |
|
16 |
# gem 'mysql' # MySQL |
|
17 |
# gem 'pg' # PostgreSQL |
|
18 |
gem 'pg' |
|
19 | ||
20 |
group :development do |
|
21 |
end |
|
22 | ||
23 |
group :production do |
|
24 |
end |
|
25 | ||
26 |
group :test do |
|
27 |
gem 'shoulda' |
|
28 |
gem 'mocha' |
|
29 |
gem 'edavis10-object_daddy', :require => 'object_daddy' |
|
30 |
end |
|
31 | ||
32 |
# Load plugins Gemfiles |
|
33 |
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file| |
|
34 |
puts "Loading #{file} ..." |
|
35 |
instance_eval File.read(file) |
|
36 |
end |
config/boot.rb | ||
---|---|---|
41 | 41 |
class Boot |
42 | 42 |
def run |
43 | 43 |
load_initializer |
44 | ||
45 |
Rails::Initializer.class_eval do |
|
46 |
def load_gems |
|
47 |
@bundler_loaded ||= Bundler.require :default, Rails.env |
|
48 |
end |
|
49 |
end |
|
50 | ||
44 | 51 |
Rails::Initializer.run(:set_load_path) |
45 | 52 |
end |
46 | 53 |
end |
... | ... | |
111 | 118 |
end |
112 | 119 |
end |
113 | 120 | |
114 |
# TODO: Workaround for #7013 to be removed for 1.2.0 |
|
115 |
# Loads i18n 0.4.2 before Rails loads any more recent gem |
|
116 |
# 0.5.0 is not compatible with the old interpolation syntax |
|
117 |
# Plugins will have to migrate to the new syntax for 1.2.0 |
|
118 |
require 'rubygems' |
|
119 |
begin |
|
120 |
gem 'i18n', '0.4.2' |
|
121 |
rescue Gem::LoadError => load_error |
|
122 |
$stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`) |
|
123 |
exit 1 |
|
124 |
end |
|
125 | ||
126 | 121 |
# All that for this: |
127 | 122 |
Rails.boot! |
config/environment.rb | ||
---|---|---|
54 | 54 |
# It will automatically turn deliveries on |
55 | 55 |
config.action_mailer.perform_deliveries = false |
56 | 56 | |
57 |
config.gem 'rubytree', :lib => 'tree' |
|
58 |
config.gem 'coderay', :version => '~>1.0.0' |
|
59 | ||
60 | 57 |
# Load any local configuration that is kept out of source control |
61 | 58 |
# (e.g. gems, patches). |
62 | 59 |
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) |
config/preinitializer.rb | ||
---|---|---|
1 |
begin |
|
2 |
require "rubygems" |
|
3 |
require "bundler" |
|
4 |
rescue LoadError |
|
5 |
raise "Could not load the bundler gem. Install it with `gem install bundler`." |
|
6 |
end |
|
7 | ||
8 |
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.25") |
|
9 |
raise RuntimeError, "Your bundler version is too old for Rails 2.3." + |
|
10 |
"Run `gem install bundler` to upgrade." |
|
11 |
end |
|
12 | ||
13 |
begin |
|
14 |
# Set up load paths for all bundled gems |
|
15 |
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) |
|
16 |
Bundler.setup |
|
17 |
rescue Bundler::GemNotFound |
|
18 |
raise RuntimeError, "Bundler couldn't find some gems." + |
|
19 |
"Did you run `bundle install`?" |
|
20 |
end |
Gemfile | ||
---|---|---|
2 | 2 |
source :rubyforge |
3 | 3 |
source :gemcutter |
4 | 4 | |
5 |
gem "ruby-openid" |
|
5 | 6 |
gem 'bundler', '~> 1.0.0' |
6 | 7 |
gem 'rails', '2.3.11' |
7 | 8 |
gem 'rack' , '~> 1.1.1' |
... | ... | |
10 | 11 |
# gem 'coderay', '~> 0.9.7' |
11 | 12 |
gem 'coderay' |
12 | 13 | |
13 |
# Please uncomment lines for your databases. |
|
14 |
# Alternatively you may want to add these lines to specific groups below. |
|
15 |
# gem 'sqlite3-ruby', :require => 'sqlite3' # for SQLite 3 |
|
16 |
# gem 'mysql' # MySQL |
|
17 |
# gem 'pg' # PostgreSQL |
|
18 |
gem 'pg' |
|
19 | ||
20 | 14 |
group :development do |
21 | 15 |
end |
22 | 16 | |
... | ... | |
24 | 18 |
end |
25 | 19 | |
26 | 20 |
group :test do |
27 |
gem 'shoulda' |
|
21 |
gem 'shoulda', '~> 2.10.3'
|
|
28 | 22 |
gem 'mocha' |
29 | 23 |
gem 'edavis10-object_daddy', :require => 'object_daddy' |
30 | 24 |
end |
31 | 25 | |
26 | ||
27 |
# Use the commented pure ruby gems, if you have not the needed prerequisites on |
|
28 |
# board to compile the native ones. Note, that their use is discouraged, since |
|
29 |
# their integration is propbably not that well tested and their are slower in |
|
30 |
# orders of magnitude compared to their native counterparts. You have been |
|
31 |
# warned. |
|
32 |
# |
|
33 |
platforms :mri do |
|
34 |
group :mysql do |
|
35 |
gem "mysql" |
|
36 |
# gem "ruby-mysql" |
|
37 |
end |
|
38 | ||
39 |
group :mysql2 do |
|
40 |
gem "mysql2" |
|
41 |
end |
|
42 | ||
43 |
group :postgres do |
|
44 |
gem "pg", "~> 0.9.0" |
|
45 |
# gem "postgres-pr" |
|
46 |
end |
|
47 | ||
48 |
group :sqlite do |
|
49 |
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3" |
|
50 |
# please tell me, if you are fond of a pure ruby sqlite3 binding |
|
51 |
end |
|
52 |
end |
|
53 | ||
54 |
platforms :jruby do |
|
55 |
gem "jruby-openssl" |
|
56 | ||
57 |
group :mysql do |
|
58 |
gem "activerecord-jdbcmysql-adapter" |
|
59 |
end |
|
60 | ||
61 |
group :postgres do |
|
62 |
gem "activerecord-jdbcpostgresql-adapter" |
|
63 |
end |
|
64 | ||
65 |
group :sqlite do |
|
66 |
gem "activerecord-jdbcsqlite3-adapter" |
|
67 |
end |
|
68 |
end |
|
69 | ||
32 | 70 |
# Load plugins Gemfiles |
33 | 71 |
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file| |
34 | 72 |
puts "Loading #{file} ..." |
config/boot.rb | ||
---|---|---|
42 | 42 |
def run |
43 | 43 |
load_initializer |
44 | 44 | |
45 |
# This block was added for bundler support while following setup |
|
46 |
# instructions from http://gembundler.com/rails23.html |
|
45 | 47 |
Rails::Initializer.class_eval do |
46 | 48 |
def load_gems |
47 | 49 |
@bundler_loaded ||= Bundler.require :default, Rails.env |
config/environments/test.rb | ||
---|---|---|
23 | 23 | |
24 | 24 |
# Skip protect_from_forgery in requests http://m.onkey.org/2007/9/28/csrf-protection-for-your-existing-rails-application |
25 | 25 |
config.action_controller.allow_forgery_protection = false |
26 | ||
27 |
config.gem "shoulda", :version => "~> 2.10.3" |
|
28 |
config.gem "edavis10-object_daddy", :lib => "object_daddy" |
|
29 |
config.gem "mocha" |
Gemfile | ||
---|---|---|
2 | 2 |
source :rubyforge |
3 | 3 |
source :gemcutter |
4 | 4 | |
5 |
gem "ruby-openid" |
|
6 | 5 |
gem 'bundler', '~> 1.0.0' |
7 | 6 |
gem 'rails', '2.3.11' |
8 | 7 |
gem 'rack' , '~> 1.1.1' |
... | ... | |
23 | 22 |
gem 'edavis10-object_daddy', :require => 'object_daddy' |
24 | 23 |
end |
25 | 24 | |
25 |
group :openid do |
|
26 |
gem "ruby-openid", '~> 2.1.4', :require => 'openid' |
|
27 |
end |
|
26 | 28 | |
27 | 29 |
# Use the commented pure ruby gems, if you have not the needed prerequisites on |
28 | 30 |
# board to compile the native ones. Note, that their use is discouraged, since |
Gemfile | ||
---|---|---|
26 | 26 |
gem "ruby-openid", '~> 2.1.4', :require => 'openid' |
27 | 27 |
end |
28 | 28 | |
29 |
group :rmagick do |
|
30 |
gem "rmagick", "~> 1.15.17" |
|
31 |
end |
|
32 | ||
29 | 33 |
# Use the commented pure ruby gems, if you have not the needed prerequisites on |
30 | 34 |
# board to compile the native ones. Note, that their use is discouraged, since |
31 | 35 |
# their integration is propbably not that well tested and their are slower in |
Gemfile | ||
---|---|---|
27 | 27 |
end |
28 | 28 | |
29 | 29 |
group :rmagick do |
30 |
gem "rmagick", "~> 1.15.17" |
|
30 |
platforms :mri_18 do gem "rmagick", "~> 1.15.17" end |
|
31 |
## You cannot specify the same gem twice with different version requirements. |
|
32 |
## You specified: rmagick (~> 1.15.17) and rmagick (>= 0) |
|
33 |
## https://github.com/carlhuda/bundler/issues/751 |
|
34 |
# platforms :mri_19 do gem "rmagick" end |
|
31 | 35 |
end |
32 | 36 | |
33 | 37 |
# Use the commented pure ruby gems, if you have not the needed prerequisites on |
Gemfile | ||
---|---|---|
47 | 47 |
end |
48 | 48 | |
49 | 49 |
group :mysql2 do |
50 |
gem "mysql2" |
|
50 |
gem "mysql2", "~> 0.2.7"
|
|
51 | 51 |
end |
52 | 52 | |
53 | 53 |
group :postgres do |
Gemfile | ||
---|---|---|
79 | 79 | |
80 | 80 |
# Load plugins Gemfiles |
81 | 81 |
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file| |
82 |
puts "Loading #{file} ..." |
|
82 |
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
|
83 | 83 |
instance_eval File.read(file) |
84 | 84 |
end |
Gemfile | ||
---|---|---|
20 | 20 |
gem 'shoulda', '~> 2.10.3' |
21 | 21 |
gem 'mocha' |
22 | 22 |
gem 'edavis10-object_daddy', :require => 'object_daddy' |
23 | ||
24 |
# cannot install on mingw due to fail installing linecache with native extensions |
|
25 |
platforms :mri_18 do gem 'ruby-debug' end |
|
26 |
platforms :mri_19 do gem 'ruby-debug19', :require => 'ruby-debug' end |
|
23 | 27 |
end |
24 | 28 | |
25 | 29 |
group :openid do |
Gemfile | ||
---|---|---|
58 | 58 |
gem "pg", "~> 0.9.0" |
59 | 59 |
# gem "postgres-pr" |
60 | 60 |
end |
61 |
end |
|
61 | 62 | |
63 |
platforms :mri_18 do |
|
62 | 64 |
group :sqlite do |
63 | 65 |
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3" |
64 |
# please tell me, if you are fond of a pure ruby sqlite3 binding |
|
66 |
end |
|
67 |
end |
|
68 | ||
69 |
platforms :mri_19 do |
|
70 |
group :sqlite do |
|
71 |
gem "sqlite3" |
|
65 | 72 |
end |
66 | 73 |
end |
67 | 74 |
Gemfile | ||
---|---|---|
44 | 44 |
# orders of magnitude compared to their native counterparts. You have been |
45 | 45 |
# warned. |
46 | 46 |
# |
47 |
platforms :mri do |
|
47 |
platforms :mri, :mingw do
|
|
48 | 48 |
group :mysql do |
49 | 49 |
gem "mysql" |
50 | 50 |
# gem "ruby-mysql" |
51 | 51 |
end |
52 | 52 | |
53 |
group :mysql2 do |
|
54 |
gem "mysql2", "~> 0.2.7" |
|
55 |
end |
|
56 | ||
57 | 53 |
group :postgres do |
58 | 54 |
gem "pg", "~> 0.9.0" |
59 | 55 |
# gem "postgres-pr" |
60 | 56 |
end |
61 | 57 |
end |
62 | 58 | |
63 |
platforms :mri_18 do |
|
59 |
platforms :mri_18, :mingw_18 do
|
|
64 | 60 |
group :sqlite do |
65 | 61 |
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3" |
66 | 62 |
end |
67 | 63 |
end |
68 | 64 | |
69 | 65 |
platforms :mri_19 do |
66 |
## Add Windows support |
|
67 |
## https://github.com/brianmario/mysql2/issues/8 |
|
68 |
## Getting mysql2 gem to work with Ruby on Rails 3.0 and Windows 7 64bit |
|
69 |
## http://paul-wong-jr.blogspot.com/2011/06/getting-mysql2-gem-to-work-with-ruby-on.html |
|
70 |
group :mysql2 do |
|
71 |
gem "mysql2", "~> 0.2.7" |
|
72 |
end |
|
73 | ||
70 | 74 |
group :sqlite do |
71 | 75 |
gem "sqlite3" |
72 | 76 |
end |
Gemfile | ||
---|---|---|
92 | 92 |
end |
93 | 93 |
end |
94 | 94 | |
95 |
# Load a "local" Gemfile |
|
96 |
gemfile_local = File.join(File.dirname(__FILE__), "Gemfile.local") |
|
97 |
if File.readable?(gemfile_local) |
|
98 |
puts "Loading #{gemfile_local} ..." if $DEBUG |
|
99 |
instance_eval(File.read(gemfile_local)) |
|
100 |
end |
|
101 | ||
95 | 102 |
# Load plugins Gemfiles |
96 | 103 |
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file| |
97 | 104 |
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` |
Gemfile | ||
---|---|---|
10 | 10 |
# gem 'coderay', '~> 0.9.7' |
11 | 11 |
gem 'coderay' |
12 | 12 | |
13 |
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :jruby, :mingw_18] |
|
14 | ||
13 | 15 |
group :development do |
14 | 16 |
end |
15 | 17 |