capistrano-decompose 0.1.3 → 0.2.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -6
- data/README.md +1 -1
- data/lib/capistrano/decompose/version.rb +1 -1
- data/lib/capistrano/tasks/decompose.rake +14 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a00dce5cf2eff5e6bee0e26434281603a3cdaa8b
|
|
4
|
+
data.tar.gz: 179b904bf1e7f9d1670706c09289cd91869194e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ab9de128f762e5625194db567286eb48fdfec8f57ea3f7b65dab85392a898a441a6d9280fac42427949a35eb803b9e2af6724e6767620d5ccb9f857d060e58e
|
|
7
|
+
data.tar.gz: d63765374cd3504011069f55830a2654f0b2f8018065e5c6925e32b08012f48778b5d7299b2337f9f02010fe35a83f08bd9290d5ee56e07ccf7884f9cf1246e9
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
capistrano-decompose (0.
|
|
4
|
+
capistrano-decompose (0.2.0)
|
|
5
5
|
capistrano (~> 3.5)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -9,17 +9,19 @@ GEM
|
|
|
9
9
|
specs:
|
|
10
10
|
airbrussh (1.3.0)
|
|
11
11
|
sshkit (>= 1.6.1, != 1.7.0)
|
|
12
|
-
capistrano (3.
|
|
12
|
+
capistrano (3.10.0)
|
|
13
13
|
airbrussh (>= 1.0.0)
|
|
14
14
|
i18n
|
|
15
15
|
rake (>= 10.0.0)
|
|
16
16
|
sshkit (>= 1.9.0)
|
|
17
|
-
|
|
17
|
+
concurrent-ruby (1.0.5)
|
|
18
|
+
i18n (0.9.1)
|
|
19
|
+
concurrent-ruby (~> 1.0)
|
|
18
20
|
net-scp (1.2.1)
|
|
19
21
|
net-ssh (>= 2.6.5)
|
|
20
22
|
net-ssh (4.2.0)
|
|
21
|
-
rake (12.1
|
|
22
|
-
sshkit (1.
|
|
23
|
+
rake (12.2.1)
|
|
24
|
+
sshkit (1.15.0)
|
|
23
25
|
net-scp (>= 1.1.2)
|
|
24
26
|
net-ssh (>= 2.8.0)
|
|
25
27
|
|
|
@@ -30,4 +32,4 @@ DEPENDENCIES
|
|
|
30
32
|
capistrano-decompose!
|
|
31
33
|
|
|
32
34
|
BUNDLED WITH
|
|
33
|
-
1.
|
|
35
|
+
1.16.0
|
data/README.md
CHANGED
|
@@ -49,7 +49,7 @@ You can specify the following options in you `deploy.rb` script or the environme
|
|
|
49
49
|
|
|
50
50
|
* **decompose_restart**: An array of services that should be restarted each deployment, if not specified decompose will restart all services
|
|
51
51
|
* **decompose_web_service**: The web service that will be used to execute commands inside like `rake` or any interactive command from `decompose:run`, default value: :web
|
|
52
|
-
* **decompose_rake_tasks**:
|
|
52
|
+
* **decompose_rake_tasks**: An array of rake tasks to execute after each deploy on the web_service or a Hash of `service_name => [task1, task2...]`, default value is `nil`
|
|
53
53
|
|
|
54
54
|
For a typical rails application the previous options should be as follows, given that the application container service name is `web`:
|
|
55
55
|
|
|
@@ -57,7 +57,14 @@ namespace :decompose do
|
|
|
57
57
|
task :rake_tasks do
|
|
58
58
|
on roles(:app) do
|
|
59
59
|
within release_path do
|
|
60
|
-
|
|
60
|
+
case fetch(:decompose_rake_tasks)
|
|
61
|
+
when Array
|
|
62
|
+
docker_rake_in_web_service(*fetch(:decompose_rake_tasks))
|
|
63
|
+
when Hash
|
|
64
|
+
fetch(:decompose_rake_tasks).each do |service, tasks|
|
|
65
|
+
docker_rake(service, *tasks)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
61
68
|
end
|
|
62
69
|
end
|
|
63
70
|
end
|
|
@@ -80,8 +87,12 @@ namespace :decompose do
|
|
|
80
87
|
end
|
|
81
88
|
end
|
|
82
89
|
|
|
83
|
-
def
|
|
84
|
-
docker_execute(
|
|
90
|
+
def docker_rake_in_web_service(*args)
|
|
91
|
+
docker_execute(fetch(:decompose_web_service), *args)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def docker_rake(container, *args)
|
|
95
|
+
docker_execute('run', '--rm', container, 'rake', *args)
|
|
85
96
|
end
|
|
86
97
|
|
|
87
98
|
def docker_execute(*args)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-decompose
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emad Elsaid
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|