blazing 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/blazing/config.rb +1 -1
- data/lib/blazing/target.rb +1 -1
- data/lib/blazing/templates/hook.erb +40 -30
- data/lib/blazing/version.rb +1 -1
- data/spec/blazing/config_spec.rb +14 -0
- data/spec/blazing/integration/setup_remote_spec.rb +1 -1
- metadata +30 -24
data/CHANGELOG.md
CHANGED
data/lib/blazing/config.rb
CHANGED
data/lib/blazing/target.rb
CHANGED
@@ -52,7 +52,7 @@ class Blazing::Target
|
|
52
52
|
def init_repository
|
53
53
|
# Instead of git init with a path, so it does not fail on older
|
54
54
|
# git versions (https://github.com/effkay/blazing/issues/53)
|
55
|
-
"mkdir #{path}
|
55
|
+
"mkdir #{path}; cd #{path} && git init"
|
56
56
|
end
|
57
57
|
|
58
58
|
def copy_hook
|
@@ -16,36 +16,46 @@ do
|
|
16
16
|
done
|
17
17
|
|
18
18
|
<% if @config.rvm %>
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
19
|
+
|
20
|
+
#
|
21
|
+
# Custom RVM script location?
|
22
|
+
#
|
23
|
+
<% if @config.rvm_scripts %>
|
24
|
+
|
25
|
+
source <%= @config.rvm_scripts %>
|
26
|
+
echo "------> [blazing] Loading rvmscripts from custom location"
|
27
|
+
|
28
|
+
#
|
29
|
+
# Normal RVM installation
|
30
|
+
#
|
31
|
+
<% else %>
|
32
|
+
# Load RVM into a shell session *as a function*
|
33
|
+
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
34
|
+
|
35
|
+
# First try to load from a user install
|
36
|
+
source "$HOME/.rvm/scripts/rvm"
|
37
|
+
|
38
|
+
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
39
|
+
|
40
|
+
# Then try to load from a root install
|
41
|
+
source "/usr/local/rvm/scripts/rvm"
|
42
|
+
|
43
|
+
else
|
44
|
+
echo '------> [blazing] ERROR: RVM was enabled in config but no RVM installation was not found\n'
|
45
|
+
fi
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
#
|
49
|
+
# Apply rvm env
|
50
|
+
#
|
51
|
+
<% if @config.rvm == :rvmrc %>
|
52
|
+
echo "------> [blazing] Loading rvm from .rvmrc"
|
53
|
+
source .rvmrc
|
54
|
+
<% else %>
|
55
|
+
echo "------> [blazing] Loading rvm string: <%= @config.rvm %>"
|
56
|
+
rvm use <%= @config.rvm %>
|
57
|
+
<% end %>
|
58
|
+
|
49
59
|
<% end %>
|
50
60
|
|
51
61
|
echo "------> [blazing] Bundling gems"
|
data/lib/blazing/version.rb
CHANGED
data/spec/blazing/config_spec.rb
CHANGED
@@ -140,5 +140,19 @@ describe Blazing::Config do
|
|
140
140
|
end
|
141
141
|
|
142
142
|
end
|
143
|
+
|
144
|
+
describe 'rvm_scripts' do
|
145
|
+
|
146
|
+
it 'takes an string as argument' do
|
147
|
+
@config.rvm_scripts '/opt/rvm/scripts'
|
148
|
+
@config.instance_variable_get('@rvm_scripts').should == '/opt/rvm/scripts'
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'returns the string if no argument given' do
|
152
|
+
@config.rvm_scripts '/opt/rvm/scripts'
|
153
|
+
@config.rvm_scripts.should == '/opt/rvm/scripts'
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
143
157
|
end
|
144
158
|
end
|
@@ -24,7 +24,7 @@ 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 'mkdir /some/where/else
|
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
|
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.6
|
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-11-
|
12
|
+
date: 2011-11-24 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &70099205952900 !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: *70099205952900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70099205951780 !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: *70099205951780
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70099205950920 !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: *70099205950920
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard
|
49
|
-
requirement: &
|
49
|
+
requirement: &70099205949680 !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: *70099205949680
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70099205948940 !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: *70099205948940
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl
|
71
|
-
requirement: &
|
71
|
+
requirement: &70099205947980 !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: *70099205947980
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rb-fsevent
|
82
|
-
requirement: &
|
82
|
+
requirement: &70099205946180 !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: *70099205946180
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: grit
|
93
|
-
requirement: &
|
93
|
+
requirement: &70099205848100 !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: *70099205848100
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: logging
|
104
|
-
requirement: &
|
104
|
+
requirement: &70099205847200 !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: *70099205847200
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: activesupport
|
115
|
-
requirement: &
|
115
|
+
requirement: &70099205846160 !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: *70099205846160
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: i18n
|
126
|
-
requirement: &
|
126
|
+
requirement: &70099205845360 !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: *70099205845360
|
135
135
|
description: painless git push deployments for everyone
|
136
136
|
email:
|
137
137
|
- felipekaufmann@gmail.com
|
@@ -187,12 +187,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- - ! '>='
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
|
+
segments:
|
191
|
+
- 0
|
192
|
+
hash: 1818648821680842616
|
190
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
194
|
none: false
|
192
195
|
requirements:
|
193
196
|
- - ! '>='
|
194
197
|
- !ruby/object:Gem::Version
|
195
198
|
version: '0'
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
hash: 1818648821680842616
|
196
202
|
requirements: []
|
197
203
|
rubyforge_project: blazing
|
198
204
|
rubygems_version: 1.8.10
|