blazing 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  ## master
2
2
 
3
+ ## 0.2.6 - November 24, 2011
4
+
5
+ * Add option to specify custom rvm scripts location
6
+ * Fix failing setup command when target directory already exists
7
+
3
8
  ## 0.2.5 - November 9, 2011
4
9
 
5
10
  * Fix missing logger include in Recipe
@@ -8,7 +8,7 @@ class Blazing::Config
8
8
 
9
9
  attr_reader :file
10
10
  attr_accessor :targets, :recipes
11
- dsl_setter :repository, :rvm, :rake
11
+ dsl_setter :repository, :rvm, :rvm_scripts, :rake
12
12
 
13
13
  class << self
14
14
 
@@ -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} && cd #{path} && git init"
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
- # Load RVM into a shell session *as a function*
20
- if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
21
-
22
- # First try to load from a user install
23
- source "$HOME/.rvm/scripts/rvm"
24
-
25
- <% if @config.rvm == :rvmrc %>
26
- echo "------> [blazing] Loading rvm from .rvmrc"
27
- source .rvmrc
28
- <% else %>
29
- echo "------> [blazing] Loading rvm string: <%= @config.rvm %>"
30
- rvm use <%= @config.rvm %>
31
- <% end %>
32
-
33
- elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
34
-
35
- # Then try to load from a root install
36
- source "/usr/local/rvm/scripts/rvm"
37
-
38
- <% if @config.rvm == :rvmrc %>
39
- echo "------> [blazing] Loading rvm from .rvmrc"
40
- source .rvmrc
41
- <% else %>
42
- echo "------> [blazing] Loading rvm string: <%= @config.rvm %>"
43
- rvm use <%= @config.rvm %>
44
- <% end %>
45
-
46
- else
47
- echo '------> [blazing] ERROR: RVM was enabled in config but no RVM installation was not found\n'
48
- fi
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"
@@ -1,3 +1,3 @@
1
1
  module Blazing
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -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 && cd /some/where/else && git init && cd /some/where/else && git config receive.denyCurrentBranch ignore'")
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.5
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-09 00:00:00.000000000Z
12
+ date: 2011-11-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
16
- requirement: &70170681369220 !ruby/object:Gem::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: *70170681369220
24
+ version_requirements: *70099205952900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70170681368660 !ruby/object:Gem::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: *70170681368660
35
+ version_requirements: *70099205951780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70170681368180 !ruby/object:Gem::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: *70170681368180
46
+ version_requirements: *70099205950920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard
49
- requirement: &70170681367640 !ruby/object:Gem::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: *70170681367640
57
+ version_requirements: *70099205949680
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-rspec
60
- requirement: &70170681367200 !ruby/object:Gem::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: *70170681367200
68
+ version_requirements: *70099205948940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: growl
71
- requirement: &70170681366720 !ruby/object:Gem::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: *70170681366720
79
+ version_requirements: *70099205947980
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rb-fsevent
82
- requirement: &70170681366220 !ruby/object:Gem::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: *70170681366220
90
+ version_requirements: *70099205946180
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: grit
93
- requirement: &70170681309100 !ruby/object:Gem::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: *70170681309100
101
+ version_requirements: *70099205848100
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: logging
104
- requirement: &70170681308560 !ruby/object:Gem::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: *70170681308560
112
+ version_requirements: *70099205847200
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: activesupport
115
- requirement: &70170681308080 !ruby/object:Gem::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: *70170681308080
123
+ version_requirements: *70099205846160
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: i18n
126
- requirement: &70170681307600 !ruby/object:Gem::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: *70170681307600
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