Skip to content

Commit

Permalink
Merge jpmckinney/bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbacon committed Feb 15, 2012
1 parent 506af7a commit dcc312a
Show file tree
Hide file tree
Showing 1,947 changed files with 128 additions and 173,116 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "commonlib"]
path = commonlib
url = git://git.mysociety.org/commonlib
[submodule "vendor/rails"]
path = vendor/rails
url = git://github.com/rails/rails.git
[submodule "vendor/rails-locales"]
path = vendor/rails-locales
url = git://github.com/svenfuchs/rails-i18n.git
26 changes: 26 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
source :rubygems

gem 'rails', '2.3.14'
gem 'pg'

gem 'fast_gettext', '>= 0.6.0'
gem 'gettext', '>= 1.9.3'
gem 'json', '~> 1.5.1'
gem 'mahoro'
gem 'memcache-client', :require => 'memcache'
gem 'locale', '>= 2.0.5'
gem 'rack', '~> 1.1.0'
gem 'rdoc', '~> 2.4.3'
gem 'recaptcha', '~> 0.3.1', :require => 'recaptcha/rails'
# :require avoids "already initialized constant" warnings
gem 'rmagick', :require => 'RMagick'
gem 'routing-filter', '~> 0.2.4'
gem 'rspec', '~> 1.3.2'
gem 'rspec-rails', '~> 1.3.4'
gem 'ruby-msg', '~> 1.5.0'
gem 'test-unit', '~> 1.2.3' if RUBY_VERSION.to_f >= 1.9
gem 'vpim'
gem 'will_paginate', '~> 2.3.11'
gem 'xapian-full'
gem 'xml-simple'
gem 'zip'
74 changes: 74 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.14)
actionpack (= 2.3.14)
actionpack (2.3.14)
activesupport (= 2.3.14)
rack (~> 1.1.0)
activerecord (2.3.14)
activesupport (= 2.3.14)
activeresource (2.3.14)
activesupport (= 2.3.14)
activesupport (2.3.14)
fast_gettext (0.6.1)
gettext (2.1.0)
locale (>= 2.0.5)
json (1.5.4)
locale (2.0.5)
mahoro (0.3)
memcache-client (1.8.5)
pg (0.11.0)
rack (1.1.0)
rails (2.3.14)
actionmailer (= 2.3.14)
actionpack (= 2.3.14)
activerecord (= 2.3.14)
activeresource (= 2.3.14)
activesupport (= 2.3.14)
rake (>= 0.8.3)
rake (0.9.2)
rdoc (2.4.3)
recaptcha (0.3.1)
rmagick (2.13.1)
routing-filter (0.2.4)
actionpack
rspec (1.3.2)
rspec-rails (1.3.4)
rack (>= 1.0.0)
rspec (~> 1.3.1)
ruby-msg (1.5.0)
ruby-ole (>= 1.2.8)
vpim (>= 0.360)
ruby-ole (1.2.11.2)
vpim (0.695)
will_paginate (2.3.16)
xapian-full (1.2.3)
xml-simple (1.1.0)
zip (2.0.2)

PLATFORMS
ruby

DEPENDENCIES
fast_gettext (>= 0.6.0)
gettext (>= 1.9.3)
json (~> 1.5.1)
locale (>= 2.0.5)
mahoro
memcache-client
pg
rack (~> 1.1.0)
rails (= 2.3.14)
rdoc (~> 2.4.3)
recaptcha (~> 0.3.1)
rmagick
routing-filter (~> 0.2.4)
rspec (~> 1.3.2)
rspec-rails (~> 1.3.4)
ruby-msg (~> 1.5.0)
vpim
will_paginate (~> 2.3.11)
xapian-full
xml-simple
zip
2 changes: 0 additions & 2 deletions app/models/profile_photo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#
# $Id: profile_photo.rb,v 1.2 2009-09-17 21:10:05 francis Exp $
#
require 'mahoro'
require 'RMagick'

class ProfilePhoto < ActiveRecord::Base
WIDTH = 96
Expand Down
7 changes: 7 additions & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ def preinitializer_path
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
Expand Down
14 changes: 0 additions & 14 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
# (type "git submodule update --init" in the whatdotheyknow directory)

# ruby-ole and ruby-msg. We use a custom ruby-msg to avoid a name conflict
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-ole/lib'))
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-msg/lib'))
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/plugins/globalize2/lib'))

require 'memcache'

load "validate.rb"
load "config.rb"
load "format.rb"
Expand Down Expand Up @@ -61,16 +57,6 @@
# config.log_level = :debug
#
# Specify gems that this application depends on and have them installed with rake gems:install
config.gem "locale", :version => '>=2.0.5'
config.gem "gettext", :version => '>=1.9.3'
config.gem "fast_gettext", :version => '>=0.4.8'
config.gem "rack", :version => '1.1.0'
config.gem "rdoc", :version => '>=2.4.3'
config.gem "recaptcha", :lib => "recaptcha/rails"
config.gem 'rspec', :lib => false, :version => '1.3.1'
config.gem 'rspec-rails', :lib => false, :version => '1.3.3'
config.gem 'routing-filter'
config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'
#GettextI18nRails.translations_are_html_safe = true

# Use SQL instead of Active Record's schema dumper when creating the test database.
Expand Down
20 changes: 20 additions & 0 deletions config/preinitializer.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions lib/alaveteli_file_types.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'mahoro'

class AlaveteliFileTypes
# To add an image, create a file with appropriate name corresponding to the
# mime type in public/images e.g. icon_image_tiff_large.png
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/rspec.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
rspec_gem_dir = nil
Dir["#{RAILS_ROOT}/vendor/gems/*"].each do |subdir|
rspec_gem_dir = subdir if subdir.gsub("#{RAILS_ROOT}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb")
Expand Down
8 changes: 1 addition & 7 deletions script/handle-mail-replies
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ load "config.rb"
MySociety::Config.set_file(File.join($alaveteli_dir, 'config', 'general'), true)
MySociety::Config.load_default

require 'rubygems'
if File.exist? File.join($alaveteli_dir,'vendor','rails','Rakefile')
$:.push(File.join($alaveteli_dir, "vendor", "rails", "actionmailer", "lib", "action_mailer", "vendor", "tmail-1.2.7"))
require 'tmail'
else
require 'action_mailer'
end
require 'action_mailer'

def main(in_test_mode)
Dir.chdir($alaveteli_dir) do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/public_body_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

require 'json'

describe PublicBodyController, "when showing a body" do
integrate_views

Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/request_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

require 'json'

describe RequestController, "when listing recent requests" do

before(:each) do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/track_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

require 'json'

describe TrackController, "when making a new track on a request" do
before do
@ir = mock_model(InfoRequest, :url_title => 'myrequest',
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/user_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# coding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

require 'json'

# XXX Use route_for or params_from to check /c/ links better
# http://rspec.rubyforge.org/rspec-rails/1.1.12/classes/Spec/Rails/Example/ControllerExampleGroup.html

Expand Down
1 change: 0 additions & 1 deletion vendor/actionmailer

This file was deleted.

1 change: 0 additions & 1 deletion vendor/actionpack

This file was deleted.

1 change: 0 additions & 1 deletion vendor/activerecord

This file was deleted.

1 change: 0 additions & 1 deletion vendor/activeresource

This file was deleted.

1 change: 0 additions & 1 deletion vendor/activesupport

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/gems/fast_gettext-0.5.10/.gitignore

This file was deleted.

Loading

0 comments on commit dcc312a

Please sign in to comment.