vagrant-capistrano-push 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e62736f46c765b359f83c6a22a59cfef421df3f
|
4
|
+
data.tar.gz: 03c3346e0d2b5aa2cbf39ad54f5897ac9a69cef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a9c88462c3e36ae2dcf94227bf5f419359d70e5cb259a8e30678da57e5c517bc95498f1bbe5b7bbb9d5111a320e120a0407e78d5e4d32a648f8b058b8234cea
|
7
|
+
data.tar.gz: 56d075fe0819a4a81938b815dc1ab2a779cf1ab5e921bc47024940996a709a9cc5e75f6fbdee949e39bdd92415930bc3d66ed7637157b59098d666ffa489e20a
|
data/Gemfile.lock
CHANGED
@@ -3,15 +3,16 @@ module VagrantPlugins
|
|
3
3
|
class Config < Vagrant.plugin("2", :config)
|
4
4
|
# The capistrano command (as a string) to execute.
|
5
5
|
# @return [String]
|
6
|
-
attr_accessor :stage
|
6
|
+
attr_accessor :stage
|
7
|
+
attr_accessor :inline
|
7
8
|
|
8
9
|
def initialize
|
9
10
|
@stage = UNSET_VALUE
|
10
|
-
@command = "bundle exec cap #{@stage} deploy"
|
11
11
|
end
|
12
12
|
|
13
13
|
def finalize!
|
14
14
|
@stage = nil if @stage == UNSET_VALUE
|
15
|
+
@inline = "bundle exec cap #{@stage} deploy"
|
15
16
|
end
|
16
17
|
|
17
18
|
def validate(machine)
|
@@ -1,4 +1,14 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The Vagrant capistrano-push plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
# This is a sanity check to make sure no one is attempting to install
|
8
|
+
# this into an early Vagrant version.
|
9
|
+
if Vagrant::VERSION < "1.2.0"
|
10
|
+
raise "The Vagrant capistrano-push plugin is only compatible with Vagrant 1.2+"
|
11
|
+
end
|
2
12
|
|
3
13
|
module VagrantPlugins
|
4
14
|
module CapistranoPush
|
@@ -6,12 +6,12 @@ module VagrantPlugins
|
|
6
6
|
module CapistranoPush
|
7
7
|
class Push < Vagrant.plugin("2", :push)
|
8
8
|
def push
|
9
|
-
execute
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
result = Vagrant::Util::Subprocess.execute(
|
10
|
+
'bash',
|
11
|
+
'-c',
|
12
|
+
config.inline,
|
13
|
+
:notify => [:stdout, :stderr]
|
14
|
+
)
|
15
15
|
|
16
16
|
if result.exit_code != 0
|
17
17
|
raise Errors::CommandFailed,
|