aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-04-17 11:56:14 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-04-17 11:56:14 +0100
commita55cb26013e20459323c19af81316e331ae62842 (patch)
tree3f4c4220bf49140c1047d2e831cd4cb4dfbe41e7
parent46a84b14bbee61ae7699f9dddd420b978222ff2b (diff)
Update scripts and documentation to use `bundle exec` where appropriate
-rw-r--r--doc/CHANGES.md15
-rw-r--r--doc/INSTALL-vagrant.md2
-rw-r--r--doc/INSTALL.md2
-rwxr-xr-xscript/generate_pot.sh4
-rwxr-xr-xscript/load-sample-data3
-rwxr-xr-xscript/rails-post-deploy6
-rwxr-xr-xscript/rebuild-xapian-index2
-rwxr-xr-xscript/spec1
-rwxr-xr-xscript/spec-all-pairs2
-rwxr-xr-xscript/test-run2
-rwxr-xr-xscript/update-xapian-index6
11 files changed, 24 insertions, 21 deletions
diff --git a/doc/CHANGES.md b/doc/CHANGES.md
index 51da903b1..8aff3782f 100644
--- a/doc/CHANGES.md
+++ b/doc/CHANGES.md
@@ -6,14 +6,17 @@
## Upgrade notes
-* Existing installations will need to install the Bundler gem. See
- `INSTALL.md` for details.
+* You should set aside a while to do this upgrade, as it will require
+ some manual intervention and a wait while dependencies compile:
-* Because dependencies are now handled by Bundler, when you next run
- the `rails-post-deploy` script, it will download, compile and
- install various things. Part of this is compiling xapian, which may
- take a *long* time (subsequent deployments should be much faster)
+ * Existing installations will need to install the Bundler gem. See
+ `INSTALL.md` for details.
+ * Because dependencies are now handled by Bundler, when you next run
+ the `rails-post-deploy` script, it will download, compile and
+ install various things. Part of this is compiling xapian, which may
+ take a *long* time (subsequent deployments should be much faster)
+
# Version 0.5.1
## Highlighted features
diff --git a/doc/INSTALL-vagrant.md b/doc/INSTALL-vagrant.md
index 35561f4a7..787a29d01 100644
--- a/doc/INSTALL-vagrant.md
+++ b/doc/INSTALL-vagrant.md
@@ -44,7 +44,7 @@ shared folders.
### Run the tests
- rake
+ bundle exec rake spec
### Start the development server
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
index c8758472b..2ed75cabd 100644
--- a/doc/INSTALL.md
+++ b/doc/INSTALL.md
@@ -269,7 +269,7 @@ component so you should really try to get this working.
Make sure everything looks OK:
- rake spec
+ bundle exec rake spec
If there are failures here, something has gone wrong with the
preceding steps (see the next section for a common problem and
diff --git a/script/generate_pot.sh b/script/generate_pot.sh
index f6c82dda7..c0540c3d9 100755
--- a/script/generate_pot.sh
+++ b/script/generate_pot.sh
@@ -10,8 +10,8 @@ git status | grep app.po | awk '{print $3}' | xargs git add
git commit -m "Backup latest po files from Transifex"
# now regenerate POT and PO files from Alaveteli source
-rake gettext:store_model_attributes
-rake gettext:findpot
+bundle exec rake gettext:store_model_attributes
+bundle exec rake gettext:findpot
# upload the result to Transifex
tx push -t
diff --git a/script/load-sample-data b/script/load-sample-data
index e5f1be4cd..fc5cbeed1 100755
--- a/script/load-sample-data
+++ b/script/load-sample-data
@@ -5,8 +5,7 @@
# have a filesystem representation of their contents
LOC=`dirname "$0"`
-
-rake --silent spec:db:fixtures:load
+bundle exec rake --silent spec:db:fixtures:load
"$LOC/runner" /dev/stdin <<END
env = ENV["RAILS_ENV"]
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index 6e2c88d28..5b9bd8014 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -76,9 +76,9 @@ fi
if [ "$OPTION_STAGING_SITE" = "0" ]
then
- bundle install --without development:test --deployment
+ bundle exec bundle install --without development:test --deployment --binstubs
else
- bundle install
+ bundle exec bundle install --binstubs
fi
if [ -n "$OPTION_THEME_URL" ]
@@ -87,6 +87,6 @@ then
fi
# upgrade database
-rake db:migrate #--trace
+bundle exec rake db:migrate #--trace
diff --git a/script/rebuild-xapian-index b/script/rebuild-xapian-index
index 5986f5259..3012511de 100755
--- a/script/rebuild-xapian-index
+++ b/script/rebuild-xapian-index
@@ -1,4 +1,4 @@
#!/bin/bash
cd `dirname $0`
-rake --silent "$@" xapian:rebuild_index models="PublicBody User InfoRequestEvent"
+bundle exec rake --silent "$@" xapian:rebuild_index models="PublicBody User InfoRequestEvent"
diff --git a/script/spec b/script/spec
index 46fdbe6e4..c967e2a83 100755
--- a/script/spec
+++ b/script/spec
@@ -6,5 +6,6 @@ else
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
end
+Rails.preinitialize # load bundler
require 'spec/autorun'
exit ::Spec::Runner::CommandLine.run
diff --git a/script/spec-all-pairs b/script/spec-all-pairs
index 5b6439a4e..6d7bb17c4 100755
--- a/script/spec-all-pairs
+++ b/script/spec-all-pairs
@@ -6,7 +6,7 @@
log_file=/dev/null
test_pair () {
- rake db:test:prepare > /dev/null 2>&1
+ bundle exec rake db:test:prepare > /dev/null 2>&1
output=$(script/spec "$1" "$2" 2>&1)
if [ $? -eq 0 ]
then
diff --git a/script/test-run b/script/test-run
index 4c7a0e3ec..7810b57d5 100755
--- a/script/test-run
+++ b/script/test-run
@@ -1,5 +1,5 @@
#!/bin/bash
cd ../
-rake spec
+bundle exec rake spec
diff --git a/script/update-xapian-index b/script/update-xapian-index
index 6ece02de0..d470176a9 100755
--- a/script/update-xapian-index
+++ b/script/update-xapian-index
@@ -1,5 +1,5 @@
#!/bin/bash
-
-cd `dirname $0`
-rake --silent xapian:update_index "$@"
+export BUNDLE_GEMFILE=$(dirname "$0")/../Gemfile
+cd "$(dirname "$0")"
+bundle exec rake --silent xapian:update_index "$@"