bin_install 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96f9c33f5d35b85b9836e6a3232b10e1054884c631a6b4d13fadb059823a15bd
4
- data.tar.gz: f57792c95e3adabf40ebf6dfc0a7b34407802da95aa82091251434022a901e69
3
+ metadata.gz: b0b5c4e1da1cf7866c2d4ccae847c5d84e516f577cecc9336ad04929bac876a5
4
+ data.tar.gz: e36d544469ba65dea1fb30d9dd95def323b1a59e58afe7eedff8ad7c50aaaec7
5
5
  SHA512:
6
- metadata.gz: 2b074c09735d1d11638db627d3d13bf724a4ccedbfde6680753c519ea033ffdc2773c2a427ceb75c35a366c5098a9780976a774ee21de9bf45cd38439ae0e26f
7
- data.tar.gz: d843aad8c2309e77d3fb1efe34ac23ea15015ba5b2c03308a5fb8096ac50e326af891eeac9b4689106b02c09c72d76f11b187b4940a91826012e2f7c648e4968
6
+ metadata.gz: 60f6665c838c69387ae072080bb2714168ef0c3ec8783b9b4c15e73ab8e06f2ff9a5d8f0c5fe9cc30f0c53c4735d1239d8b5b264f70402e65d1cbbb15d2d04f7
7
+ data.tar.gz: 59e78736621de95717813a48f1c576bcf19c06f7840deb8745509d346e1292e94b57cbcdaf0a29ca10bced5f409fc3e3be8bd939e270593ac1bb7b90e6b9968e
data/bin/release ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'awesome_print'
5
+ require 'bin_install'
6
+
7
+ puts "Releasing bin_install #{BinInstall::VERSION}.".white
8
+ system('git pull origin master')
9
+ system('git add --all')
10
+ system(%(git commit -am 'Releasing #{BinInstall::VERSION}'))
11
+ system('git push origin master')
12
+ system('gem build bin_install.gemspec')
13
+ system("gem install bin_install-#{BinInstall::VERSION}.gem")
14
+ system("gem push bin_install-#{BinInstall::VERSION}.gem")
15
+ puts 'Done.'.green
@@ -47,9 +47,10 @@ module BinInstall
47
47
 
48
48
  def self.reload_shell!
49
49
  puts 'Shell must be reloaded.'.red
50
- puts 'Close this window and restart installer with:'
51
- puts '$ gem install bin_install'.yellow
52
- puts '$ bin/install'.yellow
50
+ puts 'Close this shell and open a new one.'
51
+ puts 'Rerun installer with:'
52
+ puts '$ gem install bin_install'.cyan
53
+ puts '$ bin/install'.cyan
53
54
  abort('Can not continue until shell is reloaded.'.red)
54
55
  end
55
56
 
@@ -27,7 +27,7 @@ module BinInstall
27
27
  if file.read.include?(value)
28
28
  puts "Value already exist in #{path}. Skipping.".blue
29
29
  else
30
- puts "Writing to #{path}:\n#{value.to_s.purple}"
30
+ puts "Writing to #{path}:\n#{value.to_s.cyan}"
31
31
  file << value.to_s
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module BinInstall
2
- VERSION = '0.0.9'.freeze
2
+ VERSION = '0.0.10'.freeze
3
3
  end
@@ -0,0 +1,23 @@
1
+ module BinInstall
2
+ module Zsh
3
+ module OhMyZsh
4
+ def self.require!
5
+ abort('Oh My Zsh is required. Visit http://ohmyz.sh/ to install.'.red) unless installed?
6
+ end
7
+
8
+ def self.install
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)"))
11
+ end
12
+
13
+ def self.install!
14
+ 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)"))
16
+ end
17
+
18
+ def self.installed?
19
+ File.exist?(File.expand_path('~/.oh-my-zsh'))
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,47 @@
1
+ require 'bin_install/zsh/oh_my_zsh'
2
+
3
+ module BinInstall
4
+ module Zsh
5
+ def self.require!
6
+ abort('Zsh is required. Visit http://www.zsh.org/ to install.'.red) unless installed?
7
+ end
8
+
9
+ def self.install
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
18
+ end
19
+
20
+ 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 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)
41
+ end
42
+
43
+ def self.installed?
44
+ Shell.executable_exists?('zsh')
45
+ end
46
+ end
47
+ end
data/lib/bin_install.rb CHANGED
@@ -6,7 +6,6 @@ require 'bin_install/gem'
6
6
  require 'bin_install/git'
7
7
  require 'bin_install/mysql'
8
8
  require 'bin_install/node'
9
- require 'bin_install/oh_my_zsh'
10
9
  require 'bin_install/postgres'
11
10
  require 'bin_install/rails'
12
11
  require 'bin_install/redis'
@@ -16,6 +15,7 @@ require 'bin_install/shell'
16
15
  require 'bin_install/version'
17
16
  require 'bin_install/xcode'
18
17
  require 'bin_install/yarn'
18
+ require 'bin_install/zsh'
19
19
 
20
20
  module BinInstall
21
21
  def self.system!(*args)
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Singer
@@ -112,6 +112,7 @@ files:
112
112
  - Rakefile
113
113
  - bin/build
114
114
  - bin/console
115
+ - bin/release
115
116
  - bin/setup
116
117
  - bin_install.gemspec
117
118
  - lib/bin_install.rb
@@ -125,7 +126,6 @@ files:
125
126
  - lib/bin_install/git.rb
126
127
  - lib/bin_install/mysql.rb
127
128
  - lib/bin_install/node.rb
128
- - lib/bin_install/oh_my_zsh.rb
129
129
  - lib/bin_install/postgres.rb
130
130
  - lib/bin_install/rails.rb
131
131
  - lib/bin_install/redis.rb
@@ -137,6 +137,8 @@ files:
137
137
  - lib/bin_install/version.rb
138
138
  - lib/bin_install/xcode.rb
139
139
  - lib/bin_install/yarn.rb
140
+ - lib/bin_install/zsh.rb
141
+ - lib/bin_install/zsh/oh_my_zsh.rb
140
142
  - lib/generators/bin_install/install_generator.rb
141
143
  - lib/generators/bin_install/templates/install
142
144
  - lib/generators/bin_install/templates/kill
@@ -1,25 +0,0 @@
1
- module BinInstall
2
- module OhMyZsh
3
- def self.require!
4
- abort('Oh My Zsh is required. Visit http://ohmyz.sh/ to install.'.red) unless installed?
5
- end
6
-
7
- def self.install
8
- puts 'Installing Oh My Zsh...'.white
9
- Brew::Package.install_or_upgrade('zsh')
10
- Brew::Package.install_or_upgrade('zsh-completions')
11
- system(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
12
- end
13
-
14
- def self.install!
15
- puts 'Installing Oh My Zsh...'.white
16
- Brew::Package.install_or_upgrade!('zsh')
17
- Brew::Package.install_or_upgrade!('zsh-completions')
18
- BinInstall.system!(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
19
- end
20
-
21
- def self.installed?
22
- Shell.executable_exists?('zsh')
23
- end
24
- end
25
- end