capper 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/capper.gemspec +1 -1
- data/lib/capper/config.rb +13 -9
- data/lib/capper/rails.rb +11 -0
- data/lib/capper/templates/rails.console.sh +12 -0
- metadata +3 -2
data/Gemfile.lock
CHANGED
data/capper.gemspec
CHANGED
data/lib/capper/config.rb
CHANGED
@@ -9,17 +9,21 @@ Capper.load do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
18
|
+
fetch(:config_files, []).each do |f|
|
19
|
+
run "cp #{config_path}/#{f} #{release_path}/config/"
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
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
|
data/lib/capper/rails.rb
CHANGED
@@ -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
|
+
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-
|
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
|