sambot 0.1.113 → 0.1.114
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 +4 -4
- data/lib/sambot/developer_workflow/workstation.rb +20 -2
- data/lib/sambot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5872b8d8359765663c5b81085b849f542d146e14
|
|
4
|
+
data.tar.gz: e1f94a36c1e383007f7b55336fc04e1b00ea90b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e901d2506c06f9dc0ce7355c1b65b461f6e545603551d9071fe36fdbad6f320d1367f032a1d67dcb36cdd8e9fd20ca53fd57d1980aac1a684752b340788fb597
|
|
7
|
+
data.tar.gz: 2010d18efa50702ba13bf7a46749b9bb29c6295273e76601841fd8afa166302ee10e9bd94fe6c4675de15d37396a94f7f50def296bd20f501868d43f864408c3
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'bundler'
|
|
4
|
+
|
|
3
5
|
module Sambot
|
|
4
6
|
module DeveloperWorkflow
|
|
5
7
|
class Workstation
|
|
@@ -7,7 +9,9 @@ module Sambot
|
|
|
7
9
|
FORMULAS = {
|
|
8
10
|
'git': 'git',
|
|
9
11
|
'vault': 'vault',
|
|
10
|
-
'haproxy': 'haproxy'
|
|
12
|
+
'haproxy': 'haproxy',
|
|
13
|
+
'ruby-build': 'ruby-build',
|
|
14
|
+
'rbenv': 'rbenv'
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
CASKS = {
|
|
@@ -26,7 +30,7 @@ module Sambot
|
|
|
26
30
|
|
|
27
31
|
def self.install_native_binaries
|
|
28
32
|
if `xcode-select version`
|
|
29
|
-
UI.info("Not installing XCode Developer Tools as they are already")
|
|
33
|
+
UI.info("Not installing XCode Developer Tools as they are already present")
|
|
30
34
|
else
|
|
31
35
|
system(XCODE_INSTALLATION_SCRIPT)
|
|
32
36
|
end
|
|
@@ -34,6 +38,7 @@ module Sambot
|
|
|
34
38
|
brew.configure
|
|
35
39
|
install_formulas(brew)
|
|
36
40
|
install_casks(brew)
|
|
41
|
+
update_ruby
|
|
37
42
|
end
|
|
38
43
|
|
|
39
44
|
def self.install_casks(brew)
|
|
@@ -53,6 +58,19 @@ module Sambot
|
|
|
53
58
|
Vault.setup_environment(Session::FORWARDS)
|
|
54
59
|
end
|
|
55
60
|
|
|
61
|
+
def self.update_ruby
|
|
62
|
+
profile = File.read(File.expand_path("~/.bash_profile"))
|
|
63
|
+
`echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile` unless /rbenv init/.match(profile)
|
|
64
|
+
current_ruby = `ruby -v`
|
|
65
|
+
if /ruby 2\.4/.match(current_ruby)
|
|
66
|
+
UI.info("Ruby 2.4.0 is already installed")
|
|
67
|
+
else
|
|
68
|
+
UI.info("Installing Ruby 2.4.0")
|
|
69
|
+
`rbenv install 2.4.0`
|
|
70
|
+
`rbenv global 2.4.0`
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
56
74
|
end
|
|
57
75
|
end
|
|
58
76
|
end
|
data/lib/sambot/version.rb
CHANGED