producer-core 0.5.5 → 0.5.6

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: aa873a01c9503983443874f3bcdf325e418b506f
4
- data.tar.gz: ebf1fcb7e63d7f65e2f85934c1f0f355c04ccc1f
3
+ metadata.gz: 1562ccd46ac4e15cb192a45e7bac645abad868e0
4
+ data.tar.gz: 432f32434041e849bd40c2216ac885af36f1c62a
5
5
  SHA512:
6
- metadata.gz: e82bc509678827303e509e0e4db52a132edee82d28c0fc05866f9446a12e3316f9c074c9bc1fb1cebc2a5d4179ee7ff557f1fddbf28bb56822d09a7a033afafe
7
- data.tar.gz: ef832213163e3236c3b90eed9c97e98ce44cb199558ccf56809e187a149ef5f3c7c587385d86acd453deb184bcad83e93a69aeb1199a604fdacf440212734dd0
6
+ metadata.gz: 479bee4cd4014c25bd2c1ed3c5852349801feaae7e3e7bdbfc4e89f473213503f6de92ddd13ac10bea0523b9f3742d608b1bac58fb30349cbb36a348521b6e28
7
+ data.tar.gz: cf981aa48ea6f7ebfd3e17d90353dc51c208839302d5ef44499a90bbff4c97d6d141331c0531143f2dfa5cc0f808fe1fcea9d88a5ad61919664d90f30dd6def8
data/.travis.yml CHANGED
@@ -6,3 +6,9 @@ rvm:
6
6
  - ruby-head
7
7
  - 2.1
8
8
  script: bundle exec rake ci
9
+ before_script:
10
+ - ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
11
+ - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
12
+ - chmod 600 ~/.ssh/authorized_keys
13
+ - eval `ssh-agent -s`
14
+ - ssh-add ~/.ssh/id_rsa
data/Rakefile CHANGED
@@ -6,8 +6,8 @@ task default: %i[features spec]
6
6
  Cucumber::Rake::Task.new(:features)
7
7
 
8
8
  Cucumber::Rake::Task.new(:features_no_sshd) do |t|
9
- t.instance_eval { @desc << ' excluding @sshd'}
10
- t.cucumber_opts = '--tags ~@sshd'
9
+ t.instance_eval { @desc << ' excluding @ci_skip' }
10
+ t.cucumber_opts = '--tags ~@ci_skip'
11
11
  end
12
12
 
13
13
  RSpec::Core::RakeTask.new(:spec)
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `file_append' task action
3
3
 
4
4
  Background:
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `file_replace_content' task action
3
3
 
4
4
  Background:
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `file_write' task action
3
3
 
4
4
  Background:
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `mkdir' task action
3
3
 
4
4
  Background:
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `sh' task action
3
3
 
4
4
  Scenario: forwards standard ouput
@@ -1,4 +1,4 @@
1
- @sshd @mocked_home_directory
1
+ @sshd
2
2
  Feature: `yaml_write' task action
3
3
 
4
4
  Background:
@@ -18,7 +18,7 @@ Feature: `test_macro' recipe keyword
18
18
  Then the output must contain "2"
19
19
  And the output must not contain "1"
20
20
 
21
- @sshd @mocked_home_directory
21
+ @sshd
22
22
  Scenario: has access to core tests
23
23
  Given a recipe with:
24
24
  """
@@ -14,7 +14,7 @@ Feature: SSH settings
14
14
  When I successfully execute the recipe
15
15
  Then the output must contain my current login name
16
16
 
17
- @fake_home
17
+ @mocked_home_directory
18
18
  Scenario: uses configured SSH user name for a given host
19
19
  Given an SSH config with:
20
20
  """
@@ -37,6 +37,7 @@ Feature: `env?' condition keyword
37
37
  When I successfully execute the recipe on remote target
38
38
  Then the output must not contain "definition_ko"
39
39
 
40
+ @ci_skip
40
41
  Scenario: succeeds when remote environment variable value match
41
42
  When I successfully execute the recipe on remote target
42
43
  Then the output must contain "value_ok"
@@ -14,8 +14,7 @@ module Producer
14
14
  else
15
15
  klass = test
16
16
  end
17
- t = klass.new(@env, *args, negated: negated)
18
- @tests << t
17
+ @tests << klass.new(@env, *args, negated: negated)
19
18
  end
20
19
  end
21
20
  end
@@ -28,11 +28,9 @@ module Producer
28
28
  alias get []
29
29
 
30
30
  def logger
31
- @logger ||= begin
32
- logger = Logger.new(output)
33
- logger.level = verbose? ? Logger::INFO : Logger::WARN
34
- logger.formatter = LoggerFormatter.new
35
- logger
31
+ @logger ||= Logger.new(output).tap do |o|
32
+ o.level = verbose? ? Logger::INFO : Logger::WARN
33
+ o.formatter = LoggerFormatter.new
36
34
  end
37
35
  end
38
36
 
@@ -7,7 +7,9 @@ def run_recipe(remote: false, options: nil, check: false, rargv: nil)
7
7
  command << options if options
8
8
  command << ['--', *rargv] if rargv
9
9
 
10
- run_simple command.join(' '), false
10
+ with_env 'HOME' => File.expand_path(current_dir) do
11
+ run_simple command.join(' '), false
12
+ end
11
13
 
12
14
  assert_exit_status 0 if check
13
15
  assert_matching_output '\ASocketError', all_output if remote == :unknown
@@ -26,11 +26,6 @@ Before('~@exec') do
26
26
  Aruba.process = Aruba::InProcess
27
27
  end
28
28
 
29
- # Fake home directory for @fake_home tagged scenarios.
30
- Before('@fake_home') do
31
- ENV['HOME'] = File.expand_path(current_dir)
32
- end
33
-
34
29
  # Enable cucumber-sshd "fast" mode (persists sshd across scenarios), and
35
30
  # register hooks for @sshd tagged scenarios.
36
31
  Before do
@@ -1,5 +1,5 @@
1
1
  module Producer
2
2
  module Core
3
- VERSION = '0.5.5'.freeze
3
+ VERSION = '0.5.6'.freeze
4
4
  end
5
5
  end
@@ -23,6 +23,6 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency 'rspec', '~> 3.1'
24
24
  s.add_development_dependency 'cucumber', '~> 2.0'
25
25
  s.add_development_dependency 'aruba', '~> 0.5'
26
- s.add_development_dependency 'cucumber-sshd', '~> 1.0'
26
+ s.add_development_dependency 'cucumber-sshd', '~> 1.1'
27
27
  s.add_development_dependency 'rake', '~> 10.1'
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: producer-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
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-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.0'
89
+ version: '1.1'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.0'
96
+ version: '1.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -368,4 +368,3 @@ test_files:
368
368
  - spec/support/shared_action.rb
369
369
  - spec/support/shared_test.rb
370
370
  - spec/support/test_env_helpers.rb
371
- has_rdoc: