xcode-install 2.6.1 → 2.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +36 -0
- data/lib/xcode/install.rb +34 -15
- data/lib/xcode/install/select.rb +1 -1
- data/lib/xcode/install/version.rb +1 -1
- data/spec/fixtures/xcode.json +30 -1
- data/spec/fixtures/xcode_63.json +28 -44
- data/spec/fixtures/yolo.json +1 -1
- data/spec/installer_spec.rb +116 -91
- data/spec/json_spec.rb +14 -4
- data/spec/list_spec.rb +18 -5
- data/xcode-install.gemspec +1 -1
- metadata +11 -11
data/spec/json_spec.rb
CHANGED
@@ -6,9 +6,9 @@ module XcodeInstall
|
|
6
6
|
fixture = Pathname.new('spec/fixtures/xcode.json').read
|
7
7
|
xcode = Xcode.new(JSON.parse(fixture))
|
8
8
|
|
9
|
-
xcode.date_modified.should ==
|
10
|
-
xcode.name.should == '
|
11
|
-
xcode.url.should == 'https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/
|
9
|
+
xcode.date_modified.should == 1_572_613_080
|
10
|
+
xcode.name.should == '9.3'
|
11
|
+
xcode.url.should == 'https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_9.3/Xcode_9.3.xip'
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'can parse list of all Xcodes' do
|
@@ -19,7 +19,17 @@ module XcodeInstall
|
|
19
19
|
installer.stubs(:installed_versions).returns([])
|
20
20
|
installer.stubs(:xcodes).returns(seedlist)
|
21
21
|
|
22
|
-
|
22
|
+
versions = [
|
23
|
+
'4.3 for Lion', '4.3.1 for Lion', '4.3.2 for Lion', '4.3.3 for Lion', '4.4.1', '4.5', '4.6.2', '4.6', '4.6.1', '4.6.3',
|
24
|
+
'5.0.1', '5', '5.0.2', '5.1', '5.1.1',
|
25
|
+
'6.0.1', '6.1', '6.1.1', '6.2', '6.3', '6.3.1', '6.3.2', '6.4',
|
26
|
+
'7', '7.0.1', '7.1', '7.1.1', '7.2.1', '7.2', '7.3', '7.3.1',
|
27
|
+
'8', '8.1', '8.2', '8.2.1', '8.3.2', '8.3.3', '8.3',
|
28
|
+
'9', '9.0.1', '9.1', '9.2', '9.3', '9.3.1', '9.4', '9.4.1',
|
29
|
+
'10', '10.1', '10.2.1', '10.2', '10.3',
|
30
|
+
'11', '11.1', '11.2', '11.2.1', '11.3 beta', '11.3', '11.3.1', '11.4 beta', '11.4', '11.4 beta 3', '11.4 beta 2', '11.4.1', '11.5 beta 2', '11.5', '11.5 GM Seed', '11.5 beta'
|
31
|
+
]
|
32
|
+
installer.list.split("\n").should == versions
|
23
33
|
end
|
24
34
|
|
25
35
|
it 'raises informative error when account is not registered as a developer' do
|
data/spec/list_spec.rb
CHANGED
@@ -23,8 +23,9 @@ module XcodeInstall
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def fake_installed_xcode(name)
|
26
|
-
|
27
|
-
|
26
|
+
installed_name = name.split(' ').join('.')
|
27
|
+
xcode_path = "/Applications/Xcode-#{installed_name}.app"
|
28
|
+
xcode_version = name.split(' ').first
|
28
29
|
xcode_version << '.0' unless name.include? '.'
|
29
30
|
|
30
31
|
installed_xcode = InstalledXcode.new(xcode_path)
|
@@ -42,15 +43,27 @@ module XcodeInstall
|
|
42
43
|
it 'lists all versions' do
|
43
44
|
fake_xcodes '1', '2.3', '2.3.1', '2.3.2', '3 some', '4 beta', '10 beta'
|
44
45
|
fake_installed_xcodes
|
45
|
-
installer.list.should == "1\n2.3\n2.3.1\n2.3
|
46
|
+
installer.list.should == "1\n2.3.2\n2.3.1\n2.3\n3 some\n4 beta\n10 beta"
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
49
50
|
describe '#list_annotated' do
|
50
51
|
it 'lists all versions with annotations' do
|
51
52
|
fake_xcodes '1', '2.3', '2.3.1', '2.3.2', '3 some', '4.3.1 for Lion', '9.4.1', '10 beta'
|
52
|
-
fake_installed_xcodes '2.3', '4.3.1', '10'
|
53
|
-
installer.list.should == "1\n2.3
|
53
|
+
fake_installed_xcodes '2.3', '4.3.1 for Lion', '10 beta'
|
54
|
+
installer.list.should == "1\n2.3.2\n2.3.1\n2.3 (installed)\n3 some\n4.3.1 for Lion (installed)\n9.4.1\n10 beta (installed)"
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'distinguish between beta and official_version' do
|
58
|
+
fake_xcodes '11.4', '11.4 beta'
|
59
|
+
fake_installed_xcodes '11.4'
|
60
|
+
installer.list.should == "11.4 beta\n11.4 (installed)"
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'distinguish each beta versions' do
|
64
|
+
fake_xcodes '11.4 beta', '11.4 beta 3'
|
65
|
+
fake_installed_xcodes '11.4 beta'
|
66
|
+
installer.list.should == "11.4 beta 3\n11.4 beta (installed)"
|
54
67
|
end
|
55
68
|
end
|
56
69
|
end
|
data/xcode-install.gemspec
CHANGED
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.6.
|
4
|
+
version: 2.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Bügling
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -68,16 +68,16 @@ dependencies:
|
|
68
68
|
name: rake
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: 12.3.3
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - "
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 12.3.3
|
81
81
|
description: Download, install and upgrade Xcodes with ease.
|
82
82
|
email:
|
83
83
|
- boris@icculus.org
|
@@ -89,6 +89,7 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".circleci/config.yml"
|
91
91
|
- ".gitattributes"
|
92
|
+
- ".github/workflows/ci.yml"
|
92
93
|
- ".gitignore"
|
93
94
|
- ".rubocop.yml"
|
94
95
|
- ".rubocop_todo.yml"
|
@@ -144,7 +145,7 @@ homepage: https://github.com/neonichu/xcode-install
|
|
144
145
|
licenses:
|
145
146
|
- MIT
|
146
147
|
metadata: {}
|
147
|
-
post_install_message:
|
148
|
+
post_install_message:
|
148
149
|
rdoc_options: []
|
149
150
|
require_paths:
|
150
151
|
- lib
|
@@ -159,9 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
160
|
- !ruby/object:Gem::Version
|
160
161
|
version: '0'
|
161
162
|
requirements: []
|
162
|
-
|
163
|
-
|
164
|
-
signing_key:
|
163
|
+
rubygems_version: 3.0.6
|
164
|
+
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Xcode installation manager.
|
167
167
|
test_files:
|