kitchen-ssh 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Maxim Chernyak
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # kitchen-ssh
2
+
3
+ ssh driver for test-kitchen for any running server with an ip address
4
+
5
+ * server must be created and destroyed natively (e.g. via cloud or virtualization console).
6
+ * specify driver parameters
7
+ hostname
8
+ port
9
+ username
10
+ password
11
+ sudo
12
+ ssh_key
13
+ forward_agent
14
+
15
+ ## Installation
16
+
17
+ Add this line to your application's Gemfile:
18
+
19
+ gem 'kitchen-ssh', group: :integration
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install kitchen-ssh
28
+
29
+ ## Usage
30
+
31
+ In your .kitchen.yml file set driver to be 'ssh'
32
+
@@ -0,0 +1,29 @@
1
+ # encoding: utf-8
2
+
3
+ $:.unshift File.expand_path('../lib', __FILE__)
4
+ require 'kitchen/ssh/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "kitchen-ssh"
8
+ s.version = Kitchen::Ssh::VERSION
9
+ s.authors = ["Neill Turner"]
10
+ s.email = ["neillwturner@gmail.com"]
11
+ s.homepage = "https://github.com/neillturner/kitchen-ssh"
12
+ s.summary = "ssh driver for test-kitchen for any running server with an ip address"
13
+ candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh.gemspec']
14
+ s.files = candidates.sort
15
+ s.platform = Gem::Platform::RUBY
16
+ s.require_paths = ['lib']
17
+ s.rubyforge_project = '[none]'
18
+ s.description = <<-EOF
19
+ == DESCRIPTION:
20
+
21
+ ssh driver for test-kitchen for any running server with an ip address
22
+
23
+ == FEATURES:
24
+
25
+ ssh driver for test-kitchen for any running server with an ip address
26
+
27
+ EOF
28
+
29
+ end
@@ -0,0 +1,28 @@
1
+ require 'kitchen'
2
+ require 'kitchen/driver/ssh_base'
3
+
4
+ module Kitchen
5
+ module Driver
6
+ class Ssh < SSHBase
7
+ def create(state)
8
+ state[:sudo] = config[:sudo]
9
+ state[:port] = config[:port]
10
+ state[:ssh_key] = config[:ssh_key]
11
+ state[:forward_agent] = config[:forward_agent]
12
+ state[:username] = config[:username]
13
+ state[:hostname] = config[:hostname]
14
+ state[:password] = config[:password]
15
+ wait_for_sshd(state[:hostname], state[:username])
16
+ print '(ssh ready)\n'
17
+ debug("ssh:create '#{state[:hostname]}'")
18
+ end
19
+
20
+ def destroy(state)
21
+ print 'To destroy server shut down the server natively.\n'
22
+ print 'in your cloud or virtualisation console etc.\n'
23
+ debug("ssh:destroy '#{state[:hostname]}'")
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,5 @@
1
+ module Kitchen
2
+ module Ssh
3
+ VERSION = "0.0.3"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kitchen-ssh
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Neill Turner
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-05-10 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: ! '== DESCRIPTION:
15
+
16
+
17
+ ssh driver for test-kitchen for any running server with an ip address
18
+
19
+
20
+ == FEATURES:
21
+
22
+
23
+ ssh driver for test-kitchen for any running server with an ip address
24
+
25
+
26
+ '
27
+ email:
28
+ - neillwturner@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE.txt
34
+ - README.md
35
+ - kitchen-ssh.gemspec
36
+ - lib/kitchen/driver/ssh.rb
37
+ - lib/kitchen/ssh/version.rb
38
+ homepage: https://github.com/neillturner/kitchen-ssh
39
+ licenses: []
40
+ post_install_message:
41
+ rdoc_options: []
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project: ! '[none]'
58
+ rubygems_version: 1.8.28
59
+ signing_key:
60
+ specification_version: 3
61
+ summary: ssh driver for test-kitchen for any running server with an ip address
62
+ test_files: []