capistrano-stretcher 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/capistrano-stretcher.gemspec +1 -1
- data/lib/capistrano/tasks/stretcher.rake +10 -3
- data/lib/capistrano/templates/manifest.yml.erb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a341c8909b6f497f940161ab074a422166cd802e
|
4
|
+
data.tar.gz: a728bf6953c6841dcbae5702ff3ac844d93ed9ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99cc7e5754730f2f27b82df2a7000bcff8b146c31696f23e355988a93219cfc934fdbdedd07ce6fe6cc986d35557e5bcb6e308350fa28824b1ae65995765030
|
7
|
+
data.tar.gz: 3aa3a09700f9ee7e043cc26a2dfc6bac6a10aad1900f6aab871ad769b12eec2cfb343b9376489ca0c43ee785c1dd8cb638564c1e04f2d87e74b9c9089f015fd2
|
data/README.md
CHANGED
@@ -52,6 +52,8 @@ set :stretcher_hooks, 'config/stretcher.yml.erb'
|
|
52
52
|
set :local_tarball_name, 'rails-applicaiton.tar.gz'
|
53
53
|
set :stretcher_src, "s3://your-deployment-bucket/assets/rails-application-#{env.now}.tgz"
|
54
54
|
set :manifest_path, "s3://your-deployment-bucket/manifests/"
|
55
|
+
# Optional, if you want to use mv
|
56
|
+
set :stretcher_sync_strategy, "mv"
|
55
57
|
```
|
56
58
|
|
57
59
|
and write hooks for stretcher to `config/stretcher.yml.erb`
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-stretcher"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.3.0"
|
8
8
|
spec.authors = ["SHIBATA Hiroshi", "Uchio Kondo"]
|
9
9
|
spec.email = ["hsbt@ruby-lang.org", "udzura@udzura.jp"]
|
10
10
|
|
@@ -2,8 +2,14 @@
|
|
2
2
|
require 'erb'
|
3
3
|
require 'yaml'
|
4
4
|
|
5
|
+
namespace :load do
|
6
|
+
task :defaults do
|
7
|
+
set :gzip_compress_level, "-9"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
5
11
|
namespace :stretcher do
|
6
|
-
set :exclude_dirs, [
|
12
|
+
set :exclude_dirs, ["tmp"]
|
7
13
|
|
8
14
|
def local_working_path_base
|
9
15
|
@_local_working_path_base ||= fetch(:local_working_path_base, "/var/tmp/#{fetch :application}")
|
@@ -67,7 +73,7 @@ namespace :stretcher do
|
|
67
73
|
execute :echo, fetch(:current_revision), "> #{local_checkout_path}/#{env.now}/REVISION"
|
68
74
|
|
69
75
|
execute :rsync, "-av", "--delete",
|
70
|
-
*fetch(:exclude_dirs).map{|d| ['--exclude', d].join(' ')},
|
76
|
+
*fetch(:exclude_dirs, ["tmp"]).map{|d| ['--exclude', d].join(' ')},
|
71
77
|
"#{local_checkout_path}/#{env.now}/", "#{local_build_path}/",
|
72
78
|
"| pv -l -s $( find #{local_checkout_path}/#{env.now}/ -type f | wc -l ) >/dev/null"
|
73
79
|
end
|
@@ -77,11 +83,12 @@ namespace :stretcher do
|
|
77
83
|
task :create_tarball do
|
78
84
|
on application_builder_roles do
|
79
85
|
within local_build_path do
|
86
|
+
compress_level = fetch(:gzip_compress_level, "-9")
|
80
87
|
execute :mkdir, '-p', "#{local_tarball_path}/#{env.now}"
|
81
88
|
execute :tar, '-cf', '-',
|
82
89
|
"--exclude tmp", "--exclude spec", "./",
|
83
90
|
"| pv -s $( du -sb ./ | awk '{print $1}' )",
|
84
|
-
"| gzip
|
91
|
+
"| gzip #{compress_level} > #{local_tarball_path}/#{env.now}/#{fetch(:local_tarball_name)}"
|
85
92
|
end
|
86
93
|
within local_tarball_path do
|
87
94
|
execute :rm, '-f', 'current'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-stretcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.4.5.1
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: capistrano task for stretcher.
|