bin_install 0.0.13 → 0.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c29e26bb5737ae53deff07492b5452de425c756d126f401c238b0a4adadc01d
|
4
|
+
data.tar.gz: 6c71e63364358f4da49b67ff8143a1738afb786f268c794a0447c923170091d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0233347fd71b898c6ef0ca06ecf05b1ec159eee95e6568605088d5c0204d451ca64be511b9a2f82a8a4d3c301d895a796f509381b3bf90e3e85b6aeaf0b1d83d
|
7
|
+
data.tar.gz: 3d43d6244065d624f2a41105027eca98131cb1e6ea6d8f6186b907062974165f72c4c9c55437f865ce367beefd202e9005f564fb8fe0a0974d803954eafdf31e
|
data/lib/bin_install/node.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
module BinInstall
|
2
2
|
module Node
|
3
3
|
def self.install
|
4
|
+
puts 'Installing Node.js...'.white
|
4
5
|
Brew::Package.install_or_upgrade('node')
|
5
|
-
Brew::Package.install_or_upgrade('yarn')
|
6
|
-
Yarn.install
|
7
6
|
end
|
8
7
|
|
9
8
|
def self.install!
|
9
|
+
puts 'Installing Node.js...'.white
|
10
10
|
Brew::Package.install_or_upgrade!('node')
|
11
|
-
Brew::Package.install_or_upgrade!('yarn')
|
12
|
-
Yarn.install!
|
13
11
|
end
|
14
12
|
|
15
13
|
def self.installed?
|
@@ -30,7 +30,7 @@ module BinInstall
|
|
30
30
|
version
|
31
31
|
rehash
|
32
32
|
doctor
|
33
|
-
|
33
|
+
puts 'First install done **************************'
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.first_install!
|
@@ -42,7 +42,6 @@ module BinInstall
|
|
42
42
|
version!
|
43
43
|
rehash!
|
44
44
|
doctor!
|
45
|
-
reload_shell!
|
46
45
|
end
|
47
46
|
|
48
47
|
def self.reload_shell!
|
@@ -54,12 +53,14 @@ module BinInstall
|
|
54
53
|
|
55
54
|
def self.install_ruby(version = nil)
|
56
55
|
version ||= RubyEnvironmentManager.required_ruby_version
|
56
|
+
puts "Installing Ruby #{version}...".white
|
57
57
|
|
58
58
|
if version
|
59
59
|
if RubyEnvironmentManager.ruby_version_installed?(version)
|
60
60
|
puts "Ruby #{version} is already installed. Skipping.".blue
|
61
61
|
else
|
62
62
|
system("rbenv install #{version}")
|
63
|
+
reload_shell!
|
63
64
|
end
|
64
65
|
else
|
65
66
|
puts 'Unknown Ruby version. Create .ruby-version file.'
|
@@ -68,12 +69,14 @@ module BinInstall
|
|
68
69
|
|
69
70
|
def self.install_ruby!(version = nil)
|
70
71
|
version ||= RubyEnvironmentManager.required_ruby_version
|
72
|
+
puts "Installing Ruby #{version}...".white
|
71
73
|
|
72
74
|
if version
|
73
75
|
if RubyEnvironmentManager.ruby_version_installed?(version)
|
74
76
|
puts "Ruby #{version} is already installed. Skipping.".blue
|
75
77
|
else
|
76
78
|
BinInstall.system!("rbenv install #{version}")
|
79
|
+
reload_shell!
|
77
80
|
end
|
78
81
|
else
|
79
82
|
abort('Unknown Ruby version. Create .ruby-version file.'.red)
|
data/lib/bin_install/version.rb
CHANGED
data/lib/bin_install/yarn.rb
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
module BinInstall
|
2
2
|
module Yarn
|
3
3
|
def self.install
|
4
|
-
|
4
|
+
puts 'Installing Yarn...'.white
|
5
|
+
Brew::Package.install_or_upgrade('yarn')
|
6
|
+
system('yarn install')
|
5
7
|
end
|
6
8
|
|
7
9
|
def self.install!
|
8
|
-
|
10
|
+
puts 'Installing Yarn...'.white
|
11
|
+
Brew::Package.install_or_upgrade!('yarn')
|
12
|
+
BinInstall.system!('yarn install')
|
9
13
|
end
|
10
14
|
|
11
15
|
def self.upgrade
|
12
|
-
system('
|
16
|
+
system('yarn upgrade')
|
13
17
|
end
|
14
18
|
|
15
19
|
def self.upgrade!
|
16
|
-
BinInstall.system!('
|
20
|
+
BinInstall.system!('yarn upgrade')
|
17
21
|
end
|
18
22
|
|
19
23
|
def self.installed?
|