Permalink
Browse files

Merge branch 'enhancement_306_bundler_support' of github.com:ctoynbee…

…/kete into enhancement_306_bundler_support

Conflicts:
	Gemfile
	Gemfile.lock

Signed-off-by: Chris Toynbee <ctoynbee@gmail.com>
  • Loading branch information...
2 parents 586a951 + b497d98 commit b74f649db40995a283593948b57bae0a608047cb @ctoynbee ctoynbee committed Feb 10, 2012
View
@@ -29,5 +29,6 @@ public/video/
tmp/*
webrat-*.html
zebradb/conf/kete-zebra-servers.xml
+zebradb/keteaccess
selenium-rc-server.pid
selenium-web-server.pid
View
0 Gemfile 100755 → 100644
No changes.
View
4 Gemfile.lock 100755 → 100644
@@ -18,7 +18,6 @@ GEM
chronic (0.6.6)
curb (0.8.0)
daemon_controller (0.2.6)
- factory_girl (1.2.3)
fastthread (1.0.7)
feedzirra (0.0.23)
activesupport (>= 2.0.0)
@@ -63,7 +62,6 @@ GEM
rmagick (2.12.2)
sax-machine (0.1.0)
nokogiri (> 0.0.0)
- shoulda (2.11.3)
tiny_mce (0.1.8)
tiny_mce_plugin_imageselector (0.0.7)
unicode (0.4.0)
@@ -78,7 +76,6 @@ DEPENDENCIES
RedCloth
avatar
chronic
- factory_girl (= 1.2.3)
feedzirra
gmaps4rails
hpricot
@@ -96,7 +93,6 @@ DEPENDENCIES
rails (= 2.3.5)
rake (= 0.8.7)
rmagick (= 2.12.2)
- shoulda (= 2.11.3)
tiny_mce
tiny_mce_plugin_imageselector
unicode
View
@@ -106,5 +106,21 @@ def read_environment_rb
end
end
+#Needed for bundler
+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!
View
@@ -45,22 +45,8 @@
# config.gem "sqlite3-ruby", :lib => "sqlite3"
# config.gem "aws-s3", :lib => "aws/s3"
- # Walter McGinnis, 2008-07-02
- # we currently use a hacked version of oai gem
- # and place it under vendor/gems
- # specifying it here allows this to work
- config.gem "oai"
-
- # Walter McGinnis, 2011-02-15
- # because this is a Rails engine gem
- # it needs to be declared here as well as config/required_software.rb
- config.gem "oembed_provider"
-
- config.gem "tiny_mce"
- config.gem "tiny_mce_plugin_imageselector"
-
- config.gem "gmaps4rails"
-
+ #Gems moved to Gemfile
+
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
@@ -74,7 +74,7 @@
# Select which send_file method to use to send private files to a browser from a Kete instance.
# Valid values are "", "nginx", or "apache".
-SENDFILE_METHOD = ""
+SENDFILE_METHOD = "apache"
View
@@ -0,0 +1,22 @@
+#Used by Bundler
+
+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
@@ -59,6 +59,8 @@ def bootstrap_zebra_with_initial_records(prime_records = false)
silence_stream(STDERR) do
silence_stream(STDOUT) do
Rake::Task['zebra:stop'].execute(ENV) if zebra_running?('public') || zebra_running?('private')
+ ENV['ZEBRA_PASSWORD'] = 'k3t3r0ck5'
+ Rake::Task['zebra:set_keteaccess'].execute(ENV)
ENV['ZEBRA_DB'] = 'public'
Rake::Task['zebra:init'].execute(ENV)
ENV['ZEBRA_DB'] = 'private'
View
@@ -1,3 +1,4 @@
+require File.expand_path(File.dirname(__FILE__) + "/common_test_methods")
# When you make a factory, make a corresponding create_new_xxxxx tasks which
# checks if it exists (if nessessary) and return existing one if so, or make
# a new one, assert it's a kind_of class we want, and return that
View
@@ -1 +0,0 @@
-kete:k3t3r0ck5

0 comments on commit b74f649

Please sign in to comment.