foreplay 0.7.6 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +28 -25
- data/.ruby-version +1 -1
- data/foreplay.gemspec +12 -14
- data/lib/foreplay/cli.rb +42 -43
- data/lib/foreplay/engine/remote.rb +121 -0
- data/lib/foreplay/engine/role.rb +23 -0
- data/lib/foreplay/engine/server.rb +123 -0
- data/lib/foreplay/engine/step.rb +52 -0
- data/lib/foreplay/engine/steps.yml +75 -0
- data/lib/foreplay/engine.rb +138 -0
- data/lib/foreplay/foreplay.rb +10 -0
- data/lib/foreplay/launcher.rb +13 -0
- data/lib/foreplay/setup.rb +24 -26
- data/lib/foreplay/version.rb +1 -1
- data/lib/foreplay.rb +7 -3
- data/lib/string.rb +17 -0
- data/spec/lib/foreplay/deploy_spec.rb +79 -24
- data/spec/lib/foreplay/engine_spec.rb +32 -0
- data/spec/lib/foreplay/setup_spec.rb +1 -1
- metadata +47 -60
- data/lib/foreplay/deploy.rb +0 -395
- data/lib/foreplay/utility.rb +0 -30
- data/spec/lib/foreplay/utility_spec.rb +0 -28
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'foreplay'
|
3
|
-
|
4
|
-
describe Foreplay::Utility do
|
5
|
-
it 'should complain unless two hashes are passed to it' do
|
6
|
-
expect { Foreplay::Utility.supermerge('x', 'y') }.to raise_error(RuntimeError)
|
7
|
-
end
|
8
|
-
|
9
|
-
it 'should merge two simple hashes' do
|
10
|
-
expect(Foreplay::Utility.supermerge({ a: 'x' }, b: 'y')).to eq('a' => 'x', 'b' => 'y')
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'should merge two hashes both with arrays at the same key' do
|
14
|
-
expect(Foreplay::Utility.supermerge({ a: ['x'] }, a: ['y'])).to eq('a' => %w(x y))
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'should merge an array and a value at the same key' do
|
18
|
-
expect(Foreplay::Utility.supermerge({ a: 'x' }, a: ['y'])).to eq('a' => %w(x y))
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'should replace a value at the same key' do
|
22
|
-
expect(Foreplay::Utility.supermerge({ a: 'x' }, a: 'y')).to eq('a' => 'y')
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'should merge two subhashes at the same key' do
|
26
|
-
expect(Foreplay::Utility.supermerge({ a: { b: 'x' } }, a: { c: 'y' })).to eq('a' => { 'b' => 'x', 'c' => 'y' })
|
27
|
-
end
|
28
|
-
end
|