vagrant-capistrano-push 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04884b1060481e2ffeb7e819609365a68a2f6445
4
- data.tar.gz: a7c963eb4ea928c0bd3938e34847a0ad52d3688c
3
+ metadata.gz: 1e62736f46c765b359f83c6a22a59cfef421df3f
4
+ data.tar.gz: 03c3346e0d2b5aa2cbf39ad54f5897ac9a69cef8
5
5
  SHA512:
6
- metadata.gz: 29aa5158d090309a8edde1e01de7b095f3492771b8a27a307f9c386eddec9c236407b7cb639407031f53543ef796df45d061576ce3f2112c3d75e4ca041f89ee
7
- data.tar.gz: e06599e8b403d8446f477406c39fab822001847614634a3d7014c93c7f41610089762537f1397ae828ef96fca00eda66af1b37639f8ef6797b9d78952d9e5356
6
+ metadata.gz: 9a9c88462c3e36ae2dcf94227bf5f419359d70e5cb259a8e30678da57e5c517bc95498f1bbe5b7bbb9d5111a320e120a0407e78d5e4d32a648f8b058b8234cea
7
+ data.tar.gz: 56d075fe0819a4a81938b815dc1ab2a779cf1ab5e921bc47024940996a709a9cc5e75f6fbdee949e39bdd92415930bc3d66ed7637157b59098d666ffa489e20a
data/Gemfile.lock CHANGED
@@ -33,7 +33,7 @@ GIT
33
33
  PATH
34
34
  remote: .
35
35
  specs:
36
- vagrant-capistrano-push (0.0.1)
36
+ vagrant-capistrano-push (0.0.3)
37
37
 
38
38
  GEM
39
39
  remote: https://rubygems.org/
@@ -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, :command
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
- require "vagrant"
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!(config.command)
10
- end
11
-
12
- # Execute the capistrano command, raising an exception if it fails.
13
- def execute!(*cmd)
14
- result = Vagrant::Util::Subprocess.execute(*cmd)
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,
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module CapistranoPush
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-capistrano-push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner