cucumber-sshd 1.1.0 → 1.1.1

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: f56e971d95f3760c3b7fc55e9dae3e329d7b4931
4
- data.tar.gz: f0e4c1ad873b771f9c60a2663da310cafce911d5
3
+ metadata.gz: 321a4a141c1314bef669e2deafa3204f4eb34c42
4
+ data.tar.gz: 8f60fe0b843ac59113362ac7acb8f4bea807dfa2
5
5
  SHA512:
6
- metadata.gz: f91d36d8c6c61d9856dd8851f1736d2243371dfbb98981e108f9124a437e4857875d4df4363787de9bcad55494e88c0c2934261bb63bc3083d0baf4975dacf78
7
- data.tar.gz: 160eb4ca89a9d7bf3c489f122c7794d7cad97d59b2a087820d85b69cdd7ac34efdcaa379f6564d2b66c73e2900b5f65c01b4abb0baa1ba6ccca2f8c2380fa059
6
+ metadata.gz: 7cb263a11ea35d808abcb98f7ffd7bd79f9fa67bbb378556e8db8752595f22ce359d39d46fcae4e3b4a9454bc7e8b8eb3410afe4f15a198e455f0c250c11c4a2
7
+ data.tar.gz: ddb13966299aee8cf69c790c5b0628a58f951a486a7814b6aa38c180289a61c3cf382e354ee7241c0fff7c0275a82888cc2b967fbe8e4f5fe1ae5f2f5fe1af56
@@ -2,7 +2,7 @@ require 'cucumber/sshd/server'
2
2
 
3
3
  Before('@sshd') do
4
4
  start_server = proc do
5
- Cucumber::SSHD::Server.start(current_dir, wait_ready: @_sshd_wait_ready)
5
+ Cucumber::SSHD::Server.start(expand_path('.'), wait_ready: @_sshd_wait_ready)
6
6
  end
7
7
 
8
8
  if @_sshd_fast && !$_sshd
@@ -46,7 +46,7 @@ module Cucumber
46
46
  end
47
47
 
48
48
  def start
49
- in_current_dir do
49
+ cd '.' do
50
50
  @pid = fork do
51
51
  $stderr.reopen '/dev/null'
52
52
  exec command
@@ -134,12 +134,12 @@ Host #{host}
134
134
 
135
135
  def write_file_secure(path, content)
136
136
  write_file path, content
137
- filesystem_permissions 0600, path
137
+ chmod 0600, path
138
138
  end
139
139
 
140
140
  def create_dir_secure(path)
141
- create_dir path
142
- filesystem_permissions 0700, path
141
+ create_directory path
142
+ chmod 0700, path
143
143
  end
144
144
 
145
145
  def sftp_server_path
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module SSHD
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-sshd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibault Jouan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-05 00:00:00.000000000 Z
11
+ date: 2015-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
19
+ version: '0.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.6'
26
+ version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cucumber
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,23 +58,13 @@ executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
- - ".gitignore"
62
- - ".travis.yml"
63
- - Gemfile
64
- - LICENSE
65
- - README.md
66
- - Rakefile
67
- - cucumber-sshd.gemspec
68
- - features/sshd_tag.feature
69
- - features/steps/output_steps.rb
70
- - features/steps/run_steps.rb
71
- - features/support/env.rb
72
61
  - lib/cucumber/sshd.rb
73
62
  - lib/cucumber/sshd/cucumber.rb
74
63
  - lib/cucumber/sshd/server.rb
75
64
  - lib/cucumber/sshd/version.rb
76
65
  homepage: https://rubygems.org/gems/cucumber-sshd
77
- licenses: []
66
+ licenses:
67
+ - BSD-3-Clause
78
68
  metadata: {}
79
69
  post_install_message:
80
70
  rdoc_options: []
@@ -97,4 +87,3 @@ signing_key:
97
87
  specification_version: 4
98
88
  summary: Cucumber sshd helpers
99
89
  test_files: []
100
- has_rdoc:
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- /Gemfile-custom.rb
2
- /Gemfile.lock
3
- /tmp/
@@ -1,13 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.2
6
- - ruby-head
7
- - 2.1
8
- before_script:
9
- - ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
10
- - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
11
- - chmod 600 ~/.ssh/authorized_keys
12
- - eval `ssh-agent -s`
13
- - ssh-add ~/.ssh/id_rsa
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- eval File.read('Gemfile-custom.rb') if File.exist?('Gemfile-custom.rb')
data/LICENSE DELETED
@@ -1,30 +0,0 @@
1
- Copyright 2013 Thibault Jouan. All rights reserved.
2
-
3
- Redistribution and use in source and binary forms, with or without
4
- modification, are permitted provided that the following conditions are
5
- met:
6
-
7
- * Redistributions of source code must retain the above copyright
8
- notice, this list of conditions and the following disclaimer.
9
-
10
- * Redistributions in binary form must reproduce the above copyright
11
- notice, this list of conditions and the following disclaimer in
12
- the documentation and/or other materials provided with the
13
- distribution.
14
-
15
- * Neither the name of the software nor the names of its contributors
16
- may be used to endorse or promote products derived from this
17
- software without specific prior written permission.
18
-
19
-
20
- THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND
21
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
24
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md DELETED
@@ -1,52 +0,0 @@
1
- cucumber-sshd
2
- =============
3
-
4
- This ruby gem runs a "fake" sshd process for testing purpose in
5
- cucumber scenario tagged as `@sshd`. It is especially useful when
6
- testing programs with aruba, like a provisioning program that would
7
- connect through ssh for example.
8
-
9
- The process is real, but the HOME environment variable will be
10
- modified as aruba current directory, and the port changed so an
11
- unprivileged can open it. Host key pair is hard coded, output is
12
- silenced, server will only listen on localhost with sftp enabled, and
13
- a standard ssh config file is written in `.ssh/config`.
14
-
15
- Optionally, cucumber process will block until sshd accepts
16
- connection, and the same sshd process can also be configured to
17
- persist across the whole test suite for faster run.
18
-
19
-
20
- Warning
21
- -------
22
-
23
- * no test coverage
24
- * pollute cucumber contexts with multiple instance variables
25
- * pollute global context with a variable
26
- * uses `Kernel#at_exit` when `wait_ready` option is enabled
27
-
28
-
29
- Usage
30
- -----
31
-
32
- ### cucumber config
33
-
34
- ```ruby
35
- Before do
36
- # Persists the sshd process across tests (default is to start and
37
- # stop around each test).
38
- @_sshd_fast = true
39
-
40
- # Block cucumber process until sshd accepts new connections.
41
- @_sshd_wait_ready = true
42
- end
43
- require 'cucumber/sshd/cucumber'
44
- ```
45
-
46
- ### runtime config
47
-
48
- You can control the host name and the port with environment variables.
49
- Here are the defaults:
50
-
51
- SSHD_TEST_HOST=some_host.test
52
- SSHD_TEST_PORT=2222
data/Rakefile DELETED
@@ -1,5 +0,0 @@
1
- require 'cucumber/rake/task'
2
-
3
- task default: :features
4
-
5
- Cucumber::Rake::Task.new(:features)
@@ -1,19 +0,0 @@
1
- require File.expand_path('../lib/cucumber/sshd/version', __FILE__)
2
-
3
- Gem::Specification.new do |s|
4
- s.name = 'cucumber-sshd'
5
- s.version = Cucumber::SSHD::VERSION.dup
6
- s.summary = 'Cucumber sshd helpers'
7
- s.description = 'Run an sshd server for scenarios tagged with @sshd'
8
- s.homepage = 'https://rubygems.org/gems/cucumber-sshd'
9
-
10
- s.authors = 'Thibault Jouan'
11
- s.email = 'tj@a13.fr'
12
-
13
- s.files = `git ls-files`.split $/
14
-
15
- s.add_dependency 'aruba', '~> 0.6'
16
-
17
- s.add_development_dependency 'cucumber', '~> 2.0'
18
- s.add_development_dependency 'rake', '~> 10.4'
19
- end
@@ -1,30 +0,0 @@
1
- Feature: @sshd cucumber tag
2
-
3
- @sshd
4
- Scenario: allows connection to a running sshd
5
- When I run "echo \$SSH_CONNECTION" remotly
6
- Then the output must contain "2222"
7
-
8
- @sshd
9
- Scenario: logs the user in aruba current directory
10
- When I run "pwd" remotly
11
- Then the output must be aruba current directory
12
-
13
- @sshd
14
- Scenario: allows sftp usage
15
- When I run "bye" sftp command remotly
16
- Then the output must contain "Connected"
17
-
18
- @sshd
19
- Scenario: sources .ssh/rc on new session
20
- Given a file named ".ssh/rc" with:
21
- """
22
- echo some message
23
- """
24
- When I run "true" remotly
25
- Then the output must contain "some message"
26
-
27
- @sshd
28
- Scenario: silences sshd output
29
- When I run "true" remotly
30
- Then the output must be empty
@@ -1,11 +0,0 @@
1
- Then /^the output must contain "([^"]+)"$/ do |content|
2
- assert_partial_output content, all_output
3
- end
4
-
5
- Then /^the output must be empty$/ do
6
- assert_exact_output '', all_output
7
- end
8
-
9
- Then /^the output must be aruba current directory$/ do
10
- assert_exact_output File.expand_path(current_dir), all_output.chomp
11
- end
@@ -1,7 +0,0 @@
1
- When /^I run "([^"]+)" remotly$/ do |command|
2
- run_simple "ssh -F .ssh/config some_host.test #{command}", true
3
- end
4
-
5
- When /^I run "([^"]+)" sftp command remotly$/ do |command|
6
- run_simple "sh -c 'echo #{command} | sftp -F .ssh/config some_host.test'", true
7
- end
@@ -1,2 +0,0 @@
1
- require 'aruba/cucumber'
2
- require 'cucumber/sshd/cucumber'