xcode-install 2.0.1 → 2.0.2

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: e5bb15346276992e9efe8826ae29e61c2cf15483
4
- data.tar.gz: b9432736f74b253a51e7700fe6a81c272dfc8c79
3
+ metadata.gz: 64ff34358c7fb918d506d7a4501ef8fef1819324
4
+ data.tar.gz: b91c43a672eb6d8b15c73c819f11106d6c1a349d
5
5
  SHA512:
6
- metadata.gz: 97c42dee208235cdaf240ab04c9efc09e611f8388812be668f67a04bd86a8d5a981b22a6dbefff828d6fbb0478ac1089fb34cd7d51ff10422b5d3a6ed050a050
7
- data.tar.gz: f083426451c515430ed6594e0290b8805d1b2bff5131f7377ffcb415f4cf079112445e9a431bb21234472f8eab66beb871c4bc0b1ce5ea9ee77e13c208133798
6
+ metadata.gz: 8048bcd336b8616dfcb907d2ffec1f1f664844a1c716149118511d4f0f35e19cb705b533dace6157f11b609b79b2a9b20877e83cadda78543567d74bb906e2c5
7
+ data.tar.gz: b80f8108be93f28002fce5337c3ed2d195741f9991c1d9e0df29a8a9a518b81211c1e4882dc9d3a9ac3fdf0b2c7b716018faf638adf80d1cb49c9d8ac289552c
data/lib/xcode/install.rb CHANGED
@@ -267,7 +267,7 @@ HELP
267
267
  def prereleases
268
268
  body = spaceship.send(:request, :get, '/download/').body
269
269
 
270
- links = body.scan(%r{<a.+?href="(.+?.dmg)".*>(.*)</a>})
270
+ links = body.scan(%r{<a.+?href="(.+?\.(dmg|xip))".*>(.*)</a>})
271
271
  links = links.map do |link|
272
272
  parent = link[0].scan(%r{path=(/.*/.*/)}).first.first
