vagrant-capistrano-push 0.0.10 → 0.0.11
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/README.md +2 -2
- data/lib/vagrant-capistrano-push/push.rb +19 -15
- data/lib/vagrant-capistrano-push/version.rb +1 -1
- data/locales/en.yml +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6948af53922873fb4ee279daadb2b350a2be05f
|
4
|
+
data.tar.gz: c1c04abfeb047e77916d39f124e8f49c41dd3495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da192d831365b43061f1b6de12a97b6f73c5b5393088dc8482b4ea2bdb2b9eddbc9adbd20f895f6b2da3cc67b5e26b888627f0d206c8226c442348bdde5da323
|
7
|
+
data.tar.gz: f26fc31837cd2ef3511e30ffbf7dd7a6eee71ad2c5e772d88b984ab23d4c21e00a37c0838d5280466567f7c93d96e57124817719822d91c2c92dea0e8fa683ae
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ vagrant plugin install vagrant-capistrano-push
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
```
|
13
|
+
```ruby
|
14
14
|
# Vagrantfile
|
15
15
|
config.push.define "staging", strategy: "capistrano" do |push|
|
16
16
|
push.stage = "staging"
|
@@ -29,7 +29,7 @@ vagrant push production
|
|
29
29
|
|
30
30
|
Or if you are using ENV variables:
|
31
31
|
|
32
|
-
```
|
32
|
+
```ruby
|
33
33
|
# Vagrantfile
|
34
34
|
config.push.define "capistrano" do |push|
|
35
35
|
push.stage = ENV["STAGE"]
|
@@ -6,23 +6,27 @@ module VagrantPlugins
|
|
6
6
|
module CapistranoPush
|
7
7
|
class Push < Vagrant.plugin("2", :push)
|
8
8
|
def push
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
# Capistrano is not part of the current Vagrant bundle, so it needs to run
|
10
|
+
# in the context of the system.
|
11
|
+
Vagrant::Util::Env.with_clean_env do
|
12
|
+
result = Vagrant::Util::Subprocess.execute(
|
13
|
+
'bash',
|
14
|
+
'-c',
|
15
|
+
config.inline,
|
16
|
+
:workdir => @env.root_path.to_s,
|
17
|
+
:notify => [:stdout, :stderr]
|
18
|
+
)
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
if result.exit_code != 0
|
21
|
+
raise Errors::CommandFailed,
|
22
|
+
cmd: config.inline,
|
23
|
+
workdir: @env.root_path.to_s,
|
24
|
+
stdout: result.stdout,
|
25
|
+
stderr: result.stderr
|
26
|
+
end
|
24
27
|
|
25
|
-
|
28
|
+
result
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
end
|
data/locales/en.yml
CHANGED