xcode-install 0.9.5 → 0.9.6

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
  SHA1:
3
- metadata.gz: 3f61fb89ee9fecddefddd87b1df67c29cf5c371f
4
- data.tar.gz: 2d6dde670a447ae9a11c9e631a295d7d87efb963
3
+ metadata.gz: 42dac883f70abe088d3de8820a9f465b097bd121
4
+ data.tar.gz: 29abe4bcda93cc9d5da4fd38b594c527f06fd57f
5
5
  SHA512:
6
- metadata.gz: 144ae8e0f03074a598f387715650e2661b9e0d9defb2bf47f522c1ab423e79b70dd3a6c657a9490d58c3587f915b6e0324ff96b6022ee31f6c62d4ecd1339603
7
- data.tar.gz: 3eaf14c307554b72074c0dc2c5e1ae9b670e253ddc34f982983ecbfa8fdf4ea013b38202cf68b5da47f9e9fbedd67c1e7077f69b84cd26c6aa3b93cb15a8b53b
6
+ metadata.gz: e060a74eb4a236a12cd19d14c76a04dada5e8343f4318664187fec2d0bb2c5c22455621b4c705241bca4674a36bbbf4b7125b055a38ab1da49fc78711d2f0822
7
+ data.tar.gz: 4a9f4578d366f38d424838bab7d99ba766db809088863281e2d4d69561bbdc0220c90818cf3c0c734884657bafc11f7449eba27184027b6777cab20cf3fcb7af
data/lib/xcode/install.rb CHANGED
@@ -57,10 +57,6 @@ module XcodeInstall
57
57
  list_versions.include?(version)
58
58
  end
59
59
 
60
- def install_components(xcode_path)
61
- `#{xcode_path}/Contents/MacOS/Xcode -installComponents`
62
- end
63
-
64
60
  def installed?(version)
65
61
  installed_versions.map(&:version).include?(version)
66
62
  end
@@ -71,7 +67,7 @@ module XcodeInstall
71
67
  end
72
68
  end
73
69
 
74
- def install_dmg(dmgPath, suffix = '', switch = true, clean = true, components = true)
70
+ def install_dmg(dmgPath, suffix = '', switch = true, clean = true)
75
71
  xcode_path = "/Applications/Xcode#{suffix}.app"
76
72
 
77
73
  `hdiutil mount -nobrowse -noverify #{dmgPath}`
@@ -92,11 +88,11 @@ HELP
92
88
 
93
89
  if not verify_integrity(xcode_path)
94
90
  `sudo rm -f #{xcode_path}`
91
+ return
95
92
  end
96
93
 
97
94
  enable_developer_mode
98
- `sudo xcodebuild -license` unless xcode_license_approved?
99
- install_components(xcode_path) if components
95
+ `sudo xcodebuild -license accept` unless xcode_license_approved?
100
96
 
101
97
  if switch
102
98
  `sudo rm -f #{SYMLINK_PATH}` unless current_symlink.nil?
@@ -109,13 +105,12 @@ HELP
109
105
  FileUtils.rm_f(dmgPath) if clean
110
106
  end
111
107
 
112
- def install_version(version, switch = true, clean = true, install = true, progress = true,
113
- components = true)
108
+ def install_version(version, switch = true, clean = true, install = true, progress = true)
114
109
  return if version.nil?
115
110
  dmg_path = get_dmg(version, progress)
116
111
  fail Informative, "Failed to download Xcode #{version}." if dmg_path.nil?
117
112
 
118
- install_dmg(dmg_path, "-#{version.split(' ')[0]}", switch, clean, components) if install
113
+ install_dmg(dmg_path, "-#{version.split(' ')[0]}", switch, clean) if install
119
114
  end
120
115
 
121
116
  def list_current
@@ -245,7 +240,7 @@ HELP
245
240
  end
246
241
 
247
242
  def verify_integrity(path)
248
- puts `codesign --verify --verbose #{path}`
243
+ puts `/usr/sbin/spctl --assess --verbose=4 --type execute #{path}`
249
244
  $?.exitstatus == 0
250
245
  end
251
246
 
@@ -12,7 +12,6 @@ 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.'],
16
15
  ['--no-clean', 'Don’t delete DMG after installation.']].concat(super)
17
16
  end
18
17
 
@@ -23,7 +22,6 @@ module XcodeInstall
23
22
  @should_install = argv.flag?('install', true)
24
23
  @should_switch = argv.flag?('switch', true)
25
24
  @progress = argv.flag?('progress', true)
26
- @components = argv.flag?('components', true)
27
25
  super
28
26
  end
29
27
 
@@ -38,7 +36,7 @@ module XcodeInstall
38
36
  def run
39
37
  return if @version.nil?
40
38
  @installer.install_version(@version, @should_switch, @should_clean, @should_install,
41
- @progress, @components)
39
+ @progress)
42
40
  end
43
41
  end
44
42
  end
@@ -1,3 +1,3 @@
1
1
  module XcodeInstall
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
data/spec/install_spec.rb CHANGED
@@ -12,26 +12,20 @@ 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, true)
15
+ Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', 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, true)
21
+ Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', false, 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, true)
27
+ Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', 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
36
30
  end
37
31
  end
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.5
4
+ version: 0.9.6
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-09-21 00:00:00.000000000 Z
11
+ date: 2015-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide