vagrant-winssh 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 74c69529ed13af4aff3fe9a9fdcdf0df5e275867
4
+ data.tar.gz: a71eb70bd8be8f66dd2976502dfcce8212a74d55
5
+ SHA512:
6
+ metadata.gz: f4818cd6162907b7ca6b6db89125c4d351d659ac03bff121db721660b61f99683005e340d02138d5536b68a46c5fdae37b48f6b58d25d190d8443274471618b3
7
+ data.tar.gz: 1731b1005fade85dae16dd068096fde9fcf15a80047bdbeef85a4bb92a82abbd77f4fd69242f7a041fb8d74c5234ed7ed25c40ed3430e3c1926de6bc0544c1e2
@@ -0,0 +1,35 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /vendor/bundle
26
+ /lib/bundler/man/
27
+
28
+ # for a library or gem, you might want to ignore these files since the code is
29
+ # intended to run in multiple environments; otherwise, check them in:
30
+ # Gemfile.lock
31
+ # .ruby-version
32
+ # .ruby-gemset
33
+
34
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ group :development do
4
+ gem "vagrant", git: 'https://github.com/mitchellh/vagrant'
5
+ end
6
+
7
+ group :plugins do
8
+ gem "vagrant-winssh", path: "."
9
+ end
@@ -0,0 +1,103 @@
1
+ GIT
2
+ remote: https://github.com/mitchellh/vagrant
3
+ revision: a152045f81e3433c76640cae449a359de2c311bb
4
+ specs:
5
+ vagrant (1.7.4)
6
+ bundler (>= 1.5.2, <= 1.10.5)
7
+ childprocess (~> 0.5.0)
8
+ erubis (~> 2.7.0)
9
+ hashicorp-checkpoint (~> 0.1.1)
10
+ i18n (>= 0.6.0, <= 0.8.0)
11
+ listen (~> 3.0.2)
12
+ log4r (~> 1.1.9, < 1.1.11)
13
+ net-scp (~> 1.1.0)
14
+ net-sftp (~> 2.1)
15
+ net-ssh (>= 2.6.6, < 2.10.0)
16
+ nokogiri (= 1.6.3.1)
17
+ rb-kqueue (~> 0.2.0)
18
+ rest-client (>= 1.6.0, < 2.0)
19
+ wdm (~> 0.1.0)
20
+ winrm (~> 1.3)
21
+ winrm-fs (~> 0.2.2)
22
+
23
+ PATH
24
+ remote: .
25
+ specs:
26
+ vagrant-winssh (0.1.0)
27
+
28
+ GEM
29
+ remote: https://rubygems.org/
30
+ specs:
31
+ builder (3.2.2)
32
+ childprocess (0.5.6)
33
+ ffi (~> 1.0, >= 1.0.11)
34
+ domain_name (0.5.24)
35
+ unf (>= 0.0.5, < 1.0.0)
36
+ erubis (2.7.0)
37
+ ffi (1.9.10)
38
+ gssapi (1.2.0)
39
+ ffi (>= 1.0.1)
40
+ gyoku (1.3.1)
41
+ builder (>= 2.1.2)
42
+ hashicorp-checkpoint (0.1.4)
43
+ http-cookie (1.0.2)
44
+ domain_name (~> 0.5)
45
+ httpclient (2.6.0.1)
46
+ i18n (0.7.0)
47
+ listen (3.0.3)
48
+ rb-fsevent (>= 0.9.3)
49
+ rb-inotify (>= 0.9)
50
+ little-plugger (1.1.4)
51
+ log4r (1.1.10)
52
+ logging (1.8.2)
53
+ little-plugger (>= 1.1.3)
54
+ multi_json (>= 1.8.4)
55
+ mime-types (2.6.2)
56
+ mini_portile (0.6.0)
57
+ multi_json (1.11.2)
58
+ net-scp (1.1.2)
59
+ net-ssh (>= 2.6.5)
60
+ net-sftp (2.1.2)
61
+ net-ssh (>= 2.6.5)
62
+ net-ssh (2.9.2)
63
+ netrc (0.10.3)
64
+ nokogiri (1.6.3.1)
65
+ mini_portile (= 0.6.0)
66
+ nori (2.6.0)
67
+ rb-fsevent (0.9.6)
68
+ rb-inotify (0.9.5)
69
+ ffi (>= 0.5.0)
70
+ rb-kqueue (0.2.4)
71
+ ffi (>= 0.5.0)
72
+ rest-client (1.8.0)
73
+ http-cookie (>= 1.0.2, < 2.0)
74
+ mime-types (>= 1.16, < 3.0)
75
+ netrc (~> 0.7)
76
+ rubyntlm (0.4.0)
77
+ rubyzip (1.1.7)
78
+ unf (0.1.4)
79
+ unf_ext
80
+ unf_ext (0.0.7.1)
81
+ uuidtools (2.1.5)
82
+ wdm (0.1.1)
83
+ winrm (1.3.4)
84
+ builder (>= 2.1.2)
85
+ gssapi (~> 1.2)
86
+ gyoku (~> 1.0)
87
+ httpclient (~> 2.2, >= 2.2.0.2)
88
+ logging (~> 1.6, >= 1.6.1)
89
+ nori (~> 2.0)
90
+ rubyntlm (~> 0.4.0)
91
+ uuidtools (~> 2.1.2)
92
+ winrm-fs (0.2.2)
93
+ erubis (~> 2.7)
94
+ logging (~> 1.6, >= 1.6.1)
95
+ rubyzip (~> 1.1)
96
+ winrm (~> 1.3.0)
97
+
98
+ PLATFORMS
99
+ ruby
100
+
101
+ DEPENDENCIES
102
+ vagrant!
103
+ vagrant-winssh!
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2015, Tony Arkles
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ * Neither the name of vagrant-winssh nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
@@ -0,0 +1,2 @@
1
+ # vagrant-winssh
2
+ Vagrant plug-in that bundles a Windows SSH client so that you don't have to mess with your PATH
@@ -0,0 +1,3 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,3 @@
1
+ require 'vagrant-winssh/plugin'
2
+ require 'vagrant-winssh/command'
3
+ require "vagrant-winssh/version"
@@ -0,0 +1,89 @@
1
+ require 'rubygems'
2
+ require 'optparse'
3
+
4
+ module VagrantWinssh
5
+ SSH_BINARY_NAME = "ssh"
6
+
7
+ class Command < Vagrant.plugin(2, :command)
8
+ def which(cmd)
9
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
10
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
11
+ exts.each { |ext|
12
+ exe = File.join(path, "#{cmd}#{ext}")
13
+ return exe if File.executable?(exe) && !File.directory?(exe)
14
+ }
15
+ end
16
+ return nil
17
+ end
18
+
19
+ def execute
20
+ ENV['PATH'] = ENV['PATH'] + File::PATH_SEPARATOR + File.join(File::dirname(__FILE__), "windows")
21
+ ssh_path = which(SSH_BINARY_NAME)
22
+ if ssh_path.nil?
23
+ @env.ui.error "Couldn't find an SSH binary"
24
+ raise Errors::SSHUnavailable
25
+ end
26
+
27
+ ### Most of this is copied straight out of Vagrant
28
+
29
+ options = {}
30
+
31
+ opts = OptionParser.new do |o|
32
+ o.banner = "Usage: vagrant winssh [options] [name] [-- extra ssh args]"
33
+ o.separator ""
34
+ o.separator "Options:"
35
+ o.separator ""
36
+
37
+ o.on("-c", "--command COMMAND", "Execute an SSH command directly") do |c|
38
+ options[:command] = c
39
+ end
40
+
41
+ o.on("-p", "--plain", "Plain mode, leaves authentication up to user") do |p|
42
+ options[:plain_mode] = p
43
+ end
44
+ end
45
+
46
+ # Parse out the extra args to send to SSH, which is everything
47
+ # after the "--"
48
+ split_index = @argv.index("--")
49
+ if split_index
50
+ options[:ssh_args] = @argv.drop(split_index + 1)
51
+ @argv = @argv.take(split_index)
52
+ end
53
+
54
+ # Parse the options and return if we don't have any target.
55
+ argv = parse_options(opts)
56
+ return if !argv
57
+
58
+ # Execute the actual SSH
59
+ with_target_vms(argv, single_target: true) do |vm|
60
+ ssh_opts = {
61
+ plain_mode: options[:plain_mode],
62
+ extra_args: options[:ssh_args]
63
+ }
64
+
65
+ if options[:command]
66
+ @logger.debug("Executing single command on remote machine: #{options[:command]}")
67
+ env = vm.action(:ssh_run,
68
+ ssh_opts: ssh_opts,
69
+ ssh_run_command: options[:command],)
70
+
71
+ # Exit with the exit status of the command or a 0 if we didn't
72
+ # get one.
73
+ exit_status = env[:ssh_run_exit_status] || 0
74
+ return exit_status
75
+ else
76
+ @logger.debug("Invoking `ssh` action on machine")
77
+ vm.action(:ssh, ssh_opts: ssh_opts)
78
+
79
+ # We should never reach this point, since the point of `ssh`
80
+ # is to exec into the proper SSH shell, but we'll just return
81
+ # an exit status of 0 anyways.
82
+ return 0
83
+ end
84
+ end
85
+ end
86
+
87
+ end
88
+ end
89
+
@@ -0,0 +1,17 @@
1
+ require 'vagrant'
2
+
3
+ module VagrantWinssh
4
+ class Plugin < Vagrant.plugin("2")
5
+ name "vagrant-winssh"
6
+ description <<-DESC
7
+ Vagrant-winssh allows you to SSH into your virtual machines from Windows
8
+ without having to install any additional software into your PATH.
9
+ DESC
10
+
11
+ command "winssh" do
12
+ require_relative "command"
13
+ Command
14
+ end
15
+ end
16
+
17
+ end
@@ -0,0 +1,3 @@
1
+ module VagrantWinssh
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,18 @@
1
+ require File.expand_path("../lib/vagrant-winssh/version", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "vagrant-winssh"
5
+ s.version = VagrantWinssh::VERSION
6
+ s.platform = Gem::Platform::RUBY
7
+ s.authors = ["Tony Arkles"]
8
+ s.email = ["BSD"]
9
+ s.licenses = ["BSD-3-Clause"]
10
+ s.homepage = "https://github.com/tonyarkles/vagrant-winssh"
11
+ s.summary = "Vagrant plugin with bundled Windows ssh"
12
+ s.description = "Vagrant plugin with bundled Windows ssh"
13
+
14
+ s.required_rubygems_version = ">= 1.4.0"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.require_path = 'lib'
18
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-winssh
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tony Arkles
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-02 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Vagrant plugin with bundled Windows ssh
14
+ email:
15
+ - BSD
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - .gitignore
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - LICENSE
24
+ - README.md
25
+ - Rakefile
26
+ - lib/vagrant-winssh.rb
27
+ - lib/vagrant-winssh/command.rb
28
+ - lib/vagrant-winssh/plugin.rb
29
+ - lib/vagrant-winssh/version.rb
30
+ - lib/vagrant-winssh/windows/msys-2.0.dll
31
+ - lib/vagrant-winssh/windows/msys-asn1-8.dll
32
+ - lib/vagrant-winssh/windows/msys-com_err-1.dll
33
+ - lib/vagrant-winssh/windows/msys-crypt-0.dll
34
+ - lib/vagrant-winssh/windows/msys-crypto-1.0.0.dll
35
+ - lib/vagrant-winssh/windows/msys-gcc_s-seh-1.dll
36
+ - lib/vagrant-winssh/windows/msys-gssapi-3.dll
37
+ - lib/vagrant-winssh/windows/msys-heimbase-1.dll
38
+ - lib/vagrant-winssh/windows/msys-heimntlm-0.dll
39
+ - lib/vagrant-winssh/windows/msys-hx509-5.dll
40
+ - lib/vagrant-winssh/windows/msys-krb5-26.dll
41
+ - lib/vagrant-winssh/windows/msys-roken-18.dll
42
+ - lib/vagrant-winssh/windows/msys-sqlite3-0.dll
43
+ - lib/vagrant-winssh/windows/msys-ssp-0.dll
44
+ - lib/vagrant-winssh/windows/msys-wind-0.dll
45
+ - lib/vagrant-winssh/windows/msys-z.dll
46
+ - lib/vagrant-winssh/windows/ssh.exe
47
+ - vagrant-winssh.gemspec
48
+ homepage: https://github.com/tonyarkles/vagrant-winssh
49
+ licenses:
50
+ - BSD-3-Clause
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - '>='
64
+ - !ruby/object:Gem::Version
65
+ version: 1.4.0
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 2.0.14
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Vagrant plugin with bundled Windows ssh
72
+ test_files: []