xcode-install 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xcode/install.rb +5 -4
- data/lib/xcode/install/install.rb +4 -1
- data/lib/xcode/install/version.rb +1 -1
- data/spec/install_spec.rb +9 -3
- data/xcode-install.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97fecd2b2cb93b7f6c3af3d1aa1465f7caa7c03b
|
4
|
+
data.tar.gz: 20033e1e649cfd09df091f367f53c9abc4b3c1ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18f260a4586d89c639b653518d2679aa8a857f360350589987ba062b2cb72213e1ae507b84831f4de478d2d45d8e71f133c1f9942d02735dfa4b4550bddc1046
|
7
|
+
data.tar.gz: 8f4f48b57b34dce24f6a9f93253f18cfcb9b6eee2fc2f0aabbcbd5e95586dec2fea2aed7c4fde21092aa5740eef5e55c0f662a5538875ba389e4a5446c5a359b
|
data/lib/xcode/install.rb
CHANGED
@@ -71,7 +71,7 @@ module XcodeInstall
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
def install_dmg(dmgPath, suffix = '', switch = true, clean = true)
|
74
|
+
def install_dmg(dmgPath, suffix = '', switch = true, clean = true, components = true)
|
75
75
|
xcode_path = "/Applications/Xcode#{suffix}.app"
|
76
76
|
|
77
77
|
`hdiutil mount -nobrowse -noverify #{dmgPath}`
|
@@ -92,7 +92,7 @@ HELP
|
|
92
92
|
|
93
93
|
enable_developer_mode
|
94
94
|
`sudo xcodebuild -license` unless xcode_license_approved?
|
95
|
-
install_components(xcode_path)
|
95
|
+
install_components(xcode_path) if components
|
96
96
|
|
97
97
|
if switch
|
98
98
|
`sudo rm -f #{SYMLINK_PATH}` unless current_symlink.nil?
|
@@ -105,12 +105,13 @@ HELP
|
|
105
105
|
FileUtils.rm_f(dmgPath) if clean
|
106
106
|
end
|
107
107
|
|
108
|
-
def install_version(version, switch = true, clean = true, install = true, progress = true
|
108
|
+
def install_version(version, switch = true, clean = true, install = true, progress = true,
|
109
|
+
components = true)
|
109
110
|
return if version.nil?
|
110
111
|
dmg_path = get_dmg(version, progress)
|
111
112
|
fail Informative, "Failed to download Xcode #{version}." if dmg_path.nil?
|
112
113
|
|
113
|
-
install_dmg(dmg_path, "-#{version.split(' ')[0]}", switch, clean) if install
|
114
|
+
install_dmg(dmg_path, "-#{version.split(' ')[0]}", switch, clean, components) if install
|
114
115
|
end
|
115
116
|
|
116
117
|
def list_current
|
@@ -12,6 +12,7 @@ module XcodeInstall
|
|
12
12
|
[['--no-switch', 'Don’t switch to this version after installation'],
|
13
13
|
['--no-install', 'Only download DMG, but do not install it.'],
|
14
14
|
['--no-progress', 'Don’t show download progress.'],
|
15
|
+
['--no-install-components', 'Don’t install additional components.'],
|
15
16
|
['--no-clean', 'Don’t delete DMG after installation.']].concat(super)
|
16
17
|
end
|
17
18
|
|
@@ -22,6 +23,7 @@ module XcodeInstall
|
|
22
23
|
@should_install = argv.flag?('install', true)
|
23
24
|
@should_switch = argv.flag?('switch', true)
|
24
25
|
@progress = argv.flag?('progress', true)
|
26
|
+
@components = argv.flag?('components', true)
|
25
27
|
super
|
26
28
|
end
|
27
29
|
|
@@ -35,7 +37,8 @@ module XcodeInstall
|
|
35
37
|
|
36
38
|
def run
|
37
39
|
return if @version.nil?
|
38
|
-
@installer.install_version(@version, @should_switch, @should_clean, @should_install,
|
40
|
+
@installer.install_version(@version, @should_switch, @should_clean, @should_install,
|
41
|
+
@progress, @components)
|
39
42
|
end
|
40
43
|
end
|
41
44
|
end
|
data/spec/install_spec.rb
CHANGED
@@ -12,20 +12,26 @@ module XcodeInstall
|
|
12
12
|
|
13
13
|
it 'downloads and installs' do
|
14
14
|
Installer.any_instance.expects(:download).with('6.3', true).returns('/some/path')
|
15
|
-
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true)
|
15
|
+
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true, true)
|
16
16
|
Command::Install.run(['6.3'])
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'downloads and installs and does not switch if --no-switch given' do
|
20
20
|
Installer.any_instance.expects(:download).with('6.3', true).returns('/some/path')
|
21
|
-
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', false, true)
|
21
|
+
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', false, true, true)
|
22
22
|
Command::Install.run(['6.3', '--no-switch'])
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'downloads without progress if switch --no-progress is given' do
|
26
26
|
Installer.any_instance.expects(:download).with('6.3', false).returns('/some/path')
|
27
|
-
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true)
|
27
|
+
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true, true)
|
28
28
|
Command::Install.run(['6.3', '--no-progress'])
|
29
29
|
end
|
30
|
+
|
31
|
+
it 'does not install components if switch --no-components is given' do
|
32
|
+
Installer.any_instance.expects(:download).with('6.3', true).returns('/some/path')
|
33
|
+
Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true, false)
|
34
|
+
Command::Install.run(['6.3', '--no-components'])
|
35
|
+
end
|
30
36
|
end
|
31
37
|
end
|
data/xcode-install.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'claide', '~> 0.8.1'
|
22
|
-
spec.add_dependency 'spaceship', '~> 0.3.
|
22
|
+
spec.add_dependency 'spaceship', '~> 0.3.4'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcode-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Bügling
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|