xcode-installer 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -14
- data/lib/xcode-installer/commands/download.rb +5 -2
- data/lib/xcode-installer/commands/install.rb +2 -2
- data/lib/xcode-installer/commands/list.rb +9 -6
- data/lib/xcode-installer/xcode-versions.rb +38 -1
- data/lib/xcode-installer/xcode-versions.yml +42 -0
- data/lib/xcode-installer.rb +1 -1
- data/yml.rb +8 -0
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTU3MzBhNTViZDU3N2RkYjJmNGM2M2IwN2UyNWM3YTY3NmQxYWU0OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWFkNWU2ZjY2Mjc0Y2EzM2JjYTM5MGMxMjZlZTFhOTg5ZmZiOGJmMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2VlZDg2NDBiNjIwYWMyMDgzODkwNzMwZTIyMWFlYTZjOGQ5YmZmNzUyMWQ4
|
10
|
+
MjY2ZTNhZmVlODAzMjY1ZmI5NGEwNjQ5OTIzMzk4Y2U4MzU4MWEwYjY4NjY0
|
11
|
+
YjEzYTZkZjhhZjliYmNmYjY0NzU1MzE0MmE1YzBmMzU5ZTZjYmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjczZDczYzQ4M2JlMDkxNTkzYTExODQ1YTk5ZWM4NWIyZGVjMmFmMTVmOTUx
|
14
|
+
NzQyYTJmZmMyMWVkMjVhMTQzMDllMzkxZGQxNDM0ZGY1MWYyZTg2Y2VhNGNl
|
15
|
+
NmFmNTVjYTg1ZDIxYmU3NDM4MjFkNTAzNDFjMWY5M2IyNmM3ZmE=
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -1,14 +1 @@
|
|
1
|
-
require "bundler"
|
2
|
-
Bundler.setup
|
3
|
-
|
4
|
-
gemspec = eval(File.read("xcode-installer.gemspec"))
|
5
|
-
|
6
|
-
task :build => "#{gemspec.full_name}.gem"
|
7
|
-
|
8
|
-
file "#{gemspec.full_name}.gem" => gemspec.files + ["xcode-installer.gemspec"] do
|
9
|
-
system "gem build xcode-installer.gemspec"
|
10
|
-
end
|
11
|
-
|
12
|
-
task :install => ["#{gemspec.full_name}.gem"] do |t|
|
13
|
-
system "gem install ./#{gemspec.full_name}.gem"
|
14
|
-
end
|
1
|
+
require "bundler/gem_tasks"
|
@@ -17,8 +17,11 @@ command :'download' do |c|
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
mgr = XcodeInstaller::XcodeVersions::ReleaseManager.new
|
21
|
+
release = mgr.get_release(xcode_version, options.pre_release, 'gui')
|
22
|
+
|
23
|
+
if release
|
24
|
+
xcode_url = release['download_url']
|
22
25
|
else
|
23
26
|
puts "No Xcode release with number #{xcode_version}. Use the 'list' command to see a list of known releases."
|
24
27
|
exit
|
@@ -1,6 +1,6 @@
|
|
1
1
|
command :'install' do |c|
|
2
2
|
c.syntax = 'xcode-installer install [options]'
|
3
|
-
c.option '--
|
3
|
+
c.option '--no-trash', 'Prevents trashing .dmg after install'
|
4
4
|
c.summary = 'Installs xcode from a previous download'
|
5
5
|
c.description = 'NEEDS SOME WORK - Use download and mount .dmg manually for now'
|
6
6
|
|
@@ -17,7 +17,7 @@ command :'install' do |c|
|
|
17
17
|
|
18
18
|
# Mount disk image
|
19
19
|
mountpoint = '/Volumes/Xcode'
|
20
|
-
#
|
20
|
+
# system "hdid '#{dmg_file}' -mountpoint #{mountpoint}"
|
21
21
|
system 'hdiutil attach -quiet xcode4620419895a.dmg'
|
22
22
|
|
23
23
|
# Trash existing install (so command is rerunnable)
|
@@ -13,17 +13,20 @@ command :'list' do |c|
|
|
13
13
|
show_gui = true if !show_all && !show_gui && !show_cli
|
14
14
|
|
15
15
|
# latest = XcodeInstaller::XcodeVersions::LATEST
|
16
|
-
|
17
|
-
|
16
|
+
mgr = XcodeInstaller::XcodeVersions::ReleaseManager.new
|
17
|
+
|
18
|
+
gui_versions = mgr.get_all('gui')
|
19
|
+
cli_versions = mgr.get_all('cli')
|
20
|
+
puts cli_versions
|
18
21
|
|
19
22
|
if show_all || show_gui
|
20
23
|
title = 'Xcode GUI'
|
21
24
|
table = Terminal::Table.new :title => title do |t|
|
22
25
|
t << ['Version', 'Download URL']
|
23
|
-
gui_versions.
|
26
|
+
gui_versions.each do |release|
|
24
27
|
t << :separator
|
25
28
|
|
26
|
-
row = [version,
|
29
|
+
row = [release['version'], release['download_url']]
|
27
30
|
t << row
|
28
31
|
end
|
29
32
|
end
|
@@ -37,10 +40,10 @@ command :'list' do |c|
|
|
37
40
|
title = 'Xcode Command-Line'
|
38
41
|
table = Terminal::Table.new :title => title do |t|
|
39
42
|
t << ['Version', 'Download URL']
|
40
|
-
cli_versions.
|
43
|
+
cli_versions.each do |release|
|
41
44
|
t << :separator
|
42
45
|
|
43
|
-
row = [version,
|
46
|
+
row = [release['version'], release['download_url']]
|
44
47
|
t << row
|
45
48
|
end
|
46
49
|
end
|
@@ -1,10 +1,47 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
module XcodeInstaller
|
2
4
|
module XcodeVersions
|
3
5
|
|
4
6
|
# General availability
|
5
7
|
LATEST_GA = '4.6.3'
|
6
8
|
# Developer preview
|
7
|
-
LATEST_DP = '5-
|
9
|
+
LATEST_DP = '5-DP2'
|
10
|
+
|
11
|
+
class ReleaseManager
|
12
|
+
attr_accessor :data
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
super
|
16
|
+
# cnf = YAML::load_file(File.join(File.dirname(File.expand_path(__FILE__)), 'config.yml'))
|
17
|
+
@data = YAML::load_file(File.join(File.dirname(File.expand_path(__FILE__)), 'xcode-versions.yml'))
|
18
|
+
# puts data
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_all(interface_type)
|
22
|
+
interface_type ||= 'gui'
|
23
|
+
list = data[interface_type]
|
24
|
+
return list
|
25
|
+
end
|
26
|
+
|
27
|
+
def get_release(version, include_beta, interface_type)
|
28
|
+
version ||= 'latest'
|
29
|
+
include_beta ||= false
|
30
|
+
interface_type ||= 'gui'
|
31
|
+
|
32
|
+
list = data[interface_type]
|
33
|
+
if version == 'latest' && include_beta
|
34
|
+
version = LATEST_DP
|
35
|
+
elsif version == 'latest'
|
36
|
+
version = LATEST_GA
|
37
|
+
end
|
38
|
+
list.each { |release|
|
39
|
+
if release['version'] == version
|
40
|
+
return release
|
41
|
+
end
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
8
45
|
|
9
46
|
GUI = {
|
10
47
|
'5-DP' => 'https://developer.apple.com/devcenter/download.action?path=/wwdc_2013/xcode_5_developer_preview/xcode_5_developer_preview.dmg', # 2013-06-10
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
gui:
|
3
|
+
- version: 5-DP2
|
4
|
+
download_url: https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_5_developer_preview_2/xcode_5_developer_preview_2.dmg
|
5
|
+
interface_type: gui
|
6
|
+
- version: 5-DP
|
7
|
+
download_url: https://developer.apple.com/devcenter/download.action?path=/wwdc_2013/xcode_5_developer_preview/xcode_5_developer_preview.dmg
|
8
|
+
interface_type: gui
|
9
|
+
- version: 4.6.3
|
10
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
|
11
|
+
interface_type: gui
|
12
|
+
- version: 4.6.2
|
13
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.2/xcode4620419895a.dmg
|
14
|
+
interface_type: gui
|
15
|
+
- version: 4.6.1
|
16
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.1/xcode4610419628a.dmg
|
17
|
+
interface_type: gui
|
18
|
+
- version: 4.6
|
19
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6/xcode460417218a.dmg
|
20
|
+
interface_type: gui
|
21
|
+
cli:
|
22
|
+
- version: 5-DP
|
23
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode_5__june_2013/command_line_tools_mountain_lion_for_xcode_5_june_2013.dmg
|
24
|
+
release_date: 2013-06-10
|
25
|
+
interface_type: cli
|
26
|
+
- version: 4.6.3
|
27
|
+
download_url: https://developer.apple.com/downloads/download.action?path=wwdc_2013/command_line_tools_os_x_v10.9_for_xcode_5__june_2013/command_line_tools_os_x_v10.9_for_xcode_5_developer_preview.dmg
|
28
|
+
release_date: 2013-06-14
|
29
|
+
interface_type: cli
|
30
|
+
- version: 4.6.2
|
31
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode__april_2013/xcode462_cltools_10_86938259a.dmg
|
32
|
+
release_date: 2013-04-15
|
33
|
+
interface_type: cli
|
34
|
+
- version: 4.6.1
|
35
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode__march_2013/xcode461_cltools_10_86938245a.dmg
|
36
|
+
release_date: 2013-03-14
|
37
|
+
interface_type: cli
|
38
|
+
- version: 4.6
|
39
|
+
download_url: https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode__january_2013/xcode46cltools_10_86938131a.dmg
|
40
|
+
release_date: 2013-02-19
|
41
|
+
interface_type: cli
|
42
|
+
|
data/lib/xcode-installer.rb
CHANGED
data/yml.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcode-installer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Chatelain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.2.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rspec
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +136,7 @@ dependencies:
|
|
122
136
|
- - ! '>='
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
|
-
description:
|
139
|
+
description: Installs Xcode GUI or command-line
|
126
140
|
email: benchatelain@gmail.com
|
127
141
|
executables:
|
128
142
|
- xcode-installer
|
@@ -145,9 +159,11 @@ files:
|
|
145
159
|
- ./lib/xcode-installer/commands.rb
|
146
160
|
- ./lib/xcode-installer/helpers.rb
|
147
161
|
- ./lib/xcode-installer/xcode-versions.rb
|
162
|
+
- ./lib/xcode-installer/xcode-versions.yml
|
148
163
|
- ./lib/xcode-installer.rb
|
149
164
|
- ./Rakefile
|
150
165
|
- ./README.md
|
166
|
+
- ./yml.rb
|
151
167
|
- bin/xcode-installer
|
152
168
|
homepage: https://github.com/phatblat/xcode-installer
|
153
169
|
licenses:
|
@@ -172,5 +188,5 @@ rubyforge_project:
|
|
172
188
|
rubygems_version: 2.0.3
|
173
189
|
signing_key:
|
174
190
|
specification_version: 4
|
175
|
-
summary:
|
191
|
+
summary: A gem for installing Xcode
|
176
192
|
test_files: []
|