Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert to use Bundler

  • Loading branch information...
commit c7bcc9fe9e4eb54a6971b6f7626964d743940421 1 parent 1c2f4bf
Chris Flipse authored
1  .gitignore
View
@@ -9,3 +9,4 @@ db/*.sqlite2
db/*.sqlite3
db/*.db
public/javascripts/beast.js
+.bundle
17 Gemfile
View
@@ -0,0 +1,17 @@
+# A sample Gemfile
+source "http://rubygems.org"
+
+gem "rails", "2.3.3"
+gem 'ruby-openid', '>= 2.0.4', :require => "openid"
+gem 'mysql'
+gem 'sqlite3-ruby', :require => "sqlite3"
+gem 'will_paginate'
+gem 'bluecloth'
+gem 'RedCloth', :require => "redcloth"
+
+group :development do
+end
+
+group :test do
+ gem 'rspec-rails', '1.2.4', :require => 'spec/rails'
+end
45 Gemfile.lock
View
@@ -0,0 +1,45 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ RedCloth (4.2.3)
+ actionmailer (2.3.3)
+ actionpack (= 2.3.3)
+ actionpack (2.3.3)
+ activesupport (= 2.3.3)
+ rack (~> 1.0.0)
+ activerecord (2.3.3)
+ activesupport (= 2.3.3)
+ activeresource (2.3.3)
+ activesupport (= 2.3.3)
+ activesupport (2.3.3)
+ bluecloth (2.0.9)
+ mysql (2.8.1)
+ rack (1.0.1)
+ rails (2.3.3)
+ actionmailer (= 2.3.3)
+ actionpack (= 2.3.3)
+ activerecord (= 2.3.3)
+ activeresource (= 2.3.3)
+ activesupport (= 2.3.3)
+ rake (>= 0.8.3)
+ rake (0.8.7)
+ rspec (1.2.4)
+ rspec-rails (1.2.4)
+ rack (>= 0.4.0)
+ rspec (= 1.2.4)
+ ruby-openid (2.1.8)
+ sqlite3-ruby (1.3.1)
+ will_paginate (2.3.15)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ RedCloth
+ bluecloth
+ mysql
+ rails (= 2.3.3)
+ rspec-rails (= 1.2.4)
+ ruby-openid (>= 2.0.4)
+ sqlite3-ruby
+ will_paginate
14 config/boot.rb
View
@@ -105,5 +105,19 @@ def read_environment_rb
end
end
+class Rails::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
+
# All that for this:
Rails.boot!
8 config/environment.rb
View
@@ -16,14 +16,6 @@
# -- all .rb files in that directory are automatically loaded.
# See Rails::Configuration for more options.
- config.gem 'mislav-will_paginate', :lib => "will_paginate",
- :source => "http://gems.github.com"
-
- config.gem "bluecloth"
-
- config.gem 'RedCloth', :lib => "redcloth",
- :source => "http://code.whytheluckystiff.net"
-
# Skip frameworks you're not going to use (only works if using vendor/rails).
# To use Rails without a database, you must remove the Active Record framework
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
3  config/environments/test.rb
View
@@ -20,6 +20,3 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
-
-config.gem 'rspec', :lib => 'spec', :version => "1.2.4"
-config.gem 'rspec-rails', :lib => 'spec/rails', :version => "1.2.4"
20 config/preinitializer.rb
View
@@ -0,0 +1,20 @@
+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.24")
+ 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
Please sign in to comment.
Something went wrong with that request. Please try again.