xcode-install 2.4.4 → 2.5.0

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: 4c43c13e228edd82063837dec15bef00af49fb63
4
- data.tar.gz: f64ad23b9c1f0170f105a545d6d961bc4aafb11b
3
+ metadata.gz: f963f106ba542c0705d573d9262d8fb92595df9d
4
+ data.tar.gz: ac247b88aba2b1548179b04c7e7a6eb6358c5004
5
5
  SHA512:
6
- metadata.gz: 1c879eb96b5d2e6dbe2ee8f804d59453a13885a41a317c3e21dcb78f08d99a67a492f0d90e1365516cd593ff0ebd17e868cf1b78cae097ba7ae0cc1fb442c793
7
- data.tar.gz: 8c3db34c1552b25f9b37dc30f2776932f57633151978efdfefc02064e79b6306ea9e7b6b7c679dd819f33be1327860791352756c6699c1ac2a29bcdc6f0ed85f
6
+ metadata.gz: e525ac44989fb47d31f0b976228eb1952f4d710fef60def7c3aaee7059312332c9d29e258b3a3a0760f6d39d2a1b067af9f3b3fc622c49a3780a14bd8fd61593
7
+ data.tar.gz: e630821045db39f07f64840f17e6d96df9ba3cfaeca05cc3391f9b9dc8843d48038382580b96743c3ea5868afda8aed92e8135153bea24320680b99f4f7933c9
data/README.md CHANGED
@@ -153,7 +153,7 @@ XcodeInstall normally relies on the Spotlight index to locate installed versions
153
153
  indexing is happening, it might show inaccurate results and it will not be able to see installed
154
154
  versions on unindexed volumes.
155
155
 
156
- To workaround the Spotlight limitation, XcodeInstall searches `/Applications` folder to locate Xcodes when Spotlight is disabled on the machine, or when Spotlight query for Xcode does not return any results. But it still won't work if your Xcodes are located under `/Applications` folder.
156
+ To workaround the Spotlight limitation, XcodeInstall searches `/Applications` folder to locate Xcodes when Spotlight is disabled on the machine, or when Spotlight query for Xcode does not return any results. But it still won't work if your Xcodes are not located under `/Applications` folder.
157
157
 
158
158
  ## Thanks
159
159
 
@@ -95,7 +95,7 @@ module XcodeInstall
95
95
 
96
96
  # Call back the block for other processes that might be interested
97
97
  matched = progress_content.match(/^\s*(\d+)/)
98
- next unless matched.length == 2
98
+ next unless matched && matched.length == 2
99
99
  percent = matched[1].to_i
100
100
  progress_block.call(percent) if progress_block
101
101
  end
@@ -277,7 +277,7 @@ HELP
277
277
  fail Informative, "Failed to download Xcode #{version}." if dmg_path.nil?
278
278
 
279
279
  if install
280
- install_dmg(dmg_path, "-#{version.to_s.split(' ')[0]}", switch, clean)
280
+ install_dmg(dmg_path, "-#{version.to_s.split(' ').join('.')}", switch, clean)
281
281
  else
282
282
  puts "Downloaded Xcode #{version} to '#{dmg_path}'"
283
283
  end
@@ -388,7 +388,7 @@ HELP
388
388
  def installed
389
389
  result = `mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'" 2>/dev/null`.split("\n")
390
390
  if result.empty?
391
- result = `find /Applications -name '*.app' -type d -maxdepth 1 -exec sh -c \
391
+ result = `find /Applications -maxdepth 1 -name '*.app' -type d -exec sh -c \
392
392
  'if [ "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" \
393
393
  "{}/Contents/Info.plist" 2>/dev/null)" == "com.apple.dt.Xcode" ]; then echo "{}"; fi' ';'`.split("\n")
394
394
  end
@@ -23,6 +23,7 @@ module XcodeInstall
23
23
  def initialize(argv)
24
24
  @installer = Installer.new
25
25
  @version = argv.shift_argument
26
+ @version ||= File.read('.xcode-version') if File.exist?('.xcode-version')
26
27
  @url = argv.option('url')
27
28
  @force = argv.flag?('force', false)
28
29
  @should_clean = argv.flag?('clean', true)
@@ -1,3 +1,3 @@
1
1
  module XcodeInstall
2
- VERSION = '2.4.4'.freeze
2
+ VERSION = '2.5.0'.freeze
3
3
  end
@@ -35,6 +35,14 @@ module XcodeInstall
35
35
  Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true)
36
36
  Command::Install.run(['6.3', '--no-progress'])
37
37
  end
38
+
39
+ it 'reads .xcode-version' do
40
+ Installer.any_instance.expects(:download).with('6.3', true, nil, nil).returns('/some/path')
41
+ Installer.any_instance.expects(:install_dmg).with('/some/path', '-6.3', true, true)
42
+ File.expects(:exist?).with('.xcode-version').returns(true)
43
+ File.expects(:read).returns('6.3')
44
+ Command::Install.run([])
45
+ end
38
46
  end
39
47
 
40
48
  it 'parses hdiutil output' do
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: 2.4.4
4
+ version: 2.5.0
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: 2018-07-27 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.6.10
163
+ rubygems_version: 2.6.8
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Xcode installation manager.