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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +6 -3
- data/config/cucumber.yaml +2 -1
- data/features/cli/debug.feature +7 -1
- data/features/cli/dry_run.feature +5 -0
- data/features/cli/error_reporting.feature +1 -1
- data/features/cli/usage.feature +6 -10
- data/features/cli/verbose.feature +5 -0
- data/features/recipe/errors.feature +9 -0
- data/features/ssh/config.feature +1 -1
- data/features/steps/environment_steps.rb +3 -0
- data/lib/producer/core/action.rb +5 -7
- data/lib/producer/core/actions/file_append.rb +1 -1
- data/lib/producer/core/actions/file_writer.rb +1 -2
- data/lib/producer/core/actions/mkdir.rb +4 -4
- data/lib/producer/core/actions/shell_command.rb +1 -1
- data/lib/producer/core/actions/yaml_writer.rb +1 -2
- data/lib/producer/core/cli.rb +48 -37
- data/lib/producer/core/condition.rb +3 -3
- data/lib/producer/core/env.rb +5 -4
- data/lib/producer/core/error_formatter.rb +13 -14
- data/lib/producer/core/errors.rb +1 -0
- data/lib/producer/core/logger_formatter.rb +3 -4
- data/lib/producer/core/prompter.rb +4 -4
- data/lib/producer/core/recipe/file_evaluator.rb +3 -3
- data/lib/producer/core/recipe.rb +10 -10
- data/lib/producer/core/remote/environment.rb +1 -1
- data/lib/producer/core/remote/fs.rb +10 -10
- data/lib/producer/core/remote.rb +13 -7
- data/lib/producer/core/task.rb +15 -9
- data/lib/producer/core/template.rb +9 -10
- data/lib/producer/core/test.rb +1 -1
- data/lib/producer/core/testing/aruba_program_wrapper.rb +2 -2
- data/lib/producer/core/testing/cucumber/output_steps.rb +12 -0
- data/lib/producer/core/testing/cucumber/recipe_steps.rb +5 -5
- data/lib/producer/core/testing/cucumber/remote_steps.rb +8 -8
- data/lib/producer/core/testing/cucumber.rb +3 -3
- data/lib/producer/core/testing/mock_remote.rb +27 -25
- data/lib/producer/core/tests/condition_test.rb +1 -1
- data/lib/producer/core/tests/file_contains.rb +2 -3
- data/lib/producer/core/tests/file_eq.rb +1 -2
- data/lib/producer/core/tests/file_match.rb +1 -2
- data/lib/producer/core/tests/has_env.rb +3 -6
- data/lib/producer/core/tests/has_executable.rb +1 -1
- data/lib/producer/core/tests/shell_command_status.rb +1 -1
- data/lib/producer/core/version.rb +1 -1
- data/lib/producer/core/worker.rb +7 -7
- data/lib/producer/core.rb +0 -1
- data/producer-core.gemspec +2 -2
- data/spec/producer/core/cli_spec.rb +29 -4
- data/spec/producer/core/remote_spec.rb +9 -1
- data/spec/producer/core/testing/mock_remote_spec.rb +5 -4
- 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
|
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) }
|
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
|
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.
|
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-
|
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.
|
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.
|
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:
|
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:
|
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
|