blazing 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +17 -0
- data/Guardfile +2 -4
- data/README.md +131 -44
- data/bin/blazing +2 -34
- data/blazing.gemspec +4 -2
- data/lib/blazing.rb +9 -1
- data/lib/blazing/cli.rb +65 -0
- data/lib/blazing/config.rb +13 -9
- data/lib/blazing/recipe.rb +4 -15
- data/lib/blazing/runner.rb +56 -36
- data/lib/blazing/shell.rb +1 -1
- data/lib/blazing/target.rb +41 -4
- data/lib/blazing/templates/config.erb +43 -17
- data/lib/blazing/templates/hook.erb +3 -3
- data/lib/blazing/version.rb +5 -1
- data/spec/blazing/config_spec.rb +4 -33
- data/spec/blazing/integration/init_spec.rb +1 -1
- data/spec/blazing/integration/{recipes_list_spec.rb → list_spec.rb} +2 -4
- data/spec/blazing/integration/{recipes_run_spec.rb → recipes_spec.rb} +8 -6
- data/spec/blazing/integration/setup_spec.rb +41 -0
- data/spec/blazing/integration/update_spec.rb +44 -49
- data/spec/blazing/recipe_spec.rb +2 -21
- data/spec/blazing/target_spec.rb +24 -0
- data/spec/spec_helper.rb +29 -10
- metadata +57 -32
- data/spec/blazing/integration/setup_remote_spec.rb +0 -32
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'blazing/config'
|
3
|
-
require 'blazing/runner'
|
4
|
-
require 'grit'
|
5
|
-
|
6
|
-
describe 'blazing setup' do
|
7
|
-
|
8
|
-
before :each do
|
9
|
-
setup_sandbox
|
10
|
-
@production_url = 'user@host:/some/where'
|
11
|
-
@staging_url = 'user@host:/some/where/else'
|
12
|
-
|
13
|
-
@config = Blazing::Config.new
|
14
|
-
@config.target :production, @production_url
|
15
|
-
@config.target :staging, @staging_url, :default => true
|
16
|
-
@runner = Blazing::Runner.new(@config)
|
17
|
-
end
|
18
|
-
|
19
|
-
after :each do
|
20
|
-
teardown_sandbox
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'clones the repository, configures it and updates the target' do
|
24
|
-
@shell = Blazing::Shell.new
|
25
|
-
@target = @config.default_target
|
26
|
-
@target.instance_variable_set('@shell', @shell)
|
27
|
-
@shell.should_receive(:run).with("ssh user@host 'mkdir /some/where/else; cd /some/where/else && git init && cd /some/where/else && git config receive.denyCurrentBranch ignore'")
|
28
|
-
@target.should_receive(:apply_hook)
|
29
|
-
@runner.exec('setup')
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|