Feature #5638 » bundler-20111019-full-r7628.diff
| Gemfile | ||
|---|---|---|
|
source :rubygems
|
||
|
source :rubyforge
|
||
|
source :gemcutter
|
||
|
gem 'bundler', '~> 1.0.0'
|
||
|
gem 'rails', '2.3.11'
|
||
|
gem 'rack' , '~> 1.1.1'
|
||
|
gem 'i18n', '>= 0.4.2'
|
||
|
gem 'rubytree', '0.5.2', :require => 'tree'
|
||
|
# gem 'coderay', '~> 0.9.7'
|
||
|
gem 'coderay'
|
||
|
# Please uncomment lines for your databases.
|
||
|
# Alternatively you may want to add these lines to specific groups below.
|
||
|
# gem 'sqlite3-ruby', :require => 'sqlite3' # for SQLite 3
|
||
|
# gem 'mysql' # MySQL
|
||
|
# gem 'pg' # PostgreSQL
|
||
|
gem 'pg'
|
||
|
group :development do
|
||
|
end
|
||
|
group :production do
|
||
|
end
|
||
|
group :test do
|
||
|
gem 'shoulda'
|
||
|
gem 'mocha'
|
||
|
gem 'edavis10-object_daddy', :require => 'object_daddy'
|
||
|
end
|
||
|
# Load plugins Gemfiles
|
||
|
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file|
|
||
|
puts "Loading #{file} ..."
|
||
|
instance_eval File.read(file)
|
||
|
end
|
||
| config/boot.rb | ||
|---|---|---|
|
class Boot
|
||
|
def run
|
||
|
load_initializer
|
||
|
Rails::Initializer.class_eval do
|
||
|
def load_gems
|
||
|
@bundler_loaded ||= Bundler.require :default, Rails.env
|
||
|
end
|
||
|
end
|
||
|
Rails::Initializer.run(:set_load_path)
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
end
|
||
|
# TODO: Workaround for #7013 to be removed for 1.2.0
|
||
|
# Loads i18n 0.4.2 before Rails loads any more recent gem
|
||
|
# 0.5.0 is not compatible with the old interpolation syntax
|
||
|
# Plugins will have to migrate to the new syntax for 1.2.0
|
||
|
require 'rubygems'
|
||
|
begin
|
||
|
gem 'i18n', '0.4.2'
|
||
|
rescue Gem::LoadError => load_error
|
||
|
$stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`)
|
||
|
exit 1
|
||
|
end
|
||
|
# All that for this:
|
||
|
Rails.boot!
|
||
| config/environment.rb | ||
|---|---|---|
|
# It will automatically turn deliveries on
|
||
|
config.action_mailer.perform_deliveries = false
|
||
|
config.gem 'rubytree', :lib => 'tree'
|
||
|
config.gem 'coderay', :version => '~>1.0.0'
|
||
|
# Load any local configuration that is kept out of source control
|
||
|
# (e.g. gems, patches).
|
||
|
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
|
||
| config/preinitializer.rb | ||
|---|---|---|
|
begin
|
||
|
require "rubygems"
|
||
|
require "bundler"
|
||
|
rescue LoadError
|
||
|
raise "Could not load the bundler gem. Install it with `gem install bundler`."
|
||
|
end
|
||
|
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.25")
|
||
|
raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
|
||
|
"Run `gem install bundler` to upgrade."
|
||
|
end
|
||
|
begin
|
||
|
# Set up load paths for all bundled gems
|
||
|
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
|
||
|
Bundler.setup
|
||
|
rescue Bundler::GemNotFound
|
||
|
raise RuntimeError, "Bundler couldn't find some gems." +
|
||
|
"Did you run `bundle install`?"
|
||
|
end
|
||
| Gemfile | ||
|---|---|---|
|
source :rubyforge
|
||
|
source :gemcutter
|
||
|
gem "ruby-openid"
|
||
|
gem 'bundler', '~> 1.0.0'
|
||
|
gem 'rails', '2.3.11'
|
||
|
gem 'rack' , '~> 1.1.1'
|
||
| ... | ... | |
|
# gem 'coderay', '~> 0.9.7'
|
||
|
gem 'coderay'
|
||
|
# Please uncomment lines for your databases.
|
||
|
# Alternatively you may want to add these lines to specific groups below.
|
||
|
# gem 'sqlite3-ruby', :require => 'sqlite3' # for SQLite 3
|
||
|
# gem 'mysql' # MySQL
|
||
|
# gem 'pg' # PostgreSQL
|
||
|
gem 'pg'
|
||
|
group :development do
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
group :test do
|
||
|
gem 'shoulda'
|
||
|
gem 'shoulda', '~> 2.10.3'
|
||
|
gem 'mocha'
|
||
|
gem 'edavis10-object_daddy', :require => 'object_daddy'
|
||
|
end
|
||
|
# Use the commented pure ruby gems, if you have not the needed prerequisites on
|
||
|
# board to compile the native ones. Note, that their use is discouraged, since
|
||
|
# their integration is propbably not that well tested and their are slower in
|
||
|
# orders of magnitude compared to their native counterparts. You have been
|
||
|
# warned.
|
||
|
#
|
||
|
platforms :mri do
|
||
|
group :mysql do
|
||
|
gem "mysql"
|
||
|
# gem "ruby-mysql"
|
||
|
end
|
||
|
group :mysql2 do
|
||
|
gem "mysql2"
|
||
|
end
|
||
|
group :postgres do
|
||
|
gem "pg", "~> 0.9.0"
|
||
|
# gem "postgres-pr"
|
||
|
end
|
||
|
group :sqlite do
|
||
|
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
|
||
|
# please tell me, if you are fond of a pure ruby sqlite3 binding
|
||
|
end
|
||
|
end
|
||
|
platforms :jruby do
|
||
|
gem "jruby-openssl"
|
||
|
group :mysql do
|
||
|
gem "activerecord-jdbcmysql-adapter"
|
||
|
end
|
||
|
group :postgres do
|
||
|
gem "activerecord-jdbcpostgresql-adapter"
|
||
|
end
|
||
|
group :sqlite do
|
||
|
gem "activerecord-jdbcsqlite3-adapter"
|
||
|
end
|
||
|
end
|
||
|
# Load plugins Gemfiles
|
||
|
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file|
|
||
|
puts "Loading #{file} ..."
|
||
| config/boot.rb | ||
|---|---|---|
|
def run
|
||
|
load_initializer
|
||
|
# This block was added for bundler support while following setup
|
||
|
# instructions from http://gembundler.com/rails23.html
|
||
|
Rails::Initializer.class_eval do
|
||
|
def load_gems
|
||
|
@bundler_loaded ||= Bundler.require :default, Rails.env
|
||
| config/environments/test.rb | ||
|---|---|---|
|
# Skip protect_from_forgery in requests http://m.onkey.org/2007/9/28/csrf-protection-for-your-existing-rails-application
|
||
|
config.action_controller.allow_forgery_protection = false
|
||
|
config.gem "shoulda", :version => "~> 2.10.3"
|
||
|
config.gem "edavis10-object_daddy", :lib => "object_daddy"
|
||
|
config.gem "mocha"
|
||
| Gemfile | ||
|---|---|---|
|
source :rubyforge
|
||
|
source :gemcutter
|
||
|
gem "ruby-openid"
|
||
|
gem 'bundler', '~> 1.0.0'
|
||
|
gem 'rails', '2.3.11'
|
||
|
gem 'rack' , '~> 1.1.1'
|
||
| ... | ... | |
|
gem 'edavis10-object_daddy', :require => 'object_daddy'
|
||
|
end
|
||
|
group :openid do
|
||
|
gem "ruby-openid", '~> 2.1.4', :require => 'openid'
|
||
|
end
|
||
|
# Use the commented pure ruby gems, if you have not the needed prerequisites on
|
||
|
# board to compile the native ones. Note, that their use is discouraged, since
|
||
| Gemfile | ||
|---|---|---|
|
gem "ruby-openid", '~> 2.1.4', :require => 'openid'
|
||
|
end
|
||
|
group :rmagick do
|
||
|
gem "rmagick", "~> 1.15.17"
|
||
|
end
|
||
|
# Use the commented pure ruby gems, if you have not the needed prerequisites on
|
||
|
# board to compile the native ones. Note, that their use is discouraged, since
|
||
|
# their integration is propbably not that well tested and their are slower in
|
||
| Gemfile | ||
|---|---|---|
|
end
|
||
|
group :rmagick do
|
||
|
gem "rmagick", "~> 1.15.17"
|
||
|
platforms :mri_18 do gem "rmagick", "~> 1.15.17" end
|
||
|
## You cannot specify the same gem twice with different version requirements.
|
||
|
## You specified: rmagick (~> 1.15.17) and rmagick (>= 0)
|
||
|
## https://github.com/carlhuda/bundler/issues/751
|
||
|
# platforms :mri_19 do gem "rmagick" end
|
||
|
end
|
||
|
# Use the commented pure ruby gems, if you have not the needed prerequisites on
|
||
| Gemfile | ||
|---|---|---|
|
end
|
||
|
group :mysql2 do
|
||
|
gem "mysql2"
|
||
|
gem "mysql2", "~> 0.2.7"
|
||
|
end
|
||
|
group :postgres do
|
||
| Gemfile | ||
|---|---|---|
|
# Load plugins Gemfiles
|
||
|
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file|
|
||
|
puts "Loading #{file} ..."
|
||
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
||
|
instance_eval File.read(file)
|
||
|
end
|
||
| Gemfile | ||
|---|---|---|
|
gem 'shoulda', '~> 2.10.3'
|
||
|
gem 'mocha'
|
||
|
gem 'edavis10-object_daddy', :require => 'object_daddy'
|
||
|
# cannot install on mingw due to fail installing linecache with native extensions
|
||
|
platforms :mri_18 do gem 'ruby-debug' end
|
||
|
platforms :mri_19 do gem 'ruby-debug19', :require => 'ruby-debug' end
|
||
|
end
|
||
|
group :openid do
|
||
| Gemfile | ||
|---|---|---|
|
gem "pg", "~> 0.9.0"
|
||
|
# gem "postgres-pr"
|
||
|
end
|
||
|
end
|
||
|
platforms :mri_18 do
|
||
|
group :sqlite do
|
||
|
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
|
||
|
# please tell me, if you are fond of a pure ruby sqlite3 binding
|
||
|
end
|
||
|
end
|
||
|
platforms :mri_19 do
|
||
|
group :sqlite do
|
||
|
gem "sqlite3"
|
||
|
end
|
||
|
end
|
||
| Gemfile | ||
|---|---|---|
|
# orders of magnitude compared to their native counterparts. You have been
|
||
|
# warned.
|
||
|
#
|
||
|
platforms :mri do
|
||
|
platforms :mri, :mingw do
|
||
|
group :mysql do
|
||
|
gem "mysql"
|
||
|
# gem "ruby-mysql"
|
||
|
end
|
||
|
group :mysql2 do
|
||
|
gem "mysql2", "~> 0.2.7"
|
||
|
end
|
||
|
group :postgres do
|
||
|
gem "pg", "~> 0.9.0"
|
||
|
# gem "postgres-pr"
|
||
|
end
|
||
|
end
|
||
|
platforms :mri_18 do
|
||
|
platforms :mri_18, :mingw_18 do
|
||
|
group :sqlite do
|
||
|
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
|
||
|
end
|
||
|
end
|
||
|
platforms :mri_19 do
|
||
|
## Add Windows support
|
||
|
## https://github.com/brianmario/mysql2/issues/8
|
||
|
## Getting mysql2 gem to work with Ruby on Rails 3.0 and Windows 7 64bit
|
||
|
## http://paul-wong-jr.blogspot.com/2011/06/getting-mysql2-gem-to-work-with-ruby-on.html
|
||
|
group :mysql2 do
|
||
|
gem "mysql2", "~> 0.2.7"
|
||
|
end
|
||
|
group :sqlite do
|
||
|
gem "sqlite3"
|
||
|
end
|
||
| Gemfile | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
# Load a "local" Gemfile
|
||
|
gemfile_local = File.join(File.dirname(__FILE__), "Gemfile.local")
|
||
|
if File.readable?(gemfile_local)
|
||
|
puts "Loading #{gemfile_local} ..." if $DEBUG
|
||
|
instance_eval(File.read(gemfile_local))
|
||
|
end
|
||
|
# Load plugins Gemfiles
|
||
|
Dir.glob(File.join(File.dirname(__FILE__), %w(vendor plugins * Gemfile))) do |file|
|
||
|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
||
| Gemfile | ||
|---|---|---|
|
# gem 'coderay', '~> 0.9.7'
|
||
|
gem 'coderay'
|
||
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :jruby, :mingw_18]
|
||
|
group :development do
|
||
|
end
|
||