xcselect 0.0.6 → 0.0.7

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.
@@ -1,3 +1,3 @@
1
1
  module Xcselect
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -22,13 +22,25 @@ class Xcode
22
22
 
23
23
  # Get an array of all installed xcode objects
24
24
  def self.find_all
25
+
25
26
  xcode_builds = `mdfind -name xcodebuild`.chomp.split
26
27
  #TODO: move this checking to init method
27
28
  xcode_builds = xcode_builds.select {|x| x =~ /\/xcodebuild$/ && !(x =~ /^\/(Volumes|usr\/bin\/)/) && File.exists?(x) }
28
29
  xcode_objs = xcode_builds.map {|p| Xcode.new p.sub( /\/usr\/bin.*/, '').chomp.strip }
30
+ # Xcode in now in a single application, look for that and use that as a candidate
31
+ xcode_objs += self.find_new_xcodes
29
32
  xcode_objs.sort
30
33
  end
31
-
34
+
35
+ def self.find_new_xcodes
36
+ # Xcode in now in a single application, look for that and use that as a candidate
37
+ newXcodes = `mdfind Xcode.app`.chomp.split
38
+ newXcodes = newXcodes.select do |x|
39
+ File.exists? x + "/Contents/Developer/usr/bin/xcodebuild"
40
+ end
41
+ newXcodes.map {|x| Xcode.new(x+"/Contents/Developer") }
42
+ end
43
+
32
44
  def self.current_xcode
33
45
  `xcode-select -print-path`.chomp
34
46
  end
Binary file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kim Hunter
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-11-30 00:00:00 +10:00
17
+ date: 2011-12-14 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -40,6 +40,7 @@ files:
40
40
  - pkg/xcselect-0.0.3.gem
41
41
  - pkg/xcselect-0.0.4.gem
42
42
  - pkg/xcselect-0.0.5.gem
43
+ - pkg/xcselect-0.0.6.gem
43
44
  - xcselect.gemspec
44
45
  has_rdoc: true
45
46
  homepage: ""