xcselect 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xcselect/version.rb +1 -1
- data/lib/xcselect/xcode.rb +2 -13
- metadata +2 -2
data/lib/xcselect/version.rb
CHANGED
data/lib/xcselect/xcode.rb
CHANGED
@@ -20,25 +20,14 @@ class Xcode
|
|
20
20
|
"Xcode: #{folder} - #{version} (#{build})"
|
21
21
|
end
|
22
22
|
|
23
|
-
# Get an array of all
|
23
|
+
# Get an array of all self contained .app style xcode objects
|
24
24
|
def self.find_all
|
25
|
-
|
26
|
-
xcode_builds = `mdfind -name xcodebuild`.chomp.split
|
27
|
-
#TODO: move this checking to init method
|
28
|
-
xcode_builds = xcode_builds.select {|x| x =~ /\/xcodebuild$/ && !(x =~ /^\/(Volumes|usr\/bin\/)/) && File.exists?(x) }
|
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
|
32
|
-
xcode_objs.sort
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.find_new_xcodes
|
36
25
|
# Xcode is now in a single application, look for that and use that as a candidate
|
37
26
|
newXcodes = `mdfind 'kMDItemCFBundleIdentifier = com.apple.dt.Xcode'`.chomp.split
|
38
27
|
newXcodes = newXcodes.select do |x|
|
39
28
|
File.exists? x + "/Contents/Developer/usr/bin/xcodebuild"
|
40
29
|
end
|
41
|
-
newXcodes.map {|x| Xcode.new(x+"/Contents/Developer") }
|
30
|
+
newXcodes.map {|x| Xcode.new(x + "/Contents/Developer") }.sort
|
42
31
|
end
|
43
32
|
|
44
33
|
def self.current_xcode
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcselect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: plist
|