blazing 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/CHANGELOG.md +10 -1
- data/README.md +1 -1
- data/lib/blazing/logger.rb +0 -1
- data/lib/blazing/target.rb +6 -1
- data/lib/blazing/version.rb +1 -1
- data/spec/blazing/config_spec.rb +2 -2
- data/spec/blazing/integration/init_spec.rb +1 -1
- data/spec/blazing/integration/recipes_run_spec.rb +1 -1
- data/spec/blazing/integration/setup_remote_spec.rb +2 -2
- data/spec/blazing/integration/update_spec.rb +3 -3
- data/spec/spec_helper.rb +15 -0
- metadata +30 -25
- data/Gemfile.lock +0 -56
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
## master
|
2
2
|
|
3
|
-
|
3
|
+
## 0.2.2 - November 1, 2011
|
4
|
+
|
5
|
+
* Changed the way the target repository is initialized so it works on
|
6
|
+
older git versions (Old git versions don't take a path as parameter
|
7
|
+
when doing git init)
|
8
|
+
|
9
|
+
## 0.2.1 - October 27, 2011
|
10
|
+
|
11
|
+
* Improved Logging: Hook and recipes are much more verbose, colored
|
12
|
+
output
|
4
13
|
|
5
14
|
## 0.2.0 - October 27, 2011
|
6
15
|
|
data/README.md
CHANGED
data/lib/blazing/logger.rb
CHANGED
data/lib/blazing/target.rb
CHANGED
@@ -44,8 +44,13 @@ class Blazing::Target
|
|
44
44
|
user[1] unless user.nil?
|
45
45
|
end
|
46
46
|
|
47
|
+
#
|
48
|
+
# Initialize an empty repository, so we can push to it
|
49
|
+
#
|
47
50
|
def init_repository
|
48
|
-
|
51
|
+
# Instead of git init with a path, so it does not fail on older
|
52
|
+
# git versions (https://github.com/effkay/blazing/issues/53)
|
53
|
+
"mkdir #{path} && cd #{path} && git init"
|
49
54
|
end
|
50
55
|
|
51
56
|
def copy_hook
|
data/lib/blazing/version.rb
CHANGED
data/spec/blazing/config_spec.rb
CHANGED
@@ -25,7 +25,7 @@ describe Blazing::Config do
|
|
25
25
|
|
26
26
|
describe '#default_target' do
|
27
27
|
|
28
|
-
it '
|
28
|
+
it 'returns a target object if only one is present' do
|
29
29
|
config = Blazing::Config.new
|
30
30
|
config.target :sometarget, 'somewhere'
|
31
31
|
config.default_target.name.should be :sometarget
|
@@ -40,7 +40,7 @@ describe Blazing::Config do
|
|
40
40
|
lambda { config.default_target }.should raise_error
|
41
41
|
end
|
42
42
|
|
43
|
-
it '
|
43
|
+
it 'returns the target object with :default => true option if more than 1 target present' do
|
44
44
|
config = Blazing::Config.new
|
45
45
|
config.target :sometarget, 'somewhere', :default => true
|
46
46
|
config.target :someothertarget, 'somewhere'
|
@@ -24,9 +24,9 @@ describe 'blazing setup' do
|
|
24
24
|
@shell = Blazing::Shell.new
|
25
25
|
@target = @config.default_target
|
26
26
|
@target.instance_variable_set('@shell', @shell)
|
27
|
-
@shell.should_receive(:run).with("ssh user@host '
|
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
28
|
@target.should_receive(:apply_hook)
|
29
|
-
|
29
|
+
@runner.exec('setup')
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
@@ -25,7 +25,7 @@ describe 'blazing update' do
|
|
25
25
|
@target = @config.default_target
|
26
26
|
@target.instance_variable_set('@shell', @shell_double)
|
27
27
|
@shell_double.stub(:run)
|
28
|
-
|
28
|
+
@runner.exec('update')
|
29
29
|
File.exists?(Blazing::TMP_HOOK).should be true
|
30
30
|
end
|
31
31
|
|
@@ -36,14 +36,14 @@ describe 'blazing update' do
|
|
36
36
|
|
37
37
|
@shell_double.should_receive(:run).once.with("scp /tmp/post-receive user@host:/some/where/else/.git/hooks/post-receive")
|
38
38
|
@shell_double.should_receive(:run).once.with('ssh user@host chmod +x /some/where/else/.git/hooks/post-receive')
|
39
|
-
|
39
|
+
@runner.exec('update')
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'adds a git remote for each target' do
|
43
43
|
@shell_double = double('shell', :run => true)
|
44
44
|
@target = @config.default_target
|
45
45
|
@target.instance_variable_set('@shell', @shell_double)
|
46
|
-
|
46
|
+
@runner.exec('update')
|
47
47
|
Grit::Repo.new(Dir.pwd).config['remote.production.url'].should == @production_url
|
48
48
|
end
|
49
49
|
|
data/spec/spec_helper.rb
CHANGED
@@ -6,6 +6,21 @@ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File:
|
|
6
6
|
# Stuff borrowed from carlhuda/bundler
|
7
7
|
#
|
8
8
|
RSpec.configure do |config|
|
9
|
+
|
10
|
+
#
|
11
|
+
# Reset Logger
|
12
|
+
#
|
13
|
+
Logging.appenders.reset
|
14
|
+
Logging.appenders.string_io(
|
15
|
+
'string_io',
|
16
|
+
:layout => Logging.layouts.pattern(
|
17
|
+
:pattern => ' ------> [blazing] %-5l: %m\n',
|
18
|
+
:color_scheme => 'bright'
|
19
|
+
)
|
20
|
+
)
|
21
|
+
|
22
|
+
Logging.logger.root.appenders = 'string_io'
|
23
|
+
|
9
24
|
def capture(stream)
|
10
25
|
begin
|
11
26
|
stream = stream.to_s
|
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.2.
|
4
|
+
version: 0.2.2
|
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-
|
12
|
+
date: 2011-11-01 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &70257179938420 !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: *70257179938420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70257179936860 !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: *70257179936860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70257179935940 !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: *70257179935940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard
|
49
|
-
requirement: &
|
49
|
+
requirement: &70257179934860 !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: *70257179934860
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70257179933840 !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: *70257179933840
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl
|
71
|
-
requirement: &
|
71
|
+
requirement: &70257179930900 !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: *70257179930900
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rb-fsevent
|
82
|
-
requirement: &
|
82
|
+
requirement: &70257179929200 !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: *70257179929200
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: grit
|
93
|
-
requirement: &
|
93
|
+
requirement: &70257176134580 !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: *70257176134580
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: logging
|
104
|
-
requirement: &
|
104
|
+
requirement: &70257176133420 !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: *70257176133420
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: activesupport
|
115
|
-
requirement: &
|
115
|
+
requirement: &70257176131620 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70257176131620
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: i18n
|
126
|
-
requirement: &
|
126
|
+
requirement: &70257176129780 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70257176129780
|
135
135
|
description: painless git push deployments for everyone
|
136
136
|
email:
|
137
137
|
- felipekaufmann@gmail.com
|
@@ -144,7 +144,6 @@ files:
|
|
144
144
|
- .rvmrc
|
145
145
|
- CHANGELOG.md
|
146
146
|
- Gemfile
|
147
|
-
- Gemfile.lock
|
148
147
|
- Guardfile
|
149
148
|
- MIT-LICENCE
|
150
149
|
- README.md
|
@@ -188,12 +187,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
187
|
- - ! '>='
|
189
188
|
- !ruby/object:Gem::Version
|
190
189
|
version: '0'
|
190
|
+
segments:
|
191
|
+
- 0
|
192
|
+
hash: -3536018544391299654
|
191
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
194
|
none: false
|
193
195
|
requirements:
|
194
196
|
- - ! '>='
|
195
197
|
- !ruby/object:Gem::Version
|
196
198
|
version: '0'
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
hash: -3536018544391299654
|
197
202
|
requirements: []
|
198
203
|
rubyforge_project: blazing
|
199
204
|
rubygems_version: 1.8.10
|
data/Gemfile.lock
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
blazing (0.2.1)
|
5
|
-
activesupport
|
6
|
-
grit
|
7
|
-
i18n
|
8
|
-
logging
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: http://rubygems.org/
|
12
|
-
specs:
|
13
|
-
activesupport (3.1.1)
|
14
|
-
multi_json (~> 1.0)
|
15
|
-
diff-lcs (1.1.3)
|
16
|
-
grit (2.4.1)
|
17
|
-
diff-lcs (~> 1.1)
|
18
|
-
mime-types (~> 1.15)
|
19
|
-
growl (1.0.3)
|
20
|
-
guard (0.8.4)
|
21
|
-
thor (~> 0.14.6)
|
22
|
-
guard-rspec (0.5.0)
|
23
|
-
guard (>= 0.8.4)
|
24
|
-
i18n (0.6.0)
|
25
|
-
json (1.6.1)
|
26
|
-
little-plugger (1.1.2)
|
27
|
-
logging (1.6.1)
|
28
|
-
little-plugger (>= 1.1.2)
|
29
|
-
mime-types (1.17.2)
|
30
|
-
multi_json (1.0.3)
|
31
|
-
rake (0.9.2)
|
32
|
-
rb-fsevent (0.4.0)
|
33
|
-
rdoc (3.10)
|
34
|
-
json (~> 1.4)
|
35
|
-
rspec (2.6.0)
|
36
|
-
rspec-core (~> 2.6.0)
|
37
|
-
rspec-expectations (~> 2.6.0)
|
38
|
-
rspec-mocks (~> 2.6.0)
|
39
|
-
rspec-core (2.6.4)
|
40
|
-
rspec-expectations (2.6.0)
|
41
|
-
diff-lcs (~> 1.1.2)
|
42
|
-
rspec-mocks (2.6.0)
|
43
|
-
thor (0.14.6)
|
44
|
-
|
45
|
-
PLATFORMS
|
46
|
-
ruby
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
blazing!
|
50
|
-
growl
|
51
|
-
guard
|
52
|
-
guard-rspec
|
53
|
-
rake (~> 0.9.2)
|
54
|
-
rb-fsevent
|
55
|
-
rdoc
|
56
|
-
rspec
|