xcode-install 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xcode/install.rb +2 -1
- data/lib/xcode/install/command.rb +2 -0
- data/lib/xcode/install/select.rb +30 -0
- data/lib/xcode/install/selected.rb +12 -0
- data/lib/xcode/install/version.rb +1 -1
- data/spec/fixtures/devcenter/xcode-20150909.html +309 -0
- data/spec/installed_spec.rb +10 -2
- data/spec/prerelease_spec.rb +8 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d15a8d796c7ad1cea26c0c0383c71a880068ef43
|
4
|
+
data.tar.gz: e9e2b4c06461351c2769572a836c520fc2329da5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 108a708788f8dcf609792e52c9a3b3921c46e83a5da8ecc02e7b207ad572dd55dac07ee80c338b409f41fab4e20da8bd72d57b38b44e70017e0b6de965a03326
|
7
|
+
data.tar.gz: 658f4df2d572e0d6bf096a0ed75d2ab1d7bf263c978fa3503a00a2f115f75bdf76f658c108ef939c1399260e9958195a23cf0c492f84395586b9a5f8f59d509b
|
data/lib/xcode/install.rb
CHANGED
@@ -229,7 +229,7 @@ HELP
|
|
229
229
|
end
|
230
230
|
|
231
231
|
def prereleases
|
232
|
-
body=spaceship.send(:request, :get, '/xcode/
|
232
|
+
body=spaceship.send(:request, :get, '/xcode/download/').body
|
233
233
|
links=body.scan(/<a.+?href="(.+?.dmg)".*>(.*)<\/a>/)
|
234
234
|
|
235
235
|
links.map { |pre| Xcode.new_prelease(pre[1].strip.gsub(/.*Xcode /, ''), pre[0]) }
|
@@ -258,6 +258,7 @@ HELP
|
|
258
258
|
|
259
259
|
def get_version(xcode_path)
|
260
260
|
output = `DEVELOPER_DIR='' "#{xcode_path}/Contents/Developer/usr/bin/xcodebuild" -version`
|
261
|
+
return '0.0' if output.nil? # ¯\_(ツ)_/¯
|
261
262
|
output.split("\n").first.split(' ')[1]
|
262
263
|
end
|
263
264
|
end
|
@@ -17,6 +17,8 @@ module XcodeInstall
|
|
17
17
|
require 'xcode/install/install'
|
18
18
|
require 'xcode/install/installed'
|
19
19
|
require 'xcode/install/list'
|
20
|
+
require 'xcode/install/select'
|
21
|
+
require 'xcode/install/selected'
|
20
22
|
require 'xcode/install/uninstall'
|
21
23
|
require 'xcode/install/update'
|
22
24
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module XcodeInstall
|
2
|
+
class Command
|
3
|
+
class Select < Command
|
4
|
+
self.command = 'select'
|
5
|
+
self.summary = 'Select installed Xcode via `xcode-select`.'
|
6
|
+
|
7
|
+
self.arguments = [
|
8
|
+
CLAide::Argument.new('VERSION', :true)
|
9
|
+
]
|
10
|
+
|
11
|
+
def initialize(argv)
|
12
|
+
@installer = Installer.new
|
13
|
+
@version = argv.shift_argument
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def validate!
|
18
|
+
super
|
19
|
+
|
20
|
+
fail Informative, "Please specify a version to select." if @version.nil?
|
21
|
+
fail Informative, "Version #{@version} not installed." unless @installer.installed?(@version)
|
22
|
+
end
|
23
|
+
|
24
|
+
def run
|
25
|
+
xcode = @installer.installed_versions.detect { |v| v.version == @version }
|
26
|
+
`sudo xcode-select --switch #{xcode.path}`
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,309 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5
|
+
<meta name="Author" content="Apple Inc." />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9">
|
8
|
+
<link rel="shortcut icon" href="/favicon.ico" />
|
9
|
+
<link rel="icon" href="/favicon.ico" />
|
10
|
+
|
11
|
+
<link rel="stylesheet" href="/assets/styles/global.css" type="text/css" />
|
12
|
+
|
13
|
+
<script src="https://devimages.apple.com.edgekey.net/assets/scripts/lib/jquery/jquery-1.11.0.min.js"></script>
|
14
|
+
<script src="https://devimages.apple.com.edgekey.net/assets/scripts/lib/jquery/jquery.retinate.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<!--[if lt IE 9]>
|
16
|
+
<link rel="stylesheet" href="/assets/styles/oldie.css" type="text/css" />
|
17
|
+
<script src="/assets/scripts/html5.js"></script>
|
18
|
+
<![endif]-->
|
19
|
+
<script src="/assets/scripts/lg-search.js"></script>
|
20
|
+
<script src="/assets/scripts/global.js"></script>
|
21
|
+
|
22
|
+
<link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=Myriad+Set+Pro&v=1" type="text/css" />
|
23
|
+
|
24
|
+
|
25
|
+
<title>Xcode - Downloads - Apple Developer</title>
|
26
|
+
<meta name="omni_page" content="Xcode Downloads and Resources - (English)">
|
27
|
+
<meta name="Description" content="Xcode includes the Xcode IDE, Instruments, iOS Simulator, the latest OS X and iOS SDKs, and more. Download Xcode and start creating apps for iOS and OS X.">
|
28
|
+
<meta name="robots" content="noodp,noydir" />
|
29
|
+
<link rel="alternate" href="https://developer.apple.com/kr/xcode/downloads/" hreflang="ko-KR" />
|
30
|
+
<link rel="alternate" href="https://developer.apple.com/jp/xcode/downloads/" hreflang="ja-JP" />
|
31
|
+
<link rel="alternate" href="https://developer.apple.com/cn/xcode/downloads/" hreflang="zh-CN" />
|
32
|
+
<link rel="alternate" href="https://developer.apple.com/xcode/downloads/" hreflang="en" />
|
33
|
+
<link rel="stylesheet" href="/xcode/styles/xcode.css" type="text/css" />
|
34
|
+
<style>
|
35
|
+
.bg-light {background-color:#fafafa;}
|
36
|
+
</style>
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
<nav id="globalheader" role="navigation" aria-label="Global Navigation">
|
40
|
+
<div id="gh-content" class="gh-content">
|
41
|
+
<ul class="gh-menu">
|
42
|
+
<li id="gh-menu-icon-toggle" class="gh-menu-icon gh-menu-icon-toggle enhance">
|
43
|
+
<button id="gh-svg-icons" class="gh-svg-wrapper">
|
44
|
+
<span class="text-replace">Menu</span>
|
45
|
+
<svg x="0px" y="0px" width="100%" viewBox="0 0 96 96" class="gh-svg gh-svg-top" enable-background="new 0 0 96 96"><rect width="32" height="4" x="32" y="46" class="gh-svg-rect gh-svg-rect-top"></rect></svg>
|
46
|
+
<svg x="0px" y="0px" width="100%" viewBox="0 0 96 96" class="gh-svg gh-svg-bottom" enable-background="new 0 0 96 96"><rect width="32" height="4" x="32" y="46" class="gh-svg-rect gh-svg-rect-bottom"></rect></svg>
|
47
|
+
</button>
|
48
|
+
</li>
|
49
|
+
<li id="gh-menu-icon-home" class="gh-menu-icon gh-menu-icon-home">
|
50
|
+
<a href="/"><span class="text-replace">Apple Developer</span></a>
|
51
|
+
</li>
|
52
|
+
</ul>
|
53
|
+
<div class="gh-nav">
|
54
|
+
<div class="gh-nav-view">
|
55
|
+
<ul class="gh-nav-list">
|
56
|
+
<li class="gh-tab gh-nav-developer" data-hires="true"><a class="gh-tab-link" href="/"><span class="text-replace">Apple Developer</span></a></li>
|
57
|
+
<li class="gh-tab gh-nav-technologies"><a class="gh-tab-link" href="/platforms/">Platforms</a></li>
|
58
|
+
<li class="gh-tab gh-nav-resources"><a class="gh-tab-link" href="/resources/">Resources</a></li>
|
59
|
+
<li class="gh-tab gh-nav-programs"><a class="gh-tab-link" href="/programs/">Programs</a></li>
|
60
|
+
<li class="gh-tab gh-nav-support"><a class="gh-tab-link" href="/support/">Support</a></li>
|
61
|
+
<li class="gh-tab gh-nav-account gh-nav-membercenter"><a class="gh-tab-link" href="/membercenter/">Member Center</a></li>
|
62
|
+
<li class="gh-tab gh-nav-search">
|
63
|
+
<div id="gh-search" class="gh-search" role="search">
|
64
|
+
<form action="/search/index.php" method="get" class="gh-search-form" id="gh-search-form" role="search">
|
65
|
+
<div class="gh-search-input-wrapper">
|
66
|
+
<label for="gh-search-input" class="text-replace">Search Apple Developer</label>
|
67
|
+
<input type="text" name="q" id="gh-search-input" class="augmented gh-search-input" placeholder="Search Apple Developer" autocomplete="off">
|
68
|
+
</div>
|
69
|
+
<button disabled type="submit" id="gh-search-submit" class="gh-search-submit gh-search-magnify"><span class="text-replace">Search Apple Developer</span></button>
|
70
|
+
<button disabled type="reset" id="gh-search-reset" class="gh-search-reset"><span class="text-replace">Reset</span></button>
|
71
|
+
</form>
|
72
|
+
</div>
|
73
|
+
<a class="gh-search-magnify" href="/search/"><span class="text-replace">Search Apple Developer</span></a>
|
74
|
+
</li>
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</nav>
|
80
|
+
|
81
|
+
<div id="top">
|
82
|
+
<!-- SiteCatalyst code version: H.8. Copyright 1997-2006 Omniture, Inc. -->
|
83
|
+
<script type="text/javascript">
|
84
|
+
/* RSID: */
|
85
|
+
var s_account="appleglobal,appleusdeveloper"
|
86
|
+
</script>
|
87
|
+
|
88
|
+
<script type="text/javascript" src="https://www.apple.com/metrics/scripts/s_code_h.js"></script>
|
89
|
+
<script type="text/javascript">
|
90
|
+
s.pageName=AC.Tracking.pageName();
|
91
|
+
s.channel="www.us.developer"
|
92
|
+
|
93
|
+
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
|
94
|
+
var s_code=s.t();if(s_code)document.write(s_code)</script>
|
95
|
+
<!-- End SiteCatalyst code version: H.8. -->
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<main id="main" class="main" role="main" data-hires="true">
|
99
|
+
|
100
|
+
<section class="sticky">
|
101
|
+
<nav class="subnav" role="navigation" aria-label="Local Navigation" data-hires="true">
|
102
|
+
<section class="sub-title"><h2><a href="/xcode/">Xcode</a></h2></section>
|
103
|
+
<ul>
|
104
|
+
<li><a href="/xcode/">What's New</a></li>
|
105
|
+
<li><a href="/xcode/ide/">Xcode IDE</a></li>
|
106
|
+
<li><a href="/xcode/interface-builder/">Interface Builder</a></li>
|
107
|
+
<li><a href="/xcode/features/">Features</a></li>
|
108
|
+
<li><a class="active" href="/xcode/downloads/">Download</a></li>
|
109
|
+
</ul>
|
110
|
+
</nav>
|
111
|
+
</section>
|
112
|
+
|
113
|
+
<section class="grid">
|
114
|
+
<section class="row">
|
115
|
+
<section class="col-100 text-center padding-top">
|
116
|
+
<h1>Download Xcode for Free</h1>
|
117
|
+
</section>
|
118
|
+
</section>
|
119
|
+
</section>
|
120
|
+
|
121
|
+
<div class="bg-light">
|
122
|
+
<div class="grid">
|
123
|
+
<section class="row compact">
|
124
|
+
<section class="col-20 padding-top">
|
125
|
+
<img class="center" src="https://devimages.apple.com.edgekey.net/assets/elements/icons/128x128/xcode6-beta.png" width="128" height="128" alt="">
|
126
|
+
</section>
|
127
|
+
<section class="col-60 padding-top">
|
128
|
+
<h4>Xcode 7.1 beta<span class="tag-purple">Pre-release</span></h4>
|
129
|
+
<p>This is the complete Xcode developer toolset for building apps that run on Apple TV, Apple Watch, iPhone, iPad, and Mac. It includes the Xcode IDE, simulators, and all the required tools and frameworks to build apps for iOS, watchOS, tvOS, and OS X.</span>
|
130
|
+
</p>
|
131
|
+
<ul class="links small">
|
132
|
+
<li class="dmg"><a href="/services-account/download?path=/Developer_Tools/Xcode_7.1_beta/Xcode_7.1_beta.dmg">Download Xcode 7.1 beta</a></li>
|
133
|
+
<li class="document"><a href="/services-account/download?path=/Developer_Tools/Xcode_7.1_beta/Xcode_7.1_beta_Release_Notes.pdf">Xcode 7.1 beta Release Notes</a></li>
|
134
|
+
</ul>
|
135
|
+
</section>
|
136
|
+
<section class="col-20 text-right">
|
137
|
+
<p class="sosumi no-margin-bottom margin-top-small">Build</p>
|
138
|
+
<p class="smaller lighter">7B60</p>
|
139
|
+
<p class="sosumi no-margin-bottom margin-top-small">Posted Date</p>
|
140
|
+
<p class="smaller lighter no-margin">Sep 9, 2015</p>
|
141
|
+
<p class="sosumi no-margin-bottom margin-top-small">SDK</p>
|
142
|
+
<p class="smaller lighter no-margin">iOS 9.1 beta</p>
|
143
|
+
<p class="smaller lighter no-margin">OS X v10.11</p>
|
144
|
+
<p class="smaller lighter no-margin">tvOS beta</p>
|
145
|
+
</section>
|
146
|
+
</section>
|
147
|
+
<section class="row compact divider-top">
|
148
|
+
<section class="col-20 padding-top">
|
149
|
+
<img class="center" src="https://devimages.apple.com.edgekey.net/assets/elements/icons/128x128/xcode6-beta.png" width="128" height="128" alt="">
|
150
|
+
</section>
|
151
|
+
<section class="col-60 padding-top">
|
152
|
+
<h4>Xcode 7 GM seed<span class="tag-purple">Pre-release</span></h4>
|
153
|
+
<p>This release includes the Xcode IDE, Swift 2 compiler, Instruments, Simulator, and latest SDKs for OS X, iOS, and watchOS.</span>
|
154
|
+
</p>
|
155
|
+
<ul class="links small">
|
156
|
+
<li class="dmg"><a href="/services-account/download?path=/Developer_Tools/Xcode_7_GM_seed/Xcode_7_GM_seed.dmg">Download Xcode 7 GM seed</a></li>
|
157
|
+
</ul>
|
158
|
+
</section>
|
159
|
+
<section class="col-20 text-right">
|
160
|
+
<p class="sosumi no-margin-bottom margin-top-small">Build</p>
|
161
|
+
<p class="smaller lighter">7A216</p>
|
162
|
+
<p class="sosumi no-margin-bottom margin-top-small">Posted Date</p>
|
163
|
+
<p class="smaller lighter no-margin">Sep 9, 2015</p>
|
164
|
+
<p class="sosumi no-margin-bottom margin-top-small">SDK</p>
|
165
|
+
<p class="smaller lighter no-margin">iOS 9</p>
|
166
|
+
<p class="smaller lighter no-margin">OS X v10.11</p>
|
167
|
+
</section>
|
168
|
+
</section>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
<div class="grid">
|
172
|
+
<div class="row compact">
|
173
|
+
<section class="col-20 padding-top">
|
174
|
+
<img class="center" src="/assets/elements/icons/128x128/xcode6.png" width="128" height="128" alt="">
|
175
|
+
</section>
|
176
|
+
<section class="col-60 padding-top">
|
177
|
+
<h4>Xcode 6.4</h4>
|
178
|
+
<p>This release includes the Xcode IDE, LLVM compiler, Instruments, iOS Simulator, the latest OS X and iOS SDKs, WatchKit and the Swift 1.2 programming language.</span>
|
179
|
+
</p>
|
180
|
+
<p><a class="more" href="http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12">View in the Mac App Store</a></p>
|
181
|
+
</section>
|
182
|
+
<section class="col-20 text-right">
|
183
|
+
<p class="sosumi no-margin-bottom margin-top-small">Build</p>
|
184
|
+
<p class="smaller lighter">6E35b</p>
|
185
|
+
<p class="sosumi no-margin-bottom margin-top-small">Posted Date</p>
|
186
|
+
<p class="smaller lighter no-margin">Jun 30, 2015</p>
|
187
|
+
<p class="sosumi no-margin-bottom margin-top-small">SDK</p>
|
188
|
+
<p class="smaller lighter no-margin">iOS 8.4</p>
|
189
|
+
<p class="smaller lighter no-margin">OS X v10.10</p>
|
190
|
+
</section>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div class="grid">
|
195
|
+
<div class="row">
|
196
|
+
<section class="col-100 padding-top no-padding-bottom">
|
197
|
+
<h4>Related Downloads and Resources</h4>
|
198
|
+
</section>
|
199
|
+
</div>
|
200
|
+
<div class="row">
|
201
|
+
<section class="col-25">
|
202
|
+
<img src="/assets/elements/icons/32x32/download.svg" width="32" height="32" alt="" />
|
203
|
+
<p class="smaller no-margin"><a href="/downloads/">Additional Tools</a></p>
|
204
|
+
<p class="smaller">Sign in with your Apple ID to download previous versions of Xcode or additional tools from the developer downloads site.</p>
|
205
|
+
</section>
|
206
|
+
<section class="col-25">
|
207
|
+
<img src="/assets/elements/icons/32x32/video.svg" width="32" height="32" alt="" />
|
208
|
+
<p class="smaller no-margin"><a href="/videos/">Videos</a></p>
|
209
|
+
<p class="smaller">Watch and learn from Apple engineers as they explain how to bring the best of Apple technologies to your apps.</p>
|
210
|
+
</section>
|
211
|
+
<section class="col-25">
|
212
|
+
<img src="/assets/elements/icons/32x32/library.svg" width="32" height="32" alt="" />
|
213
|
+
<p class="smaller no-margin"><a href="/library/ios/navigation/#section=Topics&topic=Xcode">Guides and Tutorials</a></p>
|
214
|
+
<p class="smaller">Find a comprehensive set of programming guides, reference, and sample code for developing with the latest tools and technologies on iOS and OS X.</p>
|
215
|
+
</section>
|
216
|
+
<section class="col-25">
|
217
|
+
<img src="/assets/elements/icons/32x32/forum-topic.svg" width="32" height="32" alt="" />
|
218
|
+
<p class="smaller no-margin"><a href="https://forums.developer.apple.com/community/xcode/">Forums</a></p>
|
219
|
+
<p class="smaller">Post questions and share thoughts about using Xcode with fellow developers.</p>
|
220
|
+
</section>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
</main>
|
225
|
+
|
226
|
+
<footer id="globalfooter" class="no-margin-top" role="contentinfo">
|
227
|
+
<nav class="footer-breadory">
|
228
|
+
<a href="/" class="home breadcrumbs-home"><span aria-hidden="true"></span><span class="breadcrumbs-home-label">Developer</span></a>
|
229
|
+
<section class="breadcrumbs">
|
230
|
+
<ol class="breadcrumbs-list">
|
231
|
+
<li><a href="/xcode/">Xcode</a></li>
|
232
|
+
<li>Downloads</li>
|
233
|
+
</ol>
|
234
|
+
</section>
|
235
|
+
<div id="directorynav" class="directorynav">
|
236
|
+
<div id="dn-cola" class="column">
|
237
|
+
<h3><a href="/platforms/">Platforms</a></h3>
|
238
|
+
<ul>
|
239
|
+
<li><a href="/ios/">iOS</a></li>
|
240
|
+
<li><a href="/osx/">OS X</a></li>
|
241
|
+
<li><a href="/watchos/">watchOS</a></li>
|
242
|
+
<li><a href="/tvos/">tvOS</a></li>
|
243
|
+
</ul>
|
244
|
+
</div>
|
245
|
+
<div id="dn-colb" class="column">
|
246
|
+
<h3><a href="/resources/">Resources</a></h3>
|
247
|
+
<ul>
|
248
|
+
<li><a href="/xcode/">Xcode</a></li>
|
249
|
+
<li><a href="/swift/">Swift</a></li>
|
250
|
+
<li><a href="/library/">Documentation</a></li>
|
251
|
+
<li><a href="/videos/">Videos</a></li>
|
252
|
+
<li><a href="https://forums.developer.apple.com/">Forums</a></li>
|
253
|
+
</ul>
|
254
|
+
</div>
|
255
|
+
<div id="dn-colc" class="column">
|
256
|
+
<h3><a href="/programs/">Programs</a></h3>
|
257
|
+
<ul>
|
258
|
+
<li><a href="/programs/">Developer Program</a></li>
|
259
|
+
<li><a href="/programs/enterprise/">Enterprise Program</a></li>
|
260
|
+
<li><a href="/programs/ios/university/">iOS University Program</a></li>
|
261
|
+
<li><a href="/programs/mfi/">MFi Program</a></li>
|
262
|
+
</ul>
|
263
|
+
</div>
|
264
|
+
<div id="dn-cold" class="column">
|
265
|
+
<h3><a href="/support/">Support</a></h3>
|
266
|
+
<ul>
|
267
|
+
<li><a href="/support/development/">Development</a></li>
|
268
|
+
<li><a href="/support/distribution/">Distribution</a></li>
|
269
|
+
<li><a href="/support/membership/">Membership</a></li>
|
270
|
+
<li><a href="/system-status/">System Status</a></li>
|
271
|
+
</ul>
|
272
|
+
</div>
|
273
|
+
<div id="dn-cole" class="column">
|
274
|
+
<h3><a href="/membercenter/">Member Center</a></h3>
|
275
|
+
<ul>
|
276
|
+
<li><a href="/membercenter/">Developer Account</a></li>
|
277
|
+
<li><a href="/account/overview.action">Certs, IDs, & Profiles</a></li>
|
278
|
+
<li><a href="/terms/">License Agreements</a></li>
|
279
|
+
</ul>
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</nav>
|
284
|
+
<ul class="gf-links piped footer-links">
|
285
|
+
<li><a href="/news/" class="first">News</a></li>
|
286
|
+
<li><a href="/bug-reporting/">Report Bugs</a></li>
|
287
|
+
<li><a href="/contact/">Contact Us</a></li>
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
<div class="gf-sosumi footer-sosumi">
|
291
|
+
<p>Copyright © 2015 Apple Inc. All rights reserved.</p>
|
292
|
+
<ul class="piped">
|
293
|
+
<li><a href="http://www.apple.com/legal/internet-services/terms/site.html" class="first">Terms of Use</a></li>
|
294
|
+
<li><a href="http://www.apple.com/privacy/privacy-policy/">Updated Privacy Policy</a></li>
|
295
|
+
</ul>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<!--<div id="gf-links piped footer-links">
|
299
|
+
<ul>
|
300
|
+
<li><a href="/cn/" title="Simplified Chinese">简体中文</a></li>
|
301
|
+
<li><a href="/jp/" title="Japanese">日本語</a></li>
|
302
|
+
<li><a href="/kr/" title="Korean">한국어</a></li>
|
303
|
+
</ul>
|
304
|
+
</div>-->
|
305
|
+
|
306
|
+
</footer><!-- globalfooter -->
|
307
|
+
|
308
|
+
</body>
|
309
|
+
</html>
|
data/spec/installed_spec.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
require File.expand_path('../spec_helper', __FILE__)
|
2
2
|
|
3
3
|
module XcodeInstall
|
4
|
+
xcode_path = '/Volumes/Macintosh HD/Applications/Xcode Beta'
|
5
|
+
|
4
6
|
describe InstalledXcode do
|
5
7
|
it 'finds the current Xcode version with whitespace chars' do
|
6
|
-
InstalledXcode.any_instance.expects(:`).with("DEVELOPER_DIR='' \"/
|
7
|
-
installed = InstalledXcode.new(
|
8
|
+
InstalledXcode.any_instance.expects(:`).with("DEVELOPER_DIR='' \"#{xcode_path}/Contents/Developer/usr/bin/xcodebuild\" -version").returns("Xcode 6.3.1\nBuild version 6D1002")
|
9
|
+
installed = InstalledXcode.new(xcode_path)
|
8
10
|
installed.version.should == '6.3.1'
|
9
11
|
end
|
12
|
+
|
13
|
+
it 'is robust against broken Xcode installations' do
|
14
|
+
InstalledXcode.any_instance.expects(:`).with("DEVELOPER_DIR='' \"#{xcode_path}/Contents/Developer/usr/bin/xcodebuild\" -version").returns(nil)
|
15
|
+
installed = InstalledXcode.new(xcode_path)
|
16
|
+
installed.version.should == '0.0'
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
data/spec/prerelease_spec.rb
CHANGED
@@ -61,5 +61,13 @@ module XcodeInstall
|
|
61
61
|
prereleases.first.should == Xcode.new_prelease('7 beta 2', '/Developer_Tools/Xcode_7_beta_2/Xcode_7_beta_2.dmg')
|
62
62
|
prereleases.last.should == Xcode.new_prelease('6.4 beta 4', '/WWDC_2015/Xcode_6.4_beta_4/Xcode_6.4_beta_4.dmg')
|
63
63
|
end
|
64
|
+
|
65
|
+
it 'can parse prereleases from 20150909' do
|
66
|
+
prereleases = parse_prereleases('20150909')
|
67
|
+
|
68
|
+
prereleases.count.should == 2
|
69
|
+
prereleases.first.should == Xcode.new_prelease('7.1 beta', '/Developer_Tools/Xcode_7.1_beta/Xcode_7.1_beta.dmg')
|
70
|
+
prereleases.last.should == Xcode.new_prelease('7 GM seed', '/Developer_Tools/Xcode_7_GM_seed/Xcode_7_GM_seed.dmg')
|
71
|
+
end
|
64
72
|
end
|
65
73
|
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.
|
4
|
+
version: 0.9.4
|
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-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -89,6 +89,8 @@ files:
|
|
89
89
|
- lib/xcode/install/install.rb
|
90
90
|
- lib/xcode/install/installed.rb
|
91
91
|
- lib/xcode/install/list.rb
|
92
|
+
- lib/xcode/install/select.rb
|
93
|
+
- lib/xcode/install/selected.rb
|
92
94
|
- lib/xcode/install/uninstall.rb
|
93
95
|
- lib/xcode/install/update.rb
|
94
96
|
- lib/xcode/install/version.rb
|
@@ -98,6 +100,7 @@ files:
|
|
98
100
|
- spec/fixtures/devcenter/xcode-20150601.html
|
99
101
|
- spec/fixtures/devcenter/xcode-20150608.html
|
100
102
|
- spec/fixtures/devcenter/xcode-20150624.html
|
103
|
+
- spec/fixtures/devcenter/xcode-20150909.html
|
101
104
|
- spec/fixtures/xcode.json
|
102
105
|
- spec/fixtures/xcode_63.json
|
103
106
|
- spec/fixtures/yolo.json
|
@@ -139,6 +142,7 @@ test_files:
|
|
139
142
|
- spec/fixtures/devcenter/xcode-20150601.html
|
140
143
|
- spec/fixtures/devcenter/xcode-20150608.html
|
141
144
|
- spec/fixtures/devcenter/xcode-20150624.html
|
145
|
+
- spec/fixtures/devcenter/xcode-20150909.html
|
142
146
|
- spec/fixtures/xcode.json
|
143
147
|
- spec/fixtures/xcode_63.json
|
144
148
|
- spec/fixtures/yolo.json
|