capper 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capper (0.6.4)
4
+ capper (0.6.6)
5
5
  capistrano
6
6
  capistrano_colors
7
7
  erubis
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capper"
5
- s.version = "0.6.5"
5
+ s.version = "0.6.6"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.licenses = ["MIT"]
8
8
  s.authors = ["Benedikt Böhm"]
@@ -9,17 +9,21 @@ Capper.load do
9
9
  end
10
10
  end
11
11
 
12
- after "deploy:update_code" do
13
- unless config_repo.nil?
14
- run "cd #{config_path} && git pull -q"
15
- end
12
+ namespace :config do
13
+ task :setup, :roles => :app, :except => { :no_release => true } do
14
+ unless config_repo.nil?
15
+ run "cd #{config_path} && git pull -q"
16
+ end
16
17
 
17
- fetch(:config_files, []).each do |f|
18
- run "cp #{config_path}/#{f} #{release_path}/config/"
19
- end
18
+ fetch(:config_files, []).each do |f|
19
+ run "cp #{config_path}/#{f} #{release_path}/config/"
20
+ end
20
21
 
21
- fetch(:symlinks, {}).each do |source, dest|
22
- run "rm -rf #{release_path}/#{dest} && ln -nfs #{shared_path}/#{source} #{release_path}/#{dest}"
22
+ fetch(:symlinks, {}).each do |source, dest|
23
+ run "rm -rf #{release_path}/#{dest} && ln -nfs #{shared_path}/#{source} #{release_path}/#{dest}"
24
+ end
23
25
  end
24
26
  end
27
+
28
+ after "deploy:update_code", "config:setup"
25
29
  end
@@ -6,4 +6,15 @@ require 'capper/bundler'
6
6
 
7
7
  Capper.load do
8
8
  _cset(:rails_env, "production")
9
+
10
+ namespace :rails do
11
+ desc "Generate rails configuration and helpers"
12
+ task :setup, :roles => :app, :except => { :no_release => true } do
13
+ upload_template_file("rails.console.sh",
14
+ File.join(bin_path, "con"),
15
+ :mode => "0755")
16
+ end
17
+ end
18
+
19
+ after "deploy:update_code", "rails:setup"
9
20
  end
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ export HOME=<%= deploy_to %>
3
+ source <%= deploy_to %>/.rvm/scripts/rvm
4
+ export RAILS_ENV=<%= rails_env %>
5
+
6
+ cd <%= current_path %> >/dev/null
7
+
8
+ if [[ -e ./scripts/console ]]; then
9
+ exec bundle exec ruby ./script/console
10
+ else
11
+ exec bundle exec ruby ./script/rails console
12
+ fi
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capper
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.5
5
+ version: 0.6.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Benedikt B\xC3\xB6hm"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-09-20 00:00:00 +02:00
13
+ date: 2011-09-29 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -90,6 +90,7 @@ files:
90
90
  - lib/capper/rvm.rb
91
91
  - lib/capper/sass.rb
92
92
  - lib/capper/templates/delayed_job.sh.erb
93
+ - lib/capper/templates/rails.console.sh
93
94
  - lib/capper/templates/unicorn.rb.erb
94
95
  - lib/capper/templates/unicorn.sh.erb
95
96
  - lib/capper/unicorn.rb