vagrant-exec 0.5.2 → 0.5.3

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: 5bd02c0d6a36ea13959a4d3b4b421cab17987605
4
- data.tar.gz: c0dd85f24425414ecc9c2b89b9a0c274cfc1361d
3
+ metadata.gz: 5b64991d7f44c762544150bb2aa5f9df232322bc
4
+ data.tar.gz: 537481f70ef6ad6f05d052115973e11f2f1595a0
5
5
  SHA512:
6
- metadata.gz: 98b33e5c4f625631abb58d8a4295f16a60da65aa886947040862fc3d7801cc822e48f33485bfa8285108b0a8dc85d718dc75b93c421d941a986ec97ef84147bf
7
- data.tar.gz: 6ac4df97bc193fdcefb118c93f7b3fd28d74d6441382306e58c07ce81aa9ab6b7d62a2ac8324980dd7f354c771348c4825f27fa31acaaf203ca8a2a965c04042
6
+ metadata.gz: 41178a9a5c7b8453ab91bc350f0c32bb2c394ae4bd1955eadf406aaef5abefee27079901d59e48fe8367e0af812c07b2e37b1d5451141ca010a7381051b6a60b
7
+ data.tar.gz: 00570c2f6896ebfaa6293936602d8da09b66522d738d2e4a5a4a48bf8ae8eff69267e62ee88829b11f87e6288329196f7a531244b45f12d07a3a3c6f5ffa1e67
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  /vendor/bundle/
5
5
  Gemfile.lock
6
6
  results.html
7
+ .idea
@@ -0,0 +1 @@
1
+ 2.1.7
@@ -1,3 +1,7 @@
1
+ ## 0.5.3
2
+
3
+ * Generate binstubs as `.bat` files on Windows (#15 thanks @MekDrop)
4
+
1
5
  ## 0.5.2
2
6
 
3
7
  * Allow to configure binstubs directory (#11)
@@ -70,9 +70,9 @@ module VagrantPlugins
70
70
  commands = vm.config.exec.commands
71
71
 
72
72
  explicit = commands.select { |command| command[:cmd] != '*' }
73
- .map { |command| command[:cmd] }
74
- .flatten
75
- .uniq
73
+ .map { |command| command[:cmd] }
74
+ .flatten
75
+ .uniq
76
76
 
77
77
  if explicit.empty?
78
78
  vm.env.ui.error('No commands to generate binstubs for.')
@@ -89,6 +89,14 @@ module VagrantPlugins
89
89
  binstubs_path = vm.config.exec.binstubs_path
90
90
  Dir.mkdir(binstubs_path) unless Dir.exist?(binstubs_path)
91
91
 
92
+ if Vagrant::Util::Platform.cygwin? || Vagrant::Util::Platform.windows?
93
+ binstub_template = 'windows'
94
+ binstub_ext = '.bat'
95
+ else
96
+ binstub_template = 'default'
97
+ binstub_ext = ''
98
+ end
99
+
92
100
  explicit.each do |command|
93
101
  command[:constructed].gsub!('"', '\"') # escape double-quotes
94
102
 
@@ -98,11 +106,11 @@ module VagrantPlugins
98
106
  shell: vm.config.ssh.shell,
99
107
  command: command[:constructed],
100
108
  }
101
- variables.merge!(template_root: "#{File.dirname(__FILE__)}/templates")
109
+ variables.merge!(template_root: "#{File.dirname(__FILE__)}/templates/binstub")
102
110
 
103
- binstub = Vagrant::Util::TemplateRenderer.render('binstub', variables)
111
+ binstub = Vagrant::Util::TemplateRenderer.render(binstub_template, variables)
104
112
 
105
- filename = [binstubs_path, command[:command]].join('/')
113
+ filename = [binstubs_path, command[:command]].join('/') + binstub_ext
106
114
  File.open(filename, 'w') { |file| file.write binstub }
107
115
  File.chmod(0755, filename)
108
116
 
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ ssh -F <%= ssh_config %> -q -t <%= ssh_host %> "<%= shell %> -c '<%= command %> %*'"
@@ -1,7 +1,7 @@
1
1
  module VagrantPlugins
2
2
  module Exec
3
3
 
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.3'
5
5
 
6
6
  end # Exec
7
7
  end # VagrantPlugins
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-exec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
@@ -59,6 +59,7 @@ extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
61
  - ".gitignore"
62
+ - ".ruby-version"
62
63
  - CHANGELOG.md
63
64
  - Gemfile
64
65
  - LICENSE.md
@@ -79,7 +80,8 @@ files:
79
80
  - lib/vagrant-exec/plugin.rb
80
81
  - lib/vagrant-exec/support/command_constructor.rb
81
82
  - lib/vagrant-exec/support/ssh_helper.rb
82
- - lib/vagrant-exec/templates/binstub.erb
83
+ - lib/vagrant-exec/templates/binstub/default.erb
84
+ - lib/vagrant-exec/templates/binstub/windows.erb
83
85
  - lib/vagrant-exec/version.rb
84
86
  - vagrant-exec.gemspec
85
87
  homepage: http://github.com/p0deje/vagrant-exec
@@ -102,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
104
  version: '0'
103
105
  requirements: []
104
106
  rubyforge_project:
105
- rubygems_version: 2.2.2
107
+ rubygems_version: 2.2.5
106
108
  signing_key:
107
109
  specification_version: 4
108
110
  summary: Execute commands in Vagrant synced folder