mac_setup 0.6.0 → 0.7.0
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/mac_setup/brewfile_installer.rb +22 -2
- data/lib/mac_setup/configuration.rb +1 -1
- data/lib/mac_setup/symlink_installer.rb +1 -0
- data/lib/mac_setup/version.rb +1 -1
- data/lib/mac_setup.rb +0 -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: d138f54b0282d08ae090d9d610449a01ca085ca8
|
4
|
+
data.tar.gz: e6c8f046d259c1716ddb3c2fa0b93b8ebdccf6aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa607f339bdb85eeebebd20ae6e80d4d75dace9979b040d2226ead3947fbc91449785132b304e8caf5c2b768f9aee26bba1b6bdacd80c4fb760d8aedcb8d6783
|
7
|
+
data.tar.gz: 7652ec93fbfb92e1614ab32b7f5919bbb82b1c56296297b0de8244c7d3a7db19aff3432dc236b6078a9c8612baefd338840f42476046d90a7e8956d7dbc7f5b2
|
@@ -17,7 +17,7 @@ module MacSetup
|
|
17
17
|
|
18
18
|
def run
|
19
19
|
tap_bundle
|
20
|
-
|
20
|
+
set_up_mas
|
21
21
|
install_brewfile
|
22
22
|
install_openssl
|
23
23
|
end
|
@@ -30,16 +30,36 @@ module MacSetup
|
|
30
30
|
Shell.run("brew tap #{BUNDLE_TAP}")
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def set_up_mas
|
34
|
+
brewfile = Pathname.new("~/.Brewfile").expand_path
|
34
35
|
return unless brewfile.read =~ /^mas /
|
36
|
+
|
37
|
+
install_mas
|
38
|
+
sign_in_to_mas
|
39
|
+
end
|
40
|
+
|
41
|
+
def install_mas
|
42
|
+
Shell.run("brew install mas") unless mas_installed?
|
43
|
+
end
|
44
|
+
|
45
|
+
def sign_in_to_mas
|
46
|
+
return if mas_signed_in?
|
35
47
|
apple_id = Shell.ask("What is your Apple ID?")
|
36
48
|
Shell.run("mas signin --dialog #{apple_id}")
|
37
49
|
end
|
38
50
|
|
51
|
+
def mas_signed_in?
|
52
|
+
Shell.success?("mas account")
|
53
|
+
end
|
54
|
+
|
39
55
|
def install_brewfile
|
40
56
|
Shell.run("brew bundle --global")
|
41
57
|
end
|
42
58
|
|
59
|
+
def mas_installed?
|
60
|
+
Shell.success?("which mas")
|
61
|
+
end
|
62
|
+
|
43
63
|
def install_openssl
|
44
64
|
# Needed for encrypted files
|
45
65
|
Shell.run("brew install openssl")
|
data/lib/mac_setup/version.rb
CHANGED
data/lib/mac_setup.rb
CHANGED