vagrant-putty 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in vagrant-rake.gemspec
4
+ gem "vagrant-putty", :path => "."
5
+
6
+ group :test do
7
+ gem "mocha", "~> 0.10.0"
8
+ gem "jruby-win32ole", :platform => [:mswin, :jruby]
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,42 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vagrant-putty (0.0.2)
5
+ vagrant (~> 0.8.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ archive-tar-minitar (0.5.2)
11
+ erubis (2.7.0)
12
+ ffi (1.0.10)
13
+ i18n (0.6.0)
14
+ jruby-win32ole (0.8.5)
15
+ json (1.5.4)
16
+ metaclass (0.0.1)
17
+ mocha (0.10.0)
18
+ metaclass (~> 0.0.1)
19
+ net-scp (1.0.4)
20
+ net-ssh (>= 1.99.1)
21
+ net-ssh (2.1.4)
22
+ thor (0.14.6)
23
+ vagrant (0.8.7)
24
+ archive-tar-minitar (= 0.5.2)
25
+ erubis (~> 2.7.0)
26
+ i18n (~> 0.6.0)
27
+ json (~> 1.5.1)
28
+ net-scp (~> 1.0.4)
29
+ net-ssh (~> 2.1.4)
30
+ thor (~> 0.14.6)
31
+ virtualbox (~> 0.9.1)
32
+ virtualbox (0.9.2)
33
+ ffi (~> 1.0.9)
34
+
35
+ PLATFORMS
36
+ java
37
+ ruby
38
+
39
+ DEPENDENCIES
40
+ jruby-win32ole
41
+ mocha (~> 0.10.0)
42
+ vagrant-putty!
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # What is this?
2
+
3
+ A [vagrant](http://vagrantup.com) plugin that allows you to [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/) into a VM.
4
+
5
+ # How do I use it?
6
+
7
+ Install it (it will be published on rubygems.org eventually):
8
+ <pre>
9
+ git clone git@github.com:mdellanoce/vagrant-putty.git
10
+ rake install
11
+ </pre>
12
+
13
+ Use it:
14
+ <pre>
15
+ vagrant putty
16
+ </pre>
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'bundler/setup'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ task :default => :test
7
+
8
+ desc "Run the test suite."
9
+ task :test do
10
+ $:.unshift File.expand_path("../test", __FILE__)
11
+
12
+ Dir["test/**/*_test.rb"].each do |f|
13
+ load f
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+
3
+ module VagrantPutty
4
+ class Command < Vagrant::Command::Base
5
+ register "putty", "PuTTY into the VM environment"
6
+
7
+ def execute
8
+ system("putty vagrant@localhost -i #{self.class.ppk_path} -P 2222")
9
+ end
10
+
11
+ def self.ppk_path
12
+ File.join Gem.loaded_specs['vagrant'].full_gem_path, "keys", "vagrant.ppk"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module VagrantPutty
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1 @@
1
+ require 'vagrant-putty/command'
@@ -0,0 +1 @@
1
+ require 'vagrant-putty'
@@ -0,0 +1,24 @@
1
+ require "test/unit"
2
+ require "mocha"
3
+ require "vagrant"
4
+ require "vagrant-putty"
5
+
6
+ class TestVagrantPuttyCommand < Test::Unit::TestCase
7
+ include Vagrant::TestHelpers
8
+
9
+ def setup
10
+ clean_paths
11
+
12
+ @klass = VagrantPutty::Command
13
+ @env = vagrant_env
14
+ end
15
+
16
+ def test_execute
17
+ expected = "putty vagrant@localhost -i #{@klass.ppk_path} -P 2222"
18
+
19
+ @klass.any_instance.expects(:system)
20
+ @klass.any_instance.expects(:system).with(expected)
21
+
22
+ @env.cli("putty")
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ require File.expand_path("../lib/vagrant-putty/version", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "vagrant-putty"
5
+ s.version = VagrantPutty::VERSION
6
+ s.platform = Gem::Platform::RUBY
7
+ s.authors = ["Michael Dellanoce"]
8
+ s.email = ["michael.dellanoce@gmail.com"]
9
+ s.homepage = "http://rubygems.org/gems/vagrant-putty"
10
+ s.summary = "A Vagrant plugin to PuTTY into a VM"
11
+ s.description = "A Vagrant plugin to PuTTY into a VM"
12
+
13
+ s.required_rubygems_version = ">= 1.3.6"
14
+ s.rubyforge_project = "vagrant-putty"
15
+
16
+ s.add_dependency "vagrant", "~> 0.8.0"
17
+ s.add_development_dependency "mocha", "~> 0.10.0"
18
+ s.add_development_dependency "bundler", ">= 1.0.0"
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.require_path = 'lib'
22
+ end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-putty
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Michael Dellanoce
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-22 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: vagrant
16
+ requirement: &83486780 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.8.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *83486780
25
+ - !ruby/object:Gem::Dependency
26
+ name: mocha
27
+ requirement: &83486530 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.10.0
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *83486530
36
+ - !ruby/object:Gem::Dependency
37
+ name: bundler
38
+ requirement: &83486290 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 1.0.0
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *83486290
47
+ description: A Vagrant plugin to PuTTY into a VM
48
+ email:
49
+ - michael.dellanoce@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .gitignore
55
+ - Gemfile
56
+ - Gemfile.lock
57
+ - README.md
58
+ - Rakefile
59
+ - lib/vagrant-putty.rb
60
+ - lib/vagrant-putty/command.rb
61
+ - lib/vagrant-putty/version.rb
62
+ - lib/vagrant_init.rb
63
+ - test/vagrant-putty/command_test.rb
64
+ - vagrant-putty.gemspec
65
+ homepage: http://rubygems.org/gems/vagrant-putty
66
+ licenses: []
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ segments:
78
+ - 0
79
+ hash: -393247891
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 1.3.6
86
+ requirements: []
87
+ rubyforge_project: vagrant-putty
88
+ rubygems_version: 1.8.11
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: A Vagrant plugin to PuTTY into a VM
92
+ test_files: []