xcode-install 2.4.0 → 2.4.1

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: fd49f95272394358487c0eed4f39884120ea0717
4
- data.tar.gz: f6dc4b73867986caaa06811a2c91e90f6741ec21
3
+ metadata.gz: e28c74420ebf53e8f127263aa2752211dff9bcd3
4
+ data.tar.gz: e48f8d0fd268fdd9756a15dbbfdf162c29a5268d
5
5
  SHA512:
6
- metadata.gz: 97e5d324c43f25f40f1b1682eac49544f6d695f44f2e27a942eb9782b635fb770bc271ef5ec81c93f4ace20523fa4cb2ad6dfb7dee03a446923d04feccae663e
7
- data.tar.gz: 3ee8b79219737c56cb9d9a8050be6bc88aa15d74b94329907ec742e11bf95341268517ce8aff4218a14192638b465441896bfbd77412fc28bae3615800d2dd9b
6
+ metadata.gz: d0224e430c804c00c9a04e6cc37c426f7a363c29f449ebbd64fb12ed8b1f3b6acc2b23c612ad5dfd4ef30b6610d3e731688b4cc7fc58f9ac685da3c66bcb8535
7
+ data.tar.gz: 6d861cc3114665ec9f1bdd53ca438b29e56ce3345b83e1831e8858e3935d61981e767d3c17818e54e4a600e770b70e9ea76e7ae09870b4ffa1e8f23adc581c57
data/README.md CHANGED
@@ -149,9 +149,11 @@ XcodeInstall automatically installs additional components so that it is immediat
149
149
  commandline. Unfortunately, Xcode will load third-party plugins even in that situation, which leads
150
150
  to a dialog popping up. Feel free to dupe [the radar][5]. 📡
151
151
 
152
- XcodeInstall uses the Spotlight index to locate installed versions of Xcode. If you use it while
152
+ XcodeInstall normally relies on the Spotlight index to locate installed versions of Xcode. If you use it while
153
153
  indexing is happening, it might show inaccurate results and it will not be able to see installed
154
- versions on unindexed volumes.
154
+ versions on unindexed volumes.
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.
155
157
 
156
158
  ## Thanks
157
159
 
@@ -297,7 +297,7 @@ HELP
297
297
  end
298
298
 
299
299
  def list
300
- list_annotated(list_versions.sort)
300
+ list_annotated(list_versions.sort_by(&:to_f))
301
301
  end
302
302
 
303
303
  def rm_list_cache
@@ -381,11 +381,13 @@ HELP
381
381
  end
382
382
 
383
383
  def installed
384
- unless (`mdutil -s /` =~ /disabled/).nil?
385
- raise 'Please enable Spotlight indexing for /Applications.'
384
+ result = `mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'" 2>/dev/null`.split("\n")
385
+ if result.empty?
386
+ result = `find /Applications -name '*.app' -type d -maxdepth 1 -exec sh -c \
387
+ 'if [ "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" \
388
+ "{}/Contents/Info.plist" 2>/dev/null)" == "com.apple.dt.Xcode" ]; then echo "{}"; fi' ';'`.split("\n")
386
389
  end
387
-
388
- `mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'" 2>/dev/null`.split("\n")
390
+ result
389
391
  end
390
392
 
391
393
  def parse_seedlist(seedlist)
@@ -628,7 +630,7 @@ HELP
628
630
  def install_components
629
631
  # starting with Xcode 9, we have `xcodebuild -runFirstLaunch` available to do package
630
632
  # postinstalls using a documented option
631
- if Gem::Version.new(@version) >= Gem::Version.new('9')
633
+ if Gem::Version.new(version) >= Gem::Version.new('9')
632
634
  `sudo #{@path}/Contents/Developer/usr/bin/xcodebuild -runFirstLaunch`
633
635
  else
634
636
  Dir.glob("#{@path}/Contents/Resources/Packages/*.pkg").each do |pkg|
@@ -1,3 +1,3 @@
1
1
  module XcodeInstall
2
- VERSION = '2.4.0'.freeze
2
+ VERSION = '2.4.1'.freeze
3
3
  end
@@ -25,8 +25,8 @@ module XcodeInstall
25
25
 
26
26
  describe '#list' do
27
27
  it 'lists all versions' do
28
- fake_xcodes '1', '2.3', '3 some', '4 beta'
29
- installer.list.should == "1\n2.3\n3 some\n4 beta"
28
+ fake_xcodes '1', '2.3', '2.3.1', '2.3.2', '3 some', '4 beta', '10 beta'
29
+ installer.list.should == "1\n2.3\n2.3.1\n2.3.2\n3 some\n4 beta\n10 beta"
30
30
  end
31
31
  end
32
32
  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: 2.4.0
4
+ version: 2.4.1
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-05-15 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide