blazing 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +13 -2
- data/blazing.gemspec +2 -2
- data/lib/blazing/recipe.rb +4 -0
- data/lib/blazing/runner.rb +1 -1
- data/lib/blazing/templates/config.erb +1 -1
- data/lib/blazing/version.rb +1 -1
- data/spec/blazing/integration/update_spec.rb +3 -0
- data/spec/blazing/recipe_spec.rb +18 -0
- metadata +24 -24
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
...
|
4
4
|
|
5
|
+
## 0.2.0 - October 27, 2011
|
6
|
+
|
7
|
+
* Recipes accept target specific options (RECIPE API CHANGED! See [this commit](https://github.com/effkay/blazing/commit/f7fe22b822c00b55db6f2a870d67b449fcb7fce1) for details)
|
8
|
+
|
5
9
|
## 0.1.3 - October 25, 2011
|
6
10
|
|
7
11
|
* fix erros in hook and improve its logging
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
*Oh no, yet another deployer!*
|
6
6
|
|
7
|
-
Not everyone can or wants to deploy on heroku. But now you can have the same awesomely smooth git push deploys on whatever server you have SSH access to.
|
7
|
+
Not everyone can or wants to deploy on heroku. But now you can have the same (well, almost the same, since we're not gonna patch SSH) awesomely smooth git push deploys on whatever server you have SSH access to.
|
8
8
|
|
9
9
|
## Quickstart
|
10
10
|
|
@@ -91,7 +91,18 @@ I would like to add recipes that encapuslate common deployment strategies to bla
|
|
91
91
|
* recipes should live in gems called `blazing-<somename>`
|
92
92
|
* blazing converts the symbol given in the config to the class name and calls run on it. So if you have `recipe :passenger_restart` blazing will try to run `Blazing::Recipe::PassengerRestart.run` with the options provided.
|
93
93
|
* Recipes should live in the `Blazing::Recipe` namespace and inherit from `Blazing::Recipe` as well
|
94
|
-
* Recipes are run in the order they are specified in the config, so there is no way to handle inter-recipe dependencies yet.
|
94
|
+
* Recipes are run in the order they are specified in the config, so there is no way to handle inter-recipe dependencies yet.
|
95
|
+
* A minimal recipe implementation might look like this:
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
class Blazing::Recipe::Example < Blazing::Recipe
|
99
|
+
def run(target_options = {})
|
100
|
+
super target_options
|
101
|
+
# do some stuff
|
102
|
+
# access options with @options[:key]
|
103
|
+
end
|
104
|
+
end
|
105
|
+
```
|
95
106
|
|
96
107
|
## Authors
|
97
108
|
|
data/blazing.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Felipe Kaufmann"]
|
9
9
|
s.email = ["felipekaufmann@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/effkay/blazing"
|
11
|
-
s.summary = %q{
|
12
|
-
s.description = %q{git push
|
11
|
+
s.summary = %q{git push deployment helper}
|
12
|
+
s.description = %q{painless git push deployments for everyone}
|
13
13
|
|
14
14
|
s.rubyforge_project = "blazing"
|
15
15
|
|
data/lib/blazing/recipe.rb
CHANGED
data/lib/blazing/runner.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
# Define possible deploy targets:
|
12
12
|
#
|
13
13
|
# target :production, 'blazing@production.server.com:/where/your/code/is/shipped/to'
|
14
|
-
# target :staging, 'blazing@production.server.com:/where/your/code/is/shipped/to', :default => true
|
14
|
+
# target :staging, 'blazing@production.server.com:/where/your/code/is/shipped/to', :default => true, :some_option => 'foo' # note: options defined here will override options defined globally for a recipe
|
15
15
|
|
16
16
|
#
|
17
17
|
# Optional: RVM handling
|
data/lib/blazing/version.rb
CHANGED
@@ -40,6 +40,9 @@ describe 'blazing update' do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'adds a git remote for each target' do
|
43
|
+
@shell_double = double('shell', :run => true)
|
44
|
+
@target = @config.default_target
|
45
|
+
@target.instance_variable_set('@shell', @shell_double)
|
43
46
|
capture(:stdout) { @runner.exec('update') }
|
44
47
|
Grit::Repo.new(Dir.pwd).config['remote.production.url'].should == @production_url
|
45
48
|
end
|
data/spec/blazing/recipe_spec.rb
CHANGED
@@ -6,6 +6,9 @@ describe Blazing::Recipe do
|
|
6
6
|
describe '.init_by_name' do
|
7
7
|
before :each do
|
8
8
|
class Blazing::Recipe::Dummy < Blazing::Recipe
|
9
|
+
def run(target_options = {})
|
10
|
+
super target_options
|
11
|
+
end
|
9
12
|
end
|
10
13
|
end
|
11
14
|
|
@@ -40,4 +43,19 @@ describe Blazing::Recipe do
|
|
40
43
|
|
41
44
|
end
|
42
45
|
|
46
|
+
describe '#run' do
|
47
|
+
|
48
|
+
before :each do
|
49
|
+
@dummy_recipe = Blazing::Recipe::Dummy.new(:some_option => 'global')
|
50
|
+
@config = Blazing::Config.new
|
51
|
+
@config.target(:production, @production_url, :some_option => 'target-specific')
|
52
|
+
@config.instance_variable_set('@recipes', [@dummy_recipe])
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'overrides global recipe options with target options' do
|
56
|
+
@dummy_recipe.run(:some_option => 'target-specific')
|
57
|
+
@dummy_recipe.instance_variable_get('@options')[:some_option].should == 'target-specific'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
43
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-27 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &70202482807140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70202482807140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70202482806620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70202482806620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70202482806200 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70202482806200
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard
|
49
|
-
requirement: &
|
49
|
+
requirement: &70202482805740 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70202482805740
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70202482805320 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70202482805320
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl
|
71
|
-
requirement: &
|
71
|
+
requirement: &70202482804880 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70202482804880
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rb-fsevent
|
82
|
-
requirement: &
|
82
|
+
requirement: &70202482804460 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70202482804460
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: grit
|
93
|
-
requirement: &
|
93
|
+
requirement: &70202482804040 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70202482804040
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: activesupport
|
104
|
-
requirement: &
|
104
|
+
requirement: &70202482803620 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70202482803620
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: i18n
|
115
|
-
requirement: &
|
115
|
+
requirement: &70202482803200 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,8 +120,8 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
124
|
-
description: git push
|
123
|
+
version_requirements: *70202482803200
|
124
|
+
description: painless git push deployments for everyone
|
125
125
|
email:
|
126
126
|
- felipekaufmann@gmail.com
|
127
127
|
executables:
|
@@ -189,7 +189,7 @@ rubyforge_project: blazing
|
|
189
189
|
rubygems_version: 1.8.10
|
190
190
|
signing_key:
|
191
191
|
specification_version: 3
|
192
|
-
summary:
|
192
|
+
summary: git push deployment helper
|
193
193
|
test_files:
|
194
194
|
- spec/blazing/config_spec.rb
|
195
195
|
- spec/blazing/integration/init_spec.rb
|