diff options
Diffstat (limited to 'script')
-rwxr-xr-x | script/generate_pot.sh | 4 | ||||
-rwxr-xr-x | script/handle-mail-replies | 2 | ||||
-rwxr-xr-x | script/load-sample-data | 3 | ||||
-rwxr-xr-x | script/rails-post-deploy | 6 | ||||
-rwxr-xr-x | script/rebuild-xapian-index | 2 | ||||
-rwxr-xr-x | script/spec | 1 | ||||
-rwxr-xr-x | script/spec-all-pairs | 2 | ||||
-rwxr-xr-x | script/spec_server | 4 | ||||
-rwxr-xr-x | script/test-run | 2 | ||||
-rwxr-xr-x | script/update-xapian-index | 6 |
10 files changed, 16 insertions, 16 deletions
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/handle-mail-replies b/script/handle-mail-replies index d6717bc58..cc7595bed 100755 --- a/script/handle-mail-replies +++ b/script/handle-mail-replies @@ -145,7 +145,7 @@ end def load_rails require File.join('config', 'boot') - require RAILS_ROOT + '/config/environment' + require Rails.root + '/config/environment' end def record_bounce(email_address, bounce_message) 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/spec_server b/script/spec_server index 1e839355f..dfdf8ff6c 100755 --- a/script/spec_server +++ b/script/spec_server @@ -41,7 +41,7 @@ module Spec load File.dirname(__FILE__) + '/../spec/spec_helper.rb' if in_memory_database? - load "#{RAILS_ROOT}/db/schema.rb" # use db agnostic schema by default + load "#{Rails.root}/db/schema.rb" # use db agnostic schema by default ActiveRecord::Migrator.up('db/migrate') # use migrations end @@ -80,7 +80,7 @@ def daemonize(pid_file = nil) return yield if $DEBUG pid = Process.fork{ Process.setsid - Dir.chdir(RAILS_ROOT) + Dir.chdir(Rails.root) trap("SIGINT"){ exit! 0 } trap("SIGTERM"){ exit! 0 } trap("SIGHUP"){ restart_test_server } 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 "$@" |