bin_install 0.0.27 → 0.0.28
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.
- checksums.yaml +4 -4
- data/lib/bin_install/ruby/rbenv.rb +0 -1
- data/lib/bin_install/ruby/rvm.rb +17 -4
- data/lib/bin_install/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b928fdb5ebfc541304bba6a6717a179342364cb419888372fdfd612c298510e
|
4
|
+
data.tar.gz: 9e4681b16858d25a1c29f9470f6aee7d8762056f530892ec1a12c2a3ce96e57a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e45d363f289c641f15b7a405ae8be21dd03f4dec54b96e4f4259b8233dece771a2d51383c5c954e9138ae536932efddc0d65f62f8ffb16c1a768d0dc6b694f
|
7
|
+
data.tar.gz: '089a636e7a793327e23b60eb06516a2b94b5ed004f8624eeddd86112d8896176543a824761c0d91d508ff93695145afcc440d742a665f37bc3baca24cf123d7b'
|
data/lib/bin_install/ruby/rvm.rb
CHANGED
@@ -6,7 +6,7 @@ module BinInstall
|
|
6
6
|
def self.install
|
7
7
|
puts 'Installing RVM...'.white
|
8
8
|
system(INSTALL)
|
9
|
-
|
9
|
+
require_loaded!
|
10
10
|
install_ruby
|
11
11
|
end
|
12
12
|
|
@@ -14,6 +14,7 @@ module BinInstall
|
|
14
14
|
puts 'Installing RVM...'.white
|
15
15
|
BinInstall.system!(INSTALL)
|
16
16
|
BinInstall.system!('source ~/.rvm/scripts/rvm')
|
17
|
+
require_loaded!
|
17
18
|
install_ruby!
|
18
19
|
end
|
19
20
|
|
@@ -24,9 +25,7 @@ module BinInstall
|
|
24
25
|
if Ruby.ruby_version_installed?(version)
|
25
26
|
puts "Ruby #{version} is already installed. Skipping Ruby #{version} install.".blue
|
26
27
|
else
|
27
|
-
|
28
|
-
ap 'result 1'
|
29
|
-
ap result
|
28
|
+
system("rvm install #{version}")
|
30
29
|
system("rvm use #{version}")
|
31
30
|
end
|
32
31
|
else
|
@@ -49,6 +48,20 @@ module BinInstall
|
|
49
48
|
end
|
50
49
|
end
|
51
50
|
|
51
|
+
def self.require_loaded!
|
52
|
+
abort_install! unless installed?
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.abort_install!
|
56
|
+
puts 'Warning RVM is not loaded.'.yellow
|
57
|
+
puts 'Try closing this window and restarting your shell session.'.yellow
|
58
|
+
puts "\n"
|
59
|
+
puts 'Rerun the installer with:'
|
60
|
+
puts '$ bin/install'.cyan
|
61
|
+
puts "\n"
|
62
|
+
abort('Aborting install.'.red)
|
63
|
+
end
|
64
|
+
|
52
65
|
def self.installed?
|
53
66
|
Shell.executable_exists?('rvm')
|
54
67
|
end
|
data/lib/bin_install/version.rb
CHANGED