273
273
  match = body.scan(/#{Regexp.quote(parent)}(.+?.pdf)/).first
@@ -277,7 +277,7 @@ HELP
277
277
  link + [nil]
278
278
  end
279
279
  end
280
- links = links.map { |pre| Xcode.new_prerelease(pre[1].strip.gsub(/.*Xcode /, ''), pre[0], pre[2]) }
280
+ links = links.map { |pre| Xcode.new_prerelease(pre[2].strip.gsub(/.*Xcode /, ''), pre[0], pre[3]) }
281
281
 
282
282
  if links.count == 0
283
283
  version = body.scan(%r{Xcode.* beta.*<\/p>}).last.gsub(/<.*?>/, '').gsub(/.*Xcode /, '')
@@ -1,3 +1,3 @@
1
1
  module XcodeInstall
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
@@ -0,0 +1,317 @@
1
+
2
+
3
+
4
+ <!DOCTYPE html>
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
8
+ <meta name="Author" content="Apple Inc." />
9
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
10
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9">
11
+ <link rel="shortcut icon" href="/favicon.ico" />
12
+ <link rel="icon" href="/favicon.ico" />
13
+ <link rel="mask-icon" href="/apple-logo.svg" color="#333333">
14
+
15
+ <link rel="stylesheet" href="/assets/styles/globalnav.css" type="text/css" />
16
+ <link rel="stylesheet" href="/assets/styles/global.css" type="text/css" />
17
+
18
+ <script src="https://devimages.apple.com.edgekey.net/assets/scripts/lib/jquery/jquery-1.11.0.min.js"></script>
19
+ <script src="https://devimages.apple.com.edgekey.net/assets/scripts/lib/jquery/jquery.retinate.js" type="text/javascript" charset="utf-8"></script>
20
+ <!--[if lt IE 9]>
21
+ <link rel="stylesheet" href="/assets/styles/oldie.css" type="text/css" />
22
+ <script src="/assets/scripts/html5.js"></script>
23
+ <![endif]-->
24
+ <script src="/assets/scripts/lg-search.js"></script>
25
+ <script src="/assets/scripts/global.js"></script>
26
+
27
+ <link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=Myriad+Set+Pro&v=2" type="text/css" />
28
+
29
+ <title>Download - Apple Developer</title>
30
+ <meta name="omni_page" content="Download - Apple Developer">
31
+ <link rel="stylesheet" href="/download/styles/download.css" type="text/css" />
32
+
33
+
34
+ </head>
35
+ <body>
36
+ <input type="checkbox" id="ac-gn-menustate" class="ac-gn-menustate">
37
+ <nav id="ac-globalnav" class="no-js" role="navigation" aria-label="Global Navigation" data-hires="false" data-analytics-region="global nav" lang="en-US">
38
+ <div class="ac-gn-content">
39
+ <ul class="ac-gn-header">
40
+ <li class="ac-gn-item ac-gn-menuicon"> <label class="ac-gn-menuicon-label" for="ac-gn-menustate" aria-hidden="true">
41
+ <span class="ac-gn-menuicon-bread ac-gn-menuicon-bread-top">
42
+ <span class="ac-gn-menuicon-bread-crust ac-gn-menuicon-bread-crust-top"></span>
43
+ </span>
44
+ <span class="ac-gn-menuicon-bread ac-gn-menuicon-bread-bottom">
45
+ <span class="ac-gn-menuicon-bread-crust ac-gn-menuicon-bread-crust-bottom"></span>
46
+ </span>
47
+ </label>
48
+ <a href="#ac-gn-menustate" class="ac-gn-menuanchor ac-gn-menuanchor-open" id="ac-gn-menuanchor-open"> <span class="ac-gn-menuanchor-label">Open Menu</span> </a>
49
+ <a href="#" class="ac-gn-menuanchor ac-gn-menuanchor-close" id="ac-gn-menuanchor-close"> <span class="ac-gn-menuanchor-label">Close Menu</span> </a>
50
+ </li>
51
+ <li class="ac-gn-item ac-gn-apple">
52
+ <a class="ac-gn-link ac-gn-link-apple" href="/" id="ac-gn-firstfocus-small"> <span class="ac-gn-link-text">Apple Developer</span> </a>
53
+ </li>
54
+ <li class="ac-gn-item ac-gn-bag ac-gn-bag-small" id="ac-gn-bag-small">
55
+ <a class="ac-gn-link ac-gn-link-bag" href="/account/"> <span class="ac-gn-link-text">Account</span> <span class="ac-gn-bag-badge"></span> </a> <span class="ac-gn-bagview-caret ac-gn-bagview-caret-large"></span> </li>
56
+ </ul>
57
+ <ul class="ac-gn-list">
58
+ <li class="ac-gn-item ac-gn-apple">
59
+ <a class="ac-gn-link ac-gn-link-apple" href="/" id="ac-gn-firstfocus"> <span class="ac-gn-link-text">Apple Developer</span> </a>
60
+ </li>
61
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-discover">
62
+ <a class="ac-gn-link" href="/discover/"> <span>Discover</span> </a>
63
+ </li>
64
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-design">
65
+ <a class="ac-gn-link" href="/design/"> <span>Design</span> </a>
66
+ </li>
67
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-develop">
68
+ <a class="ac-gn-link" href="/develop/"> <span>Develop</span> </a>
69
+ </li>
70
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-distribute">
71
+ <a class="ac-gn-link" href="/distribute/"> <span>Distribute</span> </a>
72
+ </li>
73
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-support">
74
+ <a class="ac-gn-link" href="/support/"> <span>Support</span> </a>
75
+ </li>
76
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-account">
77
+ <a class="ac-gn-link" href="/account/"> <span>Account</span> </a>
78
+ </li>
79
+ <li class="ac-gn-item ac-gn-item-menu ac-gn-search" role="search">
80
+ <a id="ac-gn-search-button" class="ac-gn-link ac-gn-link-search" href="/search/" aria-label="Search developer.apple.com"> <span class="ac-gn-search-placeholder" aria-hidden="true">Search</span> </a>
81
+ </li>
82
+ </ul>
83
+ <aside id="ac-gn-searchview" class="ac-gn-searchview" role="search" data-analytics-region="search">
84
+ <div class="ac-gn-searchview-content">
85
+ <form id="ac-gn-searchform" class="ac-gn-searchform" action="/search/" method="get">
86
+ <div class="ac-gn-searchform-wrapper"> <input id="ac-gn-searchform-input" class="ac-gn-searchform-input" type="text" name="q" placeholder="Search" data-placeholder-long="Search for documentation, videos, and more" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" /> <button id="ac-gn-searchform-submit" class="ac-gn-searchform-submit" type="submit" disabled aria-label="Submit"></button> <button id="ac-gn-searchform-reset" class="ac-gn-searchform-reset" type="reset" disabled aria-label="Clear Search"></button> </div>
87
+ </form>
88
+ <aside id="ac-gn-searchresults" class="ac-gn-searchresults" data-string-quicklinks="Quick Links" data-string-suggestions="Suggested Searches" data-string-noresults="Hit enter to search.">
89
+
90
+ </aside>
91
+ </div> <button id="ac-gn-searchview-close" class="ac-gn-searchview-close" aria-label="Close Search">
92
+ <span class="ac-gn-searchview-close-wrapper">
93
+ <span class="ac-gn-searchview-close-left"></span>
94
+ <span class="ac-gn-searchview-close-right"></span>
95
+ </span>
96
+ </button> </aside>
97
+ </div>
98
+ </nav>
99
+ <div id="ac-gn-curtain" class="ac-gn-curtain"></div>
100
+ <div id="ac-gn-placeholder" class="ac-nav-placeholder"></div>
101
+ <script type="text/javascript" src="/assets/scripts/ac-globalnav.built.js"></script>
102
+
103
+ <div id="top">
104
+ <!-- SiteCatalyst code version: H.8. Copyright 1997-2006 Omniture, Inc. -->
105
+ <script type="text/javascript">
106
+ /* RSID: */
107
+ var s_account="appleglobal,appleusdeveloper"
108
+ </script>
109
+
110
+ <script type="text/javascript" src="https://www.apple.com/metrics/scripts/s_code_h.js"></script>
111
+ <script type="text/javascript">
112
+ s.pageName= AC && AC.Tracking && AC.Tracking.pageName();
113
+ s.channel="www.us.developer"
114
+
115
+ /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
116
+ var s_code=s.t();if(s_code)document.write(s_code)</script>
117
+ <!-- End SiteCatalyst code version: H.8. -->
118
+ </div>
119
+
120
+ <main id="main" class="main" role="main">
121
+
122
+ <section class="grid">
123
+ <section class="row">
124
+ <section class="col-100">
125
+ <nav class="logout-bar">
126
+ <ul>
127
+ <li>Nicholas Cobb</li>
128
+ <li> | </li>
129
+ <li><a href="/logout/?return=%2Fios%2Fdownload%2Fwwdc%2F" class="sign-out">Sign out</a></li>
130
+ </ul>
131
+ </nav>
132
+ <h1 class="text-center">Downloads</h1>
133
+ <p class=" text-center center width-75 intro">Get the latest beta releases of Xcode, iOS, macOS, watchOS, tvOS, and more.</p>
134
+ </section>
135
+ </section>
136
+ </section>
137
+
138
+ <!--END PAY WALL -->
139
+ <div class="grid">
140
+ <div class="row compact">
141
+ <section class="col-20 padding-top">
142
+ <img class="center" src="/assets/elements/icons/128x128/xcode6-beta.png" width="128" height="128" alt="" />
143
+ </section>
144
+ <section class="col-60 padding-top">
145
+ <h4>Xcode 8 beta 2</h4>
146
+ <p>
147
+ </p>
148
+ <ul class="links small">
149
+ <li class="download"><a href="/services-account/download?path=/Developer_Tools/Xcode_8_beta_2/Xcode_8_beta_2.xip">Download Xcode 8 beta 2</a></li>
150
+ </ul>
151
+ <ul class="links small">
152
+ <li class="document"><a href="/go/?id=xcode-8-beta-rn">Release Notes</a></li>
153
+ </ul>
154
+ </section>
155
+ <section class="col-20 text-right">
156
+ <p class="sosumi no-margin-bottom margin-top-small">Build</p>
157
+ <p class="smaller lighter">8S162m</p>
158
+ <p class="sosumi no-margin-bottom margin-top-small">Posted Date</p>
159
+ <p class="smaller lighter no-margin">Jul 5, 2016</p>
160
+ <p class="sosumi no-margin-bottom margin-top-small">SDKs</p>
161
+ <p class="smaller lighter no-margin">iOS 10</p>
162
+ <p class="smaller lighter no-margin">macOS 10.12</p>
163
+ <p class="smaller lighter no-margin">watchOS 3</p>
164
+ <p class="smaller lighter no-margin">tvOS 10</p>
165
+ </section>
166
+ </div>
167
+
168
+ <div class="row divider-top compact">
169
+ <section class="col-20 padding-top">
170
+ <img class="center" src="/assets/elements/icons/128x128/xcode6.png" width="128" height="128" alt="" />
171
+ </section>
172
+ <section class="col-60 padding-top">
173
+ <h4>Xcode 7.3.1</h4>
174
+ <p>This release includes the Xcode IDE, Swift 2 compiler, Instruments, Simulator, and latest SDKs for OS&nbsp;X, iOS, tvOS and watchOS.</p>
175
+ <p><a class="more" href="https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12">View in the Mac App Store</a></p>
176
+ <ul class="links small">
177
+ <li class="document"><a href="/go/?id=xcode-7.3.1-rn">Xcode 7.3.1 Release Notes</a></li>
178
+ </ul>
179
+ </section>
180
+ <section class="col-20 text-right">
181
+ <p class="sosumi no-margin-bottom margin-top-small">Build</p>
182
+ <p class="smaller lighter">7D1014</p>
183
+ <p class="sosumi no-margin-bottom margin-top-small">Posted Date</p>
184
+ <p class="smaller lighter no-margin">May 3, 2016</p>
185
+ <p class="sosumi no-margin-bottom margin-top-small">SDK</p>
186
+ <p class="smaller lighter no-margin">iOS 9.3</p>
187
+ <p class="smaller lighter no-margin">OS X 10.11.4</p>
188
+ <p class="smaller lighter no-margin">watchOS 2.2</p>
189
+ <p class="smaller lighter no-margin">tvOS 9.2</p>
190
+ </section>
191
+ </div>
192
+ </div>
193
+
194
+ <div class="bg-grad-down">
195
+ <div class="grid">
196
+ <div class="row compact">
197
+ <section class="col-100 padding-top padding-bottom margin-top margin-bottom">
198
+ <p class="intro width-80 center text-center">Your Apple ID must be associated with a paid Apple Developer Program or Apple Developer Enterprise Program to access certain software downloads. You can download Xcode below or sign in with a different account.</p>
199
+
200
+ <p class="text-center">Are you signed in with the wrong account? <a href="/logout/?return=%2Fios%2Fdownload%2Fwwdc%2F" class="sign-out">Sign out</a> and sign back in.</p>
201
+ </section>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+
207
+
208
+
209
+
210
+ </main>
211
+
212
+ <div class="bg-light">
213
+ <aside class="grid">
214
+ <section id="router" class="router">
215
+ <a href="/download/more/" class="block row">
216
+ <span class="col-100 text-center">
217
+ <span class="two-lines">
218
+ <h4>
219
+ <small>Don't see what you're looking for?</small>
220
+ See more downloads
221
+ </h4>
222
+ </span>
223
+ </span>
224
+ </a>
225
+ </section>
226
+ </aside>
227
+ </div>
228
+
229
+
230
+ <section id="globalfooter-wrapper">
231
+ <footer id="globalfooter" role="contentinfo">
232
+ <nav class="footer-breadory">
233
+ <a href="/" class="home breadcrumbs-home"><span aria-hidden="true"></span><span class="breadcrumbs-home-label">Developer</span></a>
234
+ <section class="breadcrumbs">
235
+ <ol class="breadcrumbs-list">
236
+ <li>Download</li>
237
+ </ol>
238
+ </section>
239
+ <div id="directorynav" class="directorynav">
240
+ <div id="dn-cola" class="column">
241
+ <h3><a href="/discover/">Discover</a></h3>
242
+ <ul>
243
+ <li><a href="/macos/">macOS</a></li>
244
+ <li><a href="/ios/">iOS</a></li>
245
+ <li><a href="/watchos/">watchOS</a></li>
246
+ <li><a href="/tvos/">tvOS</a></li>
247
+ <li><a href="/programs/">Developer Program</a></li>
248
+ <li><a href="/enterprise/">Enterprise</a></li>
249
+ <li><a href="/education/">Education</a></li>
250
+ </ul>
251
+
252
+ </div>
253
+ <div id="dn-colb" class="column">
254
+ <h3><a href="/design/">Design</a></h3>
255
+ <ul>
256
+ <li><a href="/accessibility/">Accessibility</a></li>
257
+ <li><a href="/cases/">Accessories</a></li>
258
+ <li><a href="/design/adaptivity/">Adaptivity</a></li>
259
+ <li><a href="/design/awards/">Apple Design Awards</a></li>
260
+ <li><a href="/fonts/">Fonts</a></li>
261
+ <li><a href="/videos/design/">Design Videos</a></li>
262
+ <li><a href="/app-store/marketing/guidelines/">Marketing Guidelines</a></li>
263
+ </ul>
264
+ </div>
265
+ <div id="dn-colc" class="column">
266
+ <h3><a href="/develop/">Develop</a></h3>
267
+ <ul>
268
+ <li><a href="/xcode/">Xcode</a></li>
269
+ <li><a href="/swift/">Swift</a></li>
270
+ <li><a href="/download/">Downloads</a></li>
271
+ <li><a href="/reference/">API Reference</a></li>
272
+ <li><a href="/library/prerelease/content/navigation/">Guides</a></li>
273
+ <li><a href="/library/prerelease/content/navigation/#section=Resource%20Types&topic=Sample%20Code">Sample Code</a></li>
274
+ <li><a href="/videos/">Videos</a></li>
275
+ </ul>
276
+
277
+ </div>
278
+ <div id="dn-cold" class="column">
279
+ <h3><a href="/distribute/">Distribute</a></h3>
280
+ <ul>
281
+ <li><a href="/app-store/">App Store</a></li>
282
+ <li><a href="/app-store/review/">App Review</a></li>
283
+ <li><a href="https://itunesconnect.apple.com/">iTunes Connect</a></li>
284
+ <li><a href="/testflight/">TestFlight</a></li>
285
+ <li><a href="/enterprise/">Enterprise</a></li>
286
+ <li><a href="/safari/extensions/">Safari Extensions</a></li>
287
+ </ul>
288
+ </div>
289
+ <div id="dn-cole" class="column">
290
+ <h3><a href="/support/">Support</a></h3>
291
+ <ul>
292
+ <li><a href="https://forums.developer.apple.com">Developer Forums</a></li>
293
+ <li><a href="/contact/">Contact Us</a></li>
294
+ <li><a href="/bug-reporting/">Bug Reporting</a></li>
295
+ <li><a href="/terms/">License Agreements</a></li>
296
+ <li><a href="/system-status/">System Status</a></li>
297
+ </ul>
298
+ </div>
299
+ </div>
300
+
301
+ </nav>
302
+ <div class="ac-gf-footer-legal">
303
+ <div class="ac-gf-footer-news"> To receive the latest developer news, visit and subscribe to our <a href="/news/">News and Updates</a>. </div>
304
+ <div class="ac-gf-footer-legal-copyright">Copyright © 2016 Apple Inc. All rights reserved.</div>
305
+ <div class="ac-gf-footer-legal-links">
306
+ <a href="https://www.apple.com/legal/internet-services/terms/site.html" class="first">Terms of Use</a>
307
+ <a href="https://www.apple.com/privacy/privacy-policy/">Privacy Policy</a>
308
+ <a href="/bug-reporting/">Report Bugs</a>
309
+ <a href="/contact/submit/">Feedback</a>
310
+ </div>
311
+ </div>
312
+
313
+ </footer>
314
+ </section>
315
+
316
+ </body>
317
+ </html>
@@ -83,5 +83,12 @@ module XcodeInstall
83
83
  prereleases.count.should == 1
84
84
  prereleases.first.should == Xcode.new('8 beta 2', '/services-account/download?path=/Developer_Tools/Xcode_8_beta_2/Xcode_8_beta_2.xip', '/go/?id=xcode-8-beta-rn')
85
85
  end
86
+
87
+ it 'can parse prereleases from 20160705 (alternative page)' do
88
+ prereleases = parse_prereleases('20160705-alt')
89
+
90
+ prereleases.count.should == 1
91
+ prereleases.first.should == Xcode.new_prerelease('8 beta 2', '/devcenter/download.action?path=/Developer_Tools/Xcode_8_beta_2/Xcode_8_beta_2.xip', nil)
92
+ end
86
93
  end
87
94
  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.0.1
4
+ version: 2.0.2
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: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -121,6 +121,7 @@ files:
121
121
  - spec/fixtures/devcenter/xcode-20150624.html
122
122
  - spec/fixtures/devcenter/xcode-20150909.html
123
123
  - spec/fixtures/devcenter/xcode-20160601.html
124
+ - spec/fixtures/devcenter/xcode-20160705-alt.html
124
125
  - spec/fixtures/devcenter/xcode-20160705.html
125
126
  - spec/fixtures/hdiutil.plist
126
127
  - spec/fixtures/mail-verify.html
@@ -170,6 +171,7 @@ test_files:
170
171
  - spec/fixtures/devcenter/xcode-20150624.html
171
172
  - spec/fixtures/devcenter/xcode-20150909.html
172
173
  - spec/fixtures/devcenter/xcode-20160601.html
174
+ - spec/fixtures/devcenter/xcode-20160705-alt.html
173
175
  - spec/fixtures/devcenter/xcode-20160705.html
174
176
  - spec/fixtures/hdiutil.plist
175
177
  - spec/fixtures/mail-verify.html