producer-core 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +6 -3
  4. data/config/cucumber.yaml +2 -1
  5. data/features/cli/debug.feature +7 -1
  6. data/features/cli/dry_run.feature +5 -0
  7. data/features/cli/error_reporting.feature +1 -1
  8. data/features/cli/usage.feature +6 -10
  9. data/features/cli/verbose.feature +5 -0
  10. data/features/recipe/errors.feature +9 -0
  11. data/features/ssh/config.feature +1 -1
  12. data/features/steps/environment_steps.rb +3 -0
  13. data/lib/producer/core/action.rb +5 -7
  14. data/lib/producer/core/actions/file_append.rb +1 -1
  15. data/lib/producer/core/actions/file_writer.rb +1 -2
  16. data/lib/producer/core/actions/mkdir.rb +4 -4
  17. data/lib/producer/core/actions/shell_command.rb +1 -1
  18. data/lib/producer/core/actions/yaml_writer.rb +1 -2
  19. data/lib/producer/core/cli.rb +48 -37
  20. data/lib/producer/core/condition.rb +3 -3
  21. data/lib/producer/core/env.rb +5 -4
  22. data/lib/producer/core/error_formatter.rb +13 -14
  23. data/lib/producer/core/errors.rb +1 -0
  24. data/lib/producer/core/logger_formatter.rb +3 -4
  25. data/lib/producer/core/prompter.rb +4 -4
  26. data/lib/producer/core/recipe/file_evaluator.rb +3 -3
  27. data/lib/producer/core/recipe.rb +10 -10
  28. data/lib/producer/core/remote/environment.rb +1 -1
  29. data/lib/producer/core/remote/fs.rb +10 -10
  30. data/lib/producer/core/remote.rb +13 -7
  31. data/lib/producer/core/task.rb +15 -9
  32. data/lib/producer/core/template.rb +9 -10
  33. data/lib/producer/core/test.rb +1 -1
  34. data/lib/producer/core/testing/aruba_program_wrapper.rb +2 -2
  35. data/lib/producer/core/testing/cucumber/output_steps.rb +12 -0
  36. data/lib/producer/core/testing/cucumber/recipe_steps.rb +5 -5
  37. data/lib/producer/core/testing/cucumber/remote_steps.rb +8 -8
  38. data/lib/producer/core/testing/cucumber.rb +3 -3
  39. data/lib/producer/core/testing/mock_remote.rb +27 -25
  40. data/lib/producer/core/tests/condition_test.rb +1 -1
  41. data/lib/producer/core/tests/file_contains.rb +2 -3
  42. data/lib/producer/core/tests/file_eq.rb +1 -2
  43. data/lib/producer/core/tests/file_match.rb +1 -2
  44. data/lib/producer/core/tests/has_env.rb +3 -6
  45. data/lib/producer/core/tests/has_executable.rb +1 -1
  46. data/lib/producer/core/tests/shell_command_status.rb +1 -1
  47. data/lib/producer/core/version.rb +1 -1
  48. data/lib/producer/core/worker.rb +7 -7
  49. data/lib/producer/core.rb +0 -1
  50. data/producer-core.gemspec +2 -2
  51. data/spec/producer/core/cli_spec.rb +29 -4
  52. data/spec/producer/core/remote_spec.rb +9 -1
  53. data/spec/producer/core/testing/mock_remote_spec.rb +5 -4
  54. metadata +10 -6
@@ -12,7 +12,7 @@ module Producer::Core
12
12
 
13
13
  describe '#session' do
14
14
  it 'raises an error to prevent real session usage' do
15
- expect { remote.session }.to raise_error
15
+ expect { remote.session }.to raise_error RuntimeError
16
16
  end
17
17
  end
18
18
 
@@ -21,7 +21,7 @@ module Producer::Core
21
21
  let(:command) { 'echo some arguments' }
22
22
 
23
23
  it 'returns command arguments ended by a record separator' do
24
- expect(remote.execute(command)).to eq "some arguments\n"
24
+ expect(remote.execute command).to eq "some arguments\n"
25
25
  end
26
26
  end
27
27
 
@@ -37,7 +37,8 @@ module Producer::Core
37
37
  let(:command) { 'false' }
38
38
 
39
39
  it 'raises a RemoteCommandExecutionError' do
40
- expect { remote.execute(command) }.to raise_error(RemoteCommandExecutionError)
40
+ expect { remote.execute(command) }
41
+ .to raise_error RemoteCommandExecutionError
41
42
  end
42
43
  end
43
44
 
@@ -55,7 +56,7 @@ module Producer::Core
55
56
 
56
57
  it 'raises a RemoteCommandExecutionError' do
57
58
  expect { remote.execute(command) }
58
- .to raise_error(RemoteCommandExecutionError)
59
+ .to raise_error RemoteCommandExecutionError
59
60
  end
60
61
  end
61
62
  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.7
4
+ version: 0.5.8
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-06 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: net-ssh
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.5'
75
+ version: '0.8'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.5'
82
+ version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: cucumber-sshd
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.1'
89
+ version: 1.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.1'
96
+ version: 1.1.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -141,12 +141,14 @@ files:
141
141
  - features/condition/negated_test.feature
142
142
  - features/condition/target.feature
143
143
  - features/recipe/compose_macro.feature
144
+ - features/recipe/errors.feature
144
145
  - features/recipe/macro.feature
145
146
  - features/recipe/registry.feature
146
147
  - features/recipe/source.feature
147
148
  - features/recipe/target.feature
148
149
  - features/recipe/test_macro.feature
149
150
  - features/ssh/config.feature
151
+ - features/steps/environment_steps.rb
150
152
  - features/support/env.rb
151
153
  - features/task/ask.feature
152
154
  - features/task/condition.feature
@@ -298,12 +300,14 @@ test_files:
298
300
  - features/condition/negated_test.feature
299
301
  - features/condition/target.feature
300
302
  - features/recipe/compose_macro.feature
303
+ - features/recipe/errors.feature
301
304
  - features/recipe/macro.feature
302
305
  - features/recipe/registry.feature
303
306
  - features/recipe/source.feature
304
307
  - features/recipe/target.feature
305
308
  - features/recipe/test_macro.feature
306
309
  - features/ssh/config.feature
310
+ - features/steps/environment_steps.rb
307
311
  - features/support/env.rb
308
312
  - features/task/ask.feature
309
313
  - features/task/condition.feature