bin_install 0.0.11 → 0.0.12

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: 2690a798f72b41eff1125342940db0b5ed2d43aa337ae040316207545364ad43
4
- data.tar.gz: a918abf1a51698d43b2c75d3bbea10be695196d2655228c73814f5f4af8d0e92
3
+ metadata.gz: d076004ba397a3c7d3ecb86c28ca94776722294a1ba44143963c9fe240bbd703
4
+ data.tar.gz: e3673ee112018aa4387aca87689899afadfefad6a2a48537b31962f99f5d10a8
5
5
  SHA512:
6
- metadata.gz: f5bb001b9cbc557ebc80d94dc8912d6e6884dc2021b80c2505772f62b39acb9d3ab446047bcf78f753bc11f29d39143105df8408e85803661b703ae293ea9e01
7
- data.tar.gz: 74e177759c3e3a3c3e886bbb82e29791ca479c340c32f494a37ef77fa026f2a3d5a10d3ddb20d6c7a4e6d319628f4afff70dbe727ed92bd5ae013dff20d726f8
6
+ metadata.gz: ea9f2dbfab3fb6bbb99c31549ffe7e3a1aba3ecc584350d8a19fb58d0222dd9cbac18cf573855bef95a07c9639a62e29804dda2e97bde737c697371cc91b9ad3
7
+ data.tar.gz: a08e98275c48f2d90c37134afde9d2263086676a433562a9faaab02c7e58507ac5ced7eea69b102de8efa7894f7e5b44d6e27ab4801e8410e7e4341c62df56c0
@@ -1,5 +1,5 @@
1
1
  module BinInstall
2
- module Brew
2
+ module Atom
3
3
  module Package
4
4
  # https://atom.io/packages/list?direction=desc&sort=downloads
5
5
  POPULAR_PACKAGES = %w[file-icons minimap atom-beautify linter linter-ui-default pigments git-plus busy-signal linter-eslint react].freeze
@@ -50,11 +50,11 @@ module BinInstall
50
50
  end
51
51
 
52
52
  def self.link(package)
53
- system("brew link #{package}")
53
+ system("brew link #{package} --force")
54
54
  end
55
55
 
56
56
  def self.link!(package)
57
- BinInstall.system!("brew link #{package}")
57
+ BinInstall.system!("brew link #{package} --force")
58
58
  end
59
59
 
60
60
  def self.installed?(package)
@@ -46,12 +46,11 @@ module BinInstall
46
46
  end
47
47
 
48
48
  def self.reload_shell!
49
- puts 'Shell must be reloaded.'.red
50
- puts 'Close this shell and open a new one.'
51
- puts 'Rerun installer with:'
49
+ puts 'Warning rbenv requires reloading the shell'.yellow
50
+ puts 'Close this shell and rerun the installer with:'.red
52
51
  puts '$ gem install bin_install'.cyan
53
52
  puts '$ bin/install'.cyan
54
- abort('Can not continue until shell is reloaded.'.red)
53
+ abort('Can not continue.'.red)
55
54
  end
56
55
 
57
56
  def self.install_ruby(version = nil)
@@ -1,3 +1,3 @@
1
1
  module BinInstall
2
- VERSION = '0.0.11'.freeze
2
+ VERSION = '0.0.12'.freeze
3
3
  end
@@ -7,12 +7,37 @@ module BinInstall
7
7
 
8
8
  def self.install
9
9
  puts 'Installing Oh My Zsh...'.white
10
- system(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
10
+ print_reload_warning
11
+ if continue?
12
+ system(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
13
+ else
14
+ abort('Oh My Zsh installation aborted by user.'.red)
15
+ end
11
16
  end
12
17
 
13
18
  def self.install!
14
19
  puts 'Installing Oh My Zsh...'.white
15
- BinInstall.system!(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
20
+ print_reload_warning
21
+ if continue?
22
+ BinInstall.system!(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
23
+ else
24
+ abort('Oh My Zsh installation aborted by user.'.red)
25
+ end
26
+ end
27
+
28
+ def self.print_reload_warning
29
+ return if installed?
30
+ puts 'Warning Oh My Zsh requires reloading the shell.'.yellow
31
+ puts 'After Oh My Zsh finishes installing you must restart your shell!'.red
32
+ puts 'Rerun the installer with:'
33
+ puts '$ gem install bin_install'.cyan
34
+ puts '$ bin/install'.cyan
35
+ end
36
+
37
+ def self.continue?
38
+ return true if installed?
39
+ print 'Would you like to continue? [Y/n]: '
40
+ Shell.default_yes?(gets.chomp)
16
41
  end
17
42
 
18
43
  def self.installed?
@@ -8,36 +8,14 @@ module BinInstall
8
8
 
9
9
  def self.install
10
10
  puts 'Installing Zsh...'.white
11
- print_reload_warning
12
- if continue?
13
- Brew::Package.install_or_upgrade('zsh')
14
- Brew::Package.install_or_upgrade('zsh-completions')
15
- else
16
- abort('Warning Zsh install stopped by user.'.red)
17
- end
11
+ Brew::Package.install_or_upgrade('zsh')
12
+ Brew::Package.install_or_upgrade('zsh-completions')
18
13
  end
19
14
 
20
15
  def self.install!
21
- puts 'Installing Oh My Zsh...'.white
22
- print_reload_warning
23
- if continue?
24
- Brew::Package.install_or_upgrade('zsh')
25
- Brew::Package.install_or_upgrade('zsh-completions')
26
- else
27
- abort('Warning Zsh install stopped by user.'.red)
28
- end
29
- end
30
-
31
- def self.print_reload_warning
32
- puts 'Warning Zsh requires reloading the shell.'.yellow
33
- puts 'After Zsh finishes installing you may need to rerun the installer with:'
34
- puts '$ gem install bin_install'.cyan
35
- puts '$ bin/install'.cyan
36
- end
37
-
38
- def self.continue?
39
- print 'Would you like to continue? [Y/n]: '
40
- Shell.default_yes?(gets.chomp)
16
+ puts 'Installing Zsh...'.white
17
+ Brew::Package.install_or_upgrade('zsh')
18
+ Brew::Package.install_or_upgrade('zsh-completions')
41
19
  end
42
20
 
43
21
  def self.installed?
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.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Singer