rconf 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile
CHANGED
@@ -103,7 +103,7 @@ module RightConf
|
|
103
103
|
# === Return
|
104
104
|
# path(String):: Path
|
105
105
|
def pick_default_path(first_choice)
|
106
|
-
path = first_choice
|
106
|
+
path = DEFAULT_NGINX_INSTALL[first_choice && 0 || 1]
|
107
107
|
end
|
108
108
|
|
109
109
|
# Install passenger gem
|
@@ -228,30 +228,9 @@ module RightConf
|
|
228
228
|
# === Return
|
229
229
|
# true:: Always return true
|
230
230
|
def setup_bashrc
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
if bashrc_path
|
235
|
-
content = IO.read(bashrc_path)
|
236
|
-
unless content.include?(rvm_bash_activation)
|
237
|
-
i = content.index(/^\s*PATH=[^$PATH]/)
|
238
|
-
if i
|
239
|
-
next_line = content.index("\n", i + 1)
|
240
|
-
if next_line
|
241
|
-
content.insert(next_line + 1, rvm_bash_activation + "\n")
|
242
|
-
else
|
243
|
-
content += "\n" + rvm_bash_activation
|
244
|
-
end
|
245
|
-
else
|
246
|
-
content = rvm_bash_activation + "\n" + content
|
247
|
-
end
|
248
|
-
FileUtils.mv(bashrc_path, bashrc_path + '.old')
|
249
|
-
File.open(bashrc_path, 'w') { |f| f.puts content }
|
250
|
-
post_note 'rvm was installed, please reload your shell to activate it and re-run rconf'
|
251
|
-
aborting(true)
|
252
|
-
end
|
253
|
-
else
|
254
|
-
report_error("Failed to update bashrc to activate rvm, no bashrc found")
|
231
|
+
if EnvironmentUpdater.update(rvm_bash_activation, ['PATH'])
|
232
|
+
post_note 'rvm was installed, please reload your shell to activate it and re-run rconf'
|
233
|
+
aborting(true)
|
255
234
|
end
|
256
235
|
end
|
257
236
|
|
data/lib/rconf/version.rb
CHANGED
@@ -106,8 +106,7 @@ describe RightConf::RubyConfigurator do
|
|
106
106
|
flexmock(IO).should_receive(:read).and_return(<<-EOS
|
107
107
|
echo 'zobi la mouche'
|
108
108
|
radio killed the radio star
|
109
|
-
#PATH=something
|
110
|
-
PATH=$PATH:should be fine
|
109
|
+
#PATH=something:should be fine
|
111
110
|
this should not:
|
112
111
|
PATH=something
|
113
112
|
AFTER
|
@@ -117,8 +116,7 @@ AFTER
|
|
117
116
|
@bashrc_content.should == <<-EOS
|
118
117
|
echo 'zobi la mouche'
|
119
118
|
radio killed the radio star
|
120
|
-
#PATH=something
|
121
|
-
PATH=$PATH:should be fine
|
119
|
+
#PATH=something:should be fine
|
122
120
|
this should not:
|
123
121
|
PATH=something
|
124
122
|
#{@rvm_bash_activation}
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rconf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.7.
|
5
|
+
version: 0.7.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Raphael Simon
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-30 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|