xcode-install 2.7.0 → 2.8.0

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
  SHA256:
3
- metadata.gz: f5f95c1ec6494fb1482c6862a786fd3f149327096468dbfd01886d6a320ab31f
4
- data.tar.gz: ef0e89795d7a5169a97adb29467025693644db1a8805e1ae395cd76066ae2569
3
+ metadata.gz: 04e0e30f2230e52da44a3710cf8277f8d5e82e67d2a18d4dfa98fb9a3f40570e
4
+ data.tar.gz: 5c058cb7d8adcb3e4f800091cf7531ad8ad2010c243e8e685639df1feb658e04
5
5
  SHA512:
6
- metadata.gz: 4fa023f63479190d92da8f7a54d9ac0a9556eab534e4e4ea4a784f6bbd10837678910570dd9665d409214d52e47432ebafa99aaae0a9022097bde4540d42390f
7
- data.tar.gz: 73c28ae14d7081a62376ce4611cae869987b8e2681325770b20d8d5f3be153abc02c7c0e3b94828c703ab786dd5960a62c6f3b097b162b82be39cf197e031d99
6
+ metadata.gz: 21b099ccd6dd22bf8e7e652ea6ef8e1084260486784662c5781f8fa5ff169b75ec2d2dfb2cb855ba93de7a0e16519a73d9c0a07596e5b5c1d8eb70a0f2d3aae6
7
+ data.tar.gz: 5a14cef0170a25cdcc0d8dfd845f21463e0f7c38ae810a5e3328ce5f72a79eaa5fe380a70eee2c470b5395f791bce3e52ad551370491fd742e22718e8ce81626
@@ -6,13 +6,13 @@ jobs:
6
6
  strategy:
7
7
  fail-fast: false
8
8
  matrix:
9
- ruby: ["2.5", "2.6", "2.7"]
9
+ ruby: ["2.5", "2.6", "2.7", "3.0"]
10
10
 
11
11
  runs-on: macos-latest
12
12
  steps:
13
13
  # Setup env
14
14
  - uses: actions/checkout@v2
15
- - uses: actions/setup-ruby@v1
15
+ - uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  ruby-version: "${{ matrix.ruby }}"
18
18
 
@@ -26,8 +26,8 @@ jobs:
26
26
  echo $HOME
27
27
 
28
28
  # Prepare
29
- - name: Install bundler 2.2.14
30
- run: gem install bundler -v "~> 2.2.14"
29
+ - name: Install bundler 2.2.20
30
+ run: gem install bundler -v "~> 2.2.20"
31
31
  - name: Install ruby dependencies
32
32
  run: |
33
33
  bundle config --local clean 'true'
data/.rubocop_todo.yml CHANGED
@@ -1,78 +1,213 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-08-24 11:09:20 +0200 using RuboCop version 0.49.1.
3
+ # on 2021-07-06 16:06:45 UTC using RuboCop version 1.12.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'xcode-install.gemspec'
15
+
9
16
  # Offense count: 3
10
17
  # Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyle, SupportedStyles.
12
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
13
- Layout/IndentHeredoc:
18
+ Layout/ClosingHeredocIndentation:
14
19
  Exclude:
15
20
  - 'lib/xcode/install.rb'
16
21
 
17
22
  # Offense count: 12
23
+ # Cop supports --auto-correct.
24
+ Layout/EmptyLineAfterGuardClause:
25
+ Exclude:
26
+ - 'lib/xcode/install.rb'
27
+ - 'lib/xcode/install/cleanup.rb'
28
+ - 'lib/xcode/install/simulators.rb'
29
+ - 'lib/xcode/install/uninstall.rb'
30
+
31
+ # Offense count: 3
32
+ # Cop supports --auto-correct.
33
+ Layout/HeredocIndentation:
34
+ Exclude:
35
+ - 'lib/xcode/install.rb'
36
+
37
+ # Offense count: 3
38
+ # Cop supports --auto-correct.
39
+ Lint/BooleanSymbol:
40
+ Exclude:
41
+ - 'lib/xcode/install/install.rb'
42
+ - 'lib/xcode/install/select.rb'
43
+ - 'lib/xcode/install/uninstall.rb'
44
+
45
+ # Offense count: 6
46
+ Lint/DuplicateMethods:
47
+ Exclude:
48
+ - 'lib/xcode/install.rb'
49
+
50
+ # Offense count: 2
51
+ # Configuration parameters: MaximumRangeSize.
52
+ Lint/MissingCopEnableDirective:
53
+ Exclude:
54
+ - 'lib/xcode/install.rb'
55
+
56
+ # Offense count: 1
57
+ # Cop supports --auto-correct.
58
+ Lint/UriRegexp:
59
+ Exclude:
60
+ - 'lib/xcode/install/install.rb'
61
+
62
+ # Offense count: 12
63
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
18
64
  Metrics/AbcSize:
19
- Max: 44
65
+ Max: 45
20
66
 
21
- # Offense count: 4
22
- # Configuration parameters: CountComments, ExcludedMethods.
67
+ # Offense count: 5
68
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
69
+ # IgnoredMethods: refine
23
70
  Metrics/BlockLength:
24
71
  Max: 76
25
72
 
26
- # Offense count: 1
27
- # Configuration parameters: CountComments.
28
- Metrics/ClassLength:
29
- Max: 246
30
-
31
- # Offense count: 3
73
+ # Offense count: 6
74
+ # Configuration parameters: IgnoredMethods.
32
75
  Metrics/CyclomaticComplexity:
33
76
  Max: 10
34
77
 
35
- # Offense count: 11
36
- # Configuration parameters: CountComments.
78
+ # Offense count: 17
79
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
37
80
  Metrics/MethodLength:
38
- Max: 51
81
+ Max: 50
39
82
 
40
83
  # Offense count: 1
41
- # Configuration parameters: CountKeywordArgs.
84
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
42
85
  Metrics/ParameterLists:
43
86
  Max: 7
44
87
 
45
- # Offense count: 3
88
+ # Offense count: 2
89
+ # Configuration parameters: IgnoredMethods.
46
90
  Metrics/PerceivedComplexity:
47
91
  Max: 12
48
92
 
49
93
  # Offense count: 1
94
+ Security/MarshalLoad:
95
+ Exclude:
96
+ - 'lib/xcode/install.rb'
97
+
98
+ # Offense count: 16
99
+ # Cop supports --auto-correct.
100
+ # Configuration parameters: EnforcedStyle.
101
+ # SupportedStyles: separated, grouped
102
+ Style/AccessorGrouping:
103
+ Exclude:
104
+ - 'lib/xcode/install.rb'
105
+
106
+ # Offense count: 1
107
+ Style/CombinableLoops:
108
+ Exclude:
109
+ - 'lib/xcode/install.rb'
110
+
111
+ # Offense count: 1
112
+ # Cop supports --auto-correct.
113
+ Style/Encoding:
114
+ Exclude:
115
+ - 'xcode-install.gemspec'
116
+
117
+ # Offense count: 14
50
118
  # Cop supports --auto-correct.
51
- Performance/CompareWithBlock:
119
+ Style/ExpandPathArguments:
120
+ Exclude:
121
+ - 'bin/xcversion'
122
+ - 'bin/🎉'
123
+ - 'spec/cli_spec.rb'
124
+ - 'spec/curl_spec.rb'
125
+ - 'spec/install_spec.rb'
126
+ - 'spec/installed_spec.rb'
127
+ - 'spec/installer_spec.rb'
128
+ - 'spec/json_spec.rb'
129
+ - 'spec/list_spec.rb'
130
+ - 'spec/prerelease_spec.rb'
131
+ - 'spec/spec_helper.rb'
132
+ - 'spec/uninstall_spec.rb'
133
+ - 'xcode-install.gemspec'
134
+
135
+ # Offense count: 28
136
+ # Cop supports --auto-correct.
137
+ # Configuration parameters: EnforcedStyle.
138
+ # SupportedStyles: always, always_true, never
139
+ Style/FrozenStringLiteralComment:
140
+ Enabled: false
141
+
142
+ # Offense count: 2
143
+ # Cop supports --auto-correct.
144
+ Style/IfUnlessModifier:
145
+ Exclude:
146
+ - 'lib/xcode/install.rb'
147
+
148
+ # Offense count: 8
149
+ # Configuration parameters: AllowedMethods.
150
+ # AllowedMethods: respond_to_missing?
151
+ Style/OptionalBooleanParameter:
52
152
  Exclude:
53
153
  - 'lib/xcode/install.rb'
54
154
 
55
155
  # Offense count: 1
56
156
  # Cop supports --auto-correct.
57
- # Configuration parameters: IncludeActiveSupportAliases.
58
- Performance/DoubleStartEndWith:
157
+ Style/RedundantBegin:
158
+ Exclude:
159
+ - 'lib/xcode/install.rb'
160
+
161
+ # Offense count: 2
162
+ # Cop supports --auto-correct.
163
+ Style/RedundantRegexpEscape:
59
164
  Exclude:
60
165
  - 'lib/xcode/install.rb'
61
166
 
62
167
  # Offense count: 1
63
- Security/MarshalLoad:
168
+ # Cop supports --auto-correct.
169
+ # Configuration parameters: AllowMultipleReturnValues.
170
+ Style/RedundantReturn:
64
171
  Exclude:
65
172
  - 'lib/xcode/install.rb'
66
173
 
67
- # Offense count: 15
174
+ # Offense count: 2
68
175
  # Cop supports --auto-correct.
69
- # Configuration parameters: EnforcedStyle, SupportedStyles.
176
+ # Configuration parameters: EnforcedStyle.
177
+ # SupportedStyles: implicit, explicit
178
+ Style/RescueStandardError:
179
+ Exclude:
180
+ - 'lib/xcode/install.rb'
181
+
182
+ # Offense count: 1
183
+ # Cop supports --auto-correct.
184
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
185
+ # AllowedMethods: present?, blank?, presence, try, try!
186
+ Style/SafeNavigation:
187
+ Exclude:
188
+ - 'lib/xcode/install.rb'
189
+
190
+ # Offense count: 14
191
+ # Cop supports --auto-correct.
192
+ # Configuration parameters: EnforcedStyle.
70
193
  # SupportedStyles: only_raise, only_fail, semantic
71
194
  Style/SignalException:
72
195
  Exclude:
73
196
  - 'lib/xcode/install.rb'
74
- - 'lib/xcode/install/cli.rb'
75
197
  - 'lib/xcode/install/install.rb'
76
198
  - 'lib/xcode/install/select.rb'
77
199
  - 'lib/xcode/install/simulators.rb'
78
200
  - 'lib/xcode/install/uninstall.rb'
201
+
202
+ # Offense count: 2
203
+ # Cop supports --auto-correct.
204
+ Style/StderrPuts:
205
+ Exclude:
206
+ - 'lib/xcode/install.rb'
207
+
208
+ # Offense count: 4
209
+ # Cop supports --auto-correct.
210
+ Style/StringConcatenation:
211
+ Exclude:
212
+ - 'lib/xcode/install.rb'
213
+ - 'spec/spec_helper.rb'
data/Gemfile CHANGED
@@ -8,5 +8,5 @@ group :development do
8
8
  gem 'mocha', '~> 0.11.4'
9
9
  gem 'mocha-on-bacon'
10
10
  gem 'prettybacon'
11
- gem 'rubocop', '~> 0.49.1', require: false
11
+ gem 'rubocop', '~> 1.18', require: false
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module XcodeInstall
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  end
data/lib/xcode/install.rb CHANGED
@@ -710,11 +710,10 @@ HELP
710
710
  `touch #{cache_dir}com.apple.dt.Xcode.InstallCheckCache_#{osx_build_version}_#{tools_version}`
711
711
  end
712
712
 
713
- # This method might take a few ms, this could be improved by implementing https://github.com/KrauseFx/xcode-install/issues/273
714
713
  def fetch_version
715
- output = `DEVELOPER_DIR='' "#{@path}/Contents/Developer/usr/bin/xcodebuild" -version`
714
+ output = `/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "#{@path}/Contents/version.plist"`
716
715
  return '0.0' if output.nil? || output.empty? # ¯\_(ツ)_/¯
717
- output.split("\n").first.split(' ')[1]
716
+ output.sub("\n", '')
718
717
  end
719
718
 
720
719
  def verify_integrity
@@ -5,13 +5,13 @@ module XcodeInstall
5
5
 
6
6
  describe InstalledXcode do
7
7
  it 'finds the current Xcode version with whitespace chars' do
8
- InstalledXcode.any_instance.expects(:`).with("DEVELOPER_DIR='' \"#{xcode_path}/Contents/Developer/usr/bin/xcodebuild\" -version").returns("Xcode 6.3.1\nBuild version 6D1002")
8
+ InstalledXcode.any_instance.expects(:`).with("/usr/libexec/PlistBuddy -c \"Print :CFBundleShortVersionString\" \"#{xcode_path}/Contents/version.plist\"").returns('6.3.1')
9
9
  installed = InstalledXcode.new(xcode_path)
10
10
  installed.version.should == '6.3.1'
11
11
  end
12
12
 
13
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)
14
+ InstalledXcode.any_instance.expects(:`).with("/usr/libexec/PlistBuddy -c \"Print :CFBundleShortVersionString\" \"#{xcode_path}/Contents/version.plist\"").returns(nil)
15
15
  installed = InstalledXcode.new(xcode_path)
16
16
  installed.version.should == '0.0'
17
17
  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.7.0
4
+ version: 2.8.0
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: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.1.4
169
+ rubygems_version: 3.2.19
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Xcode installation manager.