diff options
author | Alex Legler <alex@a3li.li> | 2011-08-10 21:38:43 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2011-08-10 21:38:43 +0200 |
commit | 0880687610adf35cc7fa9c2ffc05a79d663ea10c (patch) | |
tree | 711dc63a788490b3fe650f2a49aaa3906e5018c5 | |
parent | Bugzilla: Use HTTPS as well for reading bugs. (diff) | |
download | glsamaker-0880687610adf35cc7fa9c2ffc05a79d663ea10c.tar.gz glsamaker-0880687610adf35cc7fa9c2ffc05a79d663ea10c.tar.bz2 glsamaker-0880687610adf35cc7fa9c2ffc05a79d663ea10c.zip |
Update to rails 2.3.12 and use Bundler
-rw-r--r-- | Gemfile | 11 | ||||
-rw-r--r-- | Gemfile.lock | 61 | ||||
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | config/boot.rb | 8 | ||||
-rw-r--r-- | config/environment.rb | 2 | ||||
-rw-r--r-- | config/preinitializer.rb | 20 |
6 files changed, 100 insertions, 4 deletions
@@ -0,0 +1,11 @@ +source :rubygems + +gem "rails", "2.3.12" +gem "json" +gem "mechanize" +gem "fastercsv" +gem "diff-lcs", :require => "diff/lcs" +gem "nokogiri" +gem "ci_reporter" +gem "rspec" +gem "rdoc"
\ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..7489816 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,61 @@ +GEM + remote: http://rubygems.org/ + specs: + actionmailer (2.3.12) + actionpack (= 2.3.12) + actionpack (2.3.12) + activesupport (= 2.3.12) + rack (~> 1.1.0) + activerecord (2.3.12) + activesupport (= 2.3.12) + activeresource (2.3.12) + activesupport (= 2.3.12) + activesupport (2.3.12) + builder (3.0.0) + ci_reporter (1.6.5) + builder (>= 2.1.2) + diff-lcs (1.1.2) + fastercsv (1.5.4) + json (1.5.3) + mechanize (2.0.1) + net-http-digest_auth (~> 1.1, >= 1.1.1) + net-http-persistent (~> 1.8) + nokogiri (~> 1.4) + webrobots (~> 0.0, >= 0.0.9) + net-http-digest_auth (1.1.1) + net-http-persistent (1.8.1) + nokogiri (1.5.0) + rack (1.1.2) + rails (2.3.12) + actionmailer (= 2.3.12) + actionpack (= 2.3.12) + activerecord (= 2.3.12) + activeresource (= 2.3.12) + activesupport (= 2.3.12) + rake (>= 0.8.3) + rake (0.9.2) + rdoc (3.9.1) + rspec (2.6.0) + rspec-core (~> 2.6.0) + rspec-expectations (~> 2.6.0) + rspec-mocks (~> 2.6.0) + rspec-core (2.6.4) + rspec-expectations (2.6.0) + diff-lcs (~> 1.1.2) + rspec-mocks (2.6.0) + webrobots (0.0.10) + nokogiri (>= 1.4.4) + +PLATFORMS + ruby + +DEPENDENCIES + ci_reporter + diff-lcs + fastercsv + json + mechanize + nokogiri + rails (= 2.3.12) + rdoc + rspec @@ -5,7 +5,7 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' -require 'rake/rdoctask' +require 'rdoc/task' require 'tasks/rails' diff --git a/config/boot.rb b/config/boot.rb index dd5e3b6..6686664 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -62,8 +62,12 @@ module Rails gem 'rails' end rescue Gem::LoadError => load_error - $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) - exit 1 + if load_error.message =~ /Could not find RubyGem rails/ + STDERR.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) + exit 1 + else + raise + end end class << self diff --git a/config/environment.rb b/config/environment.rb index 4921ac7..e416e83 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.12' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') diff --git a/config/preinitializer.rb b/config/preinitializer.rb new file mode 100644 index 0000000..85399f7 --- /dev/null +++ b/config/preinitializer.rb @@ -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
\ No newline at end of file |