bin_install 0.0.20 → 0.0.21

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: a62b5ae2ce4fecb95185c52b43dea86192700f2dbea10f480471719baf32f235
4
- data.tar.gz: 7550e53504e74804f3204905b084ad0994f06457c80989f6a4260f13a6b98b75
3
+ metadata.gz: 7ecf7891844031416b232094852fd7bd08aa582e81bd80f45792c6afa4f02bda
4
+ data.tar.gz: 28fc8baf1ddf45a86336aa3fa2fabc6870d0bef6a4c2a93f47b6909e9f4a0a51
5
5
  SHA512:
6
- metadata.gz: 887c53d589428cf9cee8348212e9404f1ae64933f1a1173d341eb44c8d87afd4f09c623d899859b552f78062c466a229e51a7dd7b07e071454d14d4777406508
7
- data.tar.gz: 0de80f18edde2ddba2eb7e3dd5e034a6e55d839bff2ecc2029ba5ac62dcc529dca141d45baccc4eba4ace4d1e65d8fd621e81591812714f2f2773998d4d31448
6
+ metadata.gz: 1cfddb5fe7b03502a89b4c0075d316846fe4b641d031faf345097b656fbdc7f0a5dc76983eeb7cfc8bf1a83468d37132e7590988def69215e3696fd69930d579
7
+ data.tar.gz: 16daccfd0e4d7ce5a2e3f5114d8def7c0b0c8f7e60703cd7aded3186978a55f1af5a77f52d6245e6c67cf1221d033895963578291c2f336158d38715ebc746f0
data/.zshrc ADDED
File without changes
@@ -4,6 +4,7 @@ require 'bin_install/brew/service'
4
4
 
5
5
  module BinInstall
6
6
  module Brew
7
+ INSTALL = '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'.freeze
7
8
  def self.require!
8
9
  if installed?
9
10
  update!
@@ -17,12 +18,12 @@ module BinInstall
17
18
 
18
19
  def self.install
19
20
  puts 'Installing Homebrew...'.white
20
- system('/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
21
+ system(INSTALL)
21
22
  end
22
23
 
23
24
  def self.install!
24
25
  puts 'Installing Homebrew...'.white
25
- BinInstall.system!('/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
26
+ BinInstall.system!(INSTALL)
26
27
  end
27
28
 
28
29
  def self.ask
@@ -14,6 +14,7 @@ module BinInstall
14
14
  if remote?(name)
15
15
  puts "Remote #{name} already exists. Skipping.".blue
16
16
  else
17
+ puts "Adding remote #{name} for #{url}...".white
17
18
  system("git remote add #{name} #{url}")
18
19
  end
19
20
  end
@@ -22,6 +23,7 @@ module BinInstall
22
23
  if remote?(name)
23
24
  puts "Remote #{name} already exists. Skipping.".blue
24
25
  else
26
+ puts "Adding remote #{name} for #{url}...".white
25
27
  BinInstall.system!("git remote add #{name} #{url}")
26
28
  end
27
29
  end
@@ -1,42 +1,42 @@
1
1
  module BinInstall
2
2
  module Rails
3
3
  def self.db_create(environment = 'development')
4
- puts 'Creating database...'.white
4
+ puts "Creating database for #{environment}...".white
5
5
  rails_or_rake("db:create RAILS_ENV=#{environment}")
6
6
  end
7
7
 
8
8
  def self.db_create!(environment = 'development')
9
- puts 'Creating database...'.white
9
+ puts "Creating database for #{environment}...".white
10
10
  rails_or_rake!("db:create RAILS_ENV=#{environment}")
11
11
  end
12
12
 
13
13
  def self.db_migrate(environment = 'development')
14
- puts 'Migrating database...'.white
14
+ puts "Migrating database for #{environment}...".white
15
15
  rails_or_rake("db:migrate RAILS_ENV=#{environment}")
16
16
  end
17
17
 
18
18
  def self.db_migrate!(environment = 'development')
19
- puts 'Migrating database...'.white
19
+ puts "Migrating database for #{environment}...".white
20
20
  rails_or_rake!("db:migrate RAILS_ENV=#{environment}")
21
21
  end
22
22
 
23
23
  def self.db_reset(environment = 'development')
24
- puts 'Resetting database...'.white
24
+ puts "Resetting database for #{environment}...".white
25
25
  rails_or_rake("db:reset RAILS_ENV=#{environment}")
26
26
  end
27
27
 
28
28
  def self.db_reset!(environment = 'development')
29
- puts 'Resetting database...'.white
29
+ puts "Resetting database for #{environment}...".white
30
30
  rails_or_rake!("db:reset RAILS_ENV=#{environment}")
31
31
  end
32
32
 
33
33
  def self.db_setup(environment = 'development')
34
- puts 'Preparing database...'.white
34
+ puts "Preparing database for #{environment}...".white
35
35
  rails_or_rake("db:setup RAILS_ENV=#{environment}")
36
36
  end
37
37
 
38
38
  def self.db_setup!(environment = 'development')
39
- puts 'Preparing database...'.white
39
+ puts "Preparing database for #{environment}...".white
40
40
  rails_or_rake!("db:setup RAILS_ENV=#{environment}")
41
41
  end
42
42
 
@@ -1,14 +1,16 @@
1
1
  module BinInstall
2
2
  module Ruby
3
3
  module Rbenv
4
+ DOCTOR = 'curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash'.freeze
5
+
4
6
  def self.install
5
7
  puts 'Installing rbenv...'.white
6
8
  Brew::Package.install('rbenv')
7
9
  Brew::Package.install_or_upgrade('ruby-build')
8
10
  Shell.append_to_profiles(%{eval "$(rbenv init -)"\n})
9
- require_doctor!
11
+ require_shims!
10
12
  install_ruby
11
- require_doctor!
13
+ doctor
12
14
  end
13
15
 
14
16
  def self.install!
@@ -16,9 +18,9 @@ module BinInstall
16
18
  Brew::Package.install!('rbenv')
17
19
  Brew::Package.install_or_upgrade!('ruby-build')
18
20
  Shell.append_to_profiles!(%{eval "$(rbenv init -)"\n})
19
- require_doctor!
21
+ require_shims!
20
22
  install_ruby!
21
- require_doctor!
23
+ doctor!
22
24
  end
23
25
 
24
26
  def self.install_ruby(version = Ruby.required_ruby_version)
@@ -50,15 +52,15 @@ module BinInstall
50
52
  end
51
53
 
52
54
  def self.doctor
53
- system('curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash')
55
+ system(DOCTOR)
54
56
  end
55
57
 
56
58
  def self.doctor!
57
- BinInstall.system!('curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash')
59
+ BinInstall.system!(DOCTOR)
58
60
  end
59
61
 
60
- def self.require_doctor!
61
- abort_install! unless doctor
62
+ def self.require_shims!
63
+ abort_install! unless `#{DOCTOR}`.include?('Checking for rbenv shims in PATH: OK')
62
64
  end
63
65
 
64
66
  def self.abort_install!
@@ -1,3 +1,3 @@
1
1
  module BinInstall
2
- VERSION = '0.0.20'.freeze
2
+ VERSION = '0.0.21'.freeze
3
3
  end
@@ -1,6 +1,7 @@
1
1
  module BinInstall
2
2
  module Zsh
3
3
  module OhMyZsh
4
+ INSTALL = %(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)").freeze
4
5
  def self.require!
5
6
  abort('Oh My Zsh is required. Visit http://ohmyz.sh/ to install.'.red) unless installed?
6
7
  end
@@ -9,7 +10,7 @@ module BinInstall
9
10
  puts 'Installing Oh My Zsh...'.white
10
11
  print_reload_warning
11
12
  if continue?
12
- system(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
13
+ system(INSTALL)
13
14
  else
14
15
  abort('Oh My Zsh installation aborted by user.'.red)
15
16
  end
@@ -19,7 +20,7 @@ module BinInstall
19
20
  puts 'Installing Oh My Zsh...'.white
20
21
  print_reload_warning
21
22
  if continue?
22
- BinInstall.system!(%(sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"))
23
+ BinInstall.system!(INSTALL)
23
24
  else
24
25
  abort('Oh My Zsh installation aborted by user.'.red)
25
26
  end
@@ -9,13 +9,11 @@ module BinInstall
9
9
  def self.install
10
10
  puts 'Installing Zsh...'.white
11
11
  Brew::Package.install_or_upgrade('zsh')
12
- Brew::Package.install_or_upgrade('zsh-completions')
13
12
  end
14
13
 
15
14
  def self.install!
16
15
  puts 'Installing Zsh...'.white
17
16
  Brew::Package.install_or_upgrade('zsh')
18
- Brew::Package.install_or_upgrade('zsh-completions')
19
17
  end
20
18
 
21
19
  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.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Singer
@@ -105,6 +105,7 @@ files:
105
105
  - ".rubocop.yml"
106
106
  - ".ruby-version"
107
107
  - ".travis.yml"
108
+ - ".zshrc"
108
109
  - CODE_OF_CONDUCT.md
109
110
  - Gemfile
110
111
  - LICENSE.txt