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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3b5b12097e512e94272a9191f9777496a5c682c830f4c48969f85a62e55f956
4
- data.tar.gz: fc77d48cdd3c7bba9ec20a641a15d49508b7515e0e9d29cf466920fb505b59c9
3
+ metadata.gz: 3b928fdb5ebfc541304bba6a6717a179342364cb419888372fdfd612c298510e
4
+ data.tar.gz: 9e4681b16858d25a1c29f9470f6aee7d8762056f530892ec1a12c2a3ce96e57a
5
5
  SHA512:
6
- metadata.gz: 74aae9c86430f81e531488f1cf44b821f810075c5ae11e8974ad70fc3f51e9b6a70ec8ab8d436654dbe315b742ea635b43c36959f438fdbe965dcc5a8ad1d232
7
- data.tar.gz: 351838344076ec66f02172d6872680046f64612a85018b538696835c6965dfb198ba459a93577fa43cec8586821e686f0f48d14f694f9497489e8b0ad4edc02c
6
+ metadata.gz: a0e45d363f289c641f15b7a405ae8be21dd03f4dec54b96e4f4259b8233dece771a2d51383c5c954e9138ae536932efddc0d65f62f8ffb16c1a768d0dc6b694f
7
+ data.tar.gz: '089a636e7a793327e23b60eb06516a2b94b5ed004f8624eeddd86112d8896176543a824761c0d91d508ff93695145afcc440d742a665f37bc3baca24cf123d7b'
@@ -27,7 +27,6 @@ module BinInstall
27
27
  Shell.append_to_profiles!(%{eval "$(rbenv init -)"\n})
28
28
  require_shims!
29
29
  install_ruby!
30
- require_shims!
31
30
  doctor!
32
31
  end
33
32
  end
@@ -6,7 +6,7 @@ module BinInstall
6
6
  def self.install
7
7
  puts 'Installing RVM...'.white
8
8
  system(INSTALL)
9
- system('source ~/.rvm/scripts/rvm')
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
- result = system("rvm install #{version}")
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
@@ -1,3 +1,3 @@
1
1
  module BinInstall
2
- VERSION = '0.0.27'.freeze
2
+ VERSION = '0.0.28'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bin_install
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Singer