capistrano-deploy-management 0.1.25 → 0.1.28
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.
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'capistrano-deploy-management'
|
4
4
|
s.description = 'Collection of Capistrano recipes for deploying Rails apps into high-performance environments'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.28'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ['Dominik Rodler']
|
8
8
|
s.email = ['dominik.rodler@gmail.com']
|
data/changelog.md
CHANGED
@@ -6,54 +6,22 @@ module CapistranoDeployManagement
|
|
6
6
|
use_recipe :rails
|
7
7
|
|
8
8
|
namespace :deploy do
|
9
|
-
namespace :assets
|
9
|
+
namespace :assets do
|
10
10
|
desc 'Clear application cache (e.g. Memcached).'
|
11
|
-
task :refresh_cache do
|
11
|
+
task :refresh_cache, roles: :app do
|
12
12
|
run "cd #{current_path} && rake cache:clear RAILS_ENV=#{rails_env}"
|
13
13
|
# Requires this rake task: (include here!?)
|
14
14
|
# namespace :cache do
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
# end
|
15
|
+
# desc 'Clear memcache'
|
16
|
+
# task clear: :environment do
|
17
|
+
# Rails.cache.clear
|
19
18
|
# end
|
20
|
-
end
|
21
|
-
|
22
|
-
desc 'Precompile assets if any assets have changed.'
|
23
|
-
task :lazy_precompile do
|
24
|
-
current_revision = "cat #{current_path}/REVISION"
|
25
|
-
head_revision = "cat #{latest_release}/REVISION"
|
26
|
-
assets_paths = "#{latest_release}/app/assets/ #{latest_release}/lib/assets/ #{latest_release}/vendor/assets/"
|
27
|
-
|
28
|
-
run "svn log -r #{current_revision}:#{head_revision} #{assets_paths}"
|
29
|
-
|
30
|
-
# if capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
|
31
|
-
# run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
|
32
|
-
# else
|
33
|
-
# logger.info "Skipping asset pre-compilation because there were no asset changes"
|
34
19
|
# end
|
35
20
|
end
|
36
|
-
|
37
|
-
# desc 'Precompile assets, but only those that are not precompiled already.'
|
38
|
-
# task :recompile, :roles => :web, :except => { :no_release => true } do
|
39
|
-
# run <<-EOF
|
40
|
-
# export FROM=`[ -f #{current_path}/REVISION ] && (cat #{current_path}/REVISION | perl -pe 's/$/../')` &&
|
41
|
-
# export TO=`cat #{latest_release}/REVISION` &&
|
42
|
-
# echo ${FROM}${TO} &&
|
43
|
-
# cd #{shared_path}/cached-copy &&
|
44
|
-
# git log ${FROM}${TO} -- app/assets vendor/assets | wc -l | egrep '^0$' ||
|
45
|
-
# (
|
46
|
-
# echo "Recompiling assets" &&
|
47
|
-
# cd #{latest_release} &&
|
48
|
-
# source .rvmrc &&
|
49
|
-
# RAILS_ENV=production bundle exec rake assets:precompile --trace
|
50
|
-
# )
|
51
|
-
# EOF
|
52
|
-
# end
|
53
21
|
end
|
54
22
|
end
|
55
23
|
|
56
|
-
after
|
24
|
+
after 'deploy:update', 'deploy:assets:refresh_cache'
|
57
25
|
|
58
26
|
end
|
59
27
|
end
|