brightbox 2.3.8 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,9 +20,7 @@
20
20
 
21
21
  namespace :db do
22
22
 
23
- desc %Q{
24
- [internal]Create the database if it doesn't exist
25
- }
23
+ desc "[internal]Create the database if it doesn't exist"
26
24
  task :create, :roles => :db, :only => { :primary => true } do
27
25
  run rake_task("db:create")
28
26
  end
@@ -38,3 +36,10 @@ namespace :db do
38
36
  end
39
37
 
40
38
  end
39
+
40
+ namespace :deploy do
41
+ desc "Run the migrate rake task."
42
+ task :migrate, :roles => :db, :only => { :primary => true } do
43
+ run rake_task("db:migrate")
44
+ end
45
+ end
@@ -23,10 +23,25 @@ def rake_task(taskname)
23
23
  in_rails_root("#{rake} #{rake_env} #{taskname}")
24
24
  end
25
25
 
26
+ # Runs the command under bundle exec if there is a Gemfile, otherwise
27
+ # runs it without
28
+ def bundle_exec(command)
29
+ if bundle_disable
30
+ %Q{RAILS_ENV=#{rails_env} #{command}}
31
+ else
32
+ %Q{
33
+ if [ "#{bundle_force}" = "true" -o -f "#{bundle_gemfile}" ] ;
34
+ then RAILS_ENV=#{rails_env} bundle exec #{command} ;
35
+ else RAILS_ENV=#{rails_env} #{command} ;
36
+ fi
37
+ }
38
+ end
39
+ end
40
+
26
41
  def in_rails_root(taskname)
27
42
  rails_env = fetch(:rails_env, "production")
28
43
  directory = current_release
29
- %Q{sh -c 'cd #{directory}; RAILS_ENV=#{rails_env} #{taskname}'}
44
+ "cd #{directory} ; #{bundle_exec(taskname)}"
30
45
  end
31
46
 
32
47
  def on_one_line(cmd_list)
@@ -1,5 +1,5 @@
1
1
  module Brightbox
2
- VERSION = "2.3.8"
2
+ VERSION = "2.3.9"
3
3
  end
4
4
  # Set global scope version so that OptionParser picks it up.
5
5
  ::Version = Brightbox::VERSION
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 8
10
- version: 2.3.8
9
+ - 9
10
+ version: 2.3.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Leach
@@ -18,8 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-11-01 00:00:00 +00:00
22
- default_executable:
21
+ date: 2011-12-02 00:00:00 Z
23
22
  dependencies:
24
23
  - !ruby/object:Gem::Dependency
25
24
  name: capistrano
@@ -65,7 +64,6 @@ files:
65
64
  - lib/brightbox/recipes/configure.rb
66
65
  - lib/brightbox/maintenance.rb
67
66
  - bin/brightbox
68
- has_rdoc: true
69
67
  homepage: http://wiki.brightbox.co.uk/docs:gemv2:start
70
68
  licenses: []
71
69
 
@@ -95,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
93
  requirements: []
96
94
 
97
95
  rubyforge_project: brightbox
98
- rubygems_version: 1.3.7
96
+ rubygems_version: 1.8.10
99
97
  signing_key:
100
98
  specification_version: 3
101
99
  summary: Brightbox rails deployment scripts for Capistrano