u3d 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b8c6297024b13bd11984f6ec8aff579025e29453014a56fdcb39305dcd4327a
4
- data.tar.gz: 4da0b498014481742d548b1c08da1853ced0993e685f0bedaf31a48c818ff5fc
3
+ metadata.gz: 71c748719095b72650f60d6e9f7dca5a3bd6f2c00152d388c9205e7cd37a7b8f
4
+ data.tar.gz: d665b196e60a226cf8b97531469152f4ec6a5c2714c2a29ba365f067faba96ae
5
5
  SHA512:
6
- metadata.gz: 6ad81c25616217fd76d77623d97a158ccdbf7e10ecf13890539ae3ff84a56c6585a6380e8b955c74bf8648b72f510e2b8f46328f4cec513b81ce27f22807d728
7
- data.tar.gz: bcd292a2c041f976a6076d033f8eb66d94fac77b174bff7a76ffd6850d88c263d265fd951d08221fe16b6ca047be8e641c491a3c2b6e1d602b8385356a54d1ca
6
+ metadata.gz: 0d52cdb497db565d4e4ff910c74bd96c0df45fa4a918aea95b3c2cbdd196278c4c2e11a0e9c59fe2c4dd8daf022b375707ae133566920b7b92d3ce7397b6edd0
7
+ data.tar.gz: 6bfeaf9f80ec1fe152419b61eb69477e2098945d4926b2e54fe3e9f140ce854e325f54cde6db0c993c5fab95b666f28326950938f204e8e8a7da6c78443070be
@@ -6,14 +6,14 @@ jobs:
6
6
  fail-fast: false
7
7
  matrix:
8
8
  os: [ ubuntu, macos, windows ]
9
- ruby: [ 2.5.9, 2.6.10, 2.7.6, 3.0.4, 3.1.2 ]
9
+ ruby: [ 2.6, 2.7, 3.0.7, 3.1, 3.2, 3.3 ] # somehow github uses ruby 3.3 when specifying 3.0
10
10
  runs-on: ${{ matrix.os }}-latest
11
11
  steps:
12
12
  - name: git config autocrlf
13
13
  run: git config --global core.autocrlf false
14
14
  if: matrix.os == 'windows'
15
15
 
16
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v4
17
17
  - uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby }}
@@ -1,6 +1,7 @@
1
- future-release=v1.3.2
1
+ future-release=v1.3.4
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog,question
5
5
  user=DragonBox
6
6
  project=u3d
7
+ http_cache=false
data/.rubocop.yml CHANGED
@@ -70,3 +70,7 @@ Lint/AmbiguousBlockAssociation:
70
70
 
71
71
  Lint/EmptyBlock:
72
72
  Enabled: false
73
+
74
+ Gemspec/DevelopmentDependencies:
75
+ EnforcedStyle: gemspec
76
+ Include: [ "Gemfile", "u3d.gemspec" ]
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.3.3](https://github.com/DragonBox/u3d/tree/v1.3.3) (2023-01-04)
4
+
5
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.3.2...v1.3.3)
6
+
7
+ **Closed issues:**
8
+
9
+ - u3d available getting a 403 [\#433](https://github.com/DragonBox/u3d/issues/433)
10
+ - `'user_error!': Unknown method 'info'` when List package or install unity [\#432](https://github.com/DragonBox/u3d/issues/432)
11
+ - Unable to install unity 2021.3.7f1 on windows [\#430](https://github.com/DragonBox/u3d/issues/430)
12
+ - unity\_versions.rb:70 can't modify frozen String: "" [\#429](https://github.com/DragonBox/u3d/issues/429)
13
+
14
+ **Merged pull requests:**
15
+
16
+ - fix: don't attempt to append to frozen string [\#435](https://github.com/DragonBox/u3d/pull/435) ([jlsalmon](https://github.com/jlsalmon))
17
+ - \[Fix\] U3d::Utils: replace Ruby agent with another one to bypass 403 from Unity [\#434](https://github.com/DragonBox/u3d/pull/434) ([niezbop](https://github.com/niezbop))
18
+ - fix: replace usage of nonexistent UI.info method [\#431](https://github.com/DragonBox/u3d/pull/431) ([jlsalmon](https://github.com/jlsalmon))
19
+ - Preparing release for 1.3.2 [\#428](https://github.com/DragonBox/u3d/pull/428) ([lacostej](https://github.com/lacostej))
20
+
3
21
  ## [v1.3.2](https://github.com/DragonBox/u3d/tree/v1.3.2) (2022-06-08)
4
22
 
5
23
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.3.1...v1.3.2)
@@ -731,4 +749,4 @@
731
749
 
732
750
 
733
751
 
734
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
752
+ \* *This Changelog was automatically generated by [github_changelog_generator] (https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.3.2)
4
+ u3d (1.3.4)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  fiddle
@@ -11,7 +11,7 @@ PATH
11
11
  plist (>= 3.1.0, < 4.0.0)
12
12
  rexml
13
13
  rubyzip (>= 1.0.0)
14
- security (= 0.1.3)
14
+ security (= 0.1.5)
15
15
 
16
16
  GEM
17
17
  remote: https://rubygems.org/
@@ -85,7 +85,7 @@ GEM
85
85
  faraday-rack (1.0.0)
86
86
  faraday-retry (1.0.3)
87
87
  fiber-local (1.0.0)
88
- fiddle (1.1.0)
88
+ fiddle (1.1.2)
89
89
  file-tail (1.2.0)
90
90
  tins (~> 1.0)
91
91
  filesize (0.2.0)
@@ -106,14 +106,15 @@ GEM
106
106
  minitest (5.15.0)
107
107
  multi_json (1.15.0)
108
108
  multipart-post (2.1.1)
109
- nio4r (2.5.8)
109
+ nio4r (2.7.4)
110
110
  octokit (4.22.0)
111
111
  faraday (>= 0.9)
112
112
  sawyer (~> 0.8.0, >= 0.5.3)
113
- parallel (1.22.1)
114
- parser (3.1.2.0)
113
+ parallel (1.24.0)
114
+ parser (3.3.5.0)
115
115
  ast (~> 2.4.1)
116
- plist (3.6.0)
116
+ racc
117
+ plist (3.7.1)
117
118
  protocol-hpack (1.4.2)
118
119
  protocol-http (0.22.6)
119
120
  protocol-http1 (0.14.4)
@@ -122,9 +123,10 @@ GEM
122
123
  protocol-hpack (~> 1.4)
123
124
  protocol-http (~> 0.18)
124
125
  public_suffix (4.0.7)
126
+ racc (1.8.1)
125
127
  rainbow (3.1.1)
126
128
  rake (13.0.6)
127
- regexp_parser (2.4.0)
129
+ regexp_parser (2.9.2)
128
130
  rexml (3.2.5)
129
131
  rspec (3.11.0)
130
132
  rspec-core (~> 3.11.0)
@@ -141,26 +143,27 @@ GEM
141
143
  rspec-support (3.11.0)
142
144
  rspec_junit_formatter (0.5.1)
143
145
  rspec-core (>= 2, < 4, != 2.12.0)
144
- rubocop (1.28.2)
146
+ rubocop (1.50.2)
147
+ json (~> 2.3)
145
148
  parallel (~> 1.10)
146
- parser (>= 3.1.0.0)
149
+ parser (>= 3.2.0.0)
147
150
  rainbow (>= 2.2.2, < 4.0)
148
151
  regexp_parser (>= 1.8, < 3.0)
149
- rexml
150
- rubocop-ast (>= 1.17.0, < 2.0)
152
+ rexml (>= 3.2.5, < 4.0)
153
+ rubocop-ast (>= 1.28.0, < 2.0)
151
154
  ruby-progressbar (~> 1.7)
152
- unicode-display_width (>= 1.4.0, < 3.0)
153
- rubocop-ast (1.17.0)
154
- parser (>= 3.1.1.0)
155
+ unicode-display_width (>= 2.4.0, < 3.0)
156
+ rubocop-ast (1.30.0)
157
+ parser (>= 3.2.1.0)
155
158
  rubocop-rake (0.6.0)
156
159
  rubocop (~> 1.0)
157
- ruby-progressbar (1.11.0)
160
+ ruby-progressbar (1.13.0)
158
161
  ruby2_keywords (0.0.5)
159
162
  rubyzip (2.3.2)
160
163
  sawyer (0.8.2)
161
164
  addressable (>= 2.3.5)
162
165
  faraday (> 0.8, < 2.0)
163
- security (0.1.3)
166
+ security (0.1.5)
164
167
  simplecov (0.16.1)
165
168
  docile (~> 1.1)
166
169
  json (>= 1.8, < 3)
@@ -176,7 +179,7 @@ GEM
176
179
  traces (0.4.1)
177
180
  tzinfo (2.0.4)
178
181
  concurrent-ruby (~> 1.0)
179
- unicode-display_width (2.1.0)
182
+ unicode-display_width (2.6.0)
180
183
  zeitwerk (2.5.4)
181
184
 
182
185
  PLATFORMS
@@ -193,9 +196,9 @@ DEPENDENCIES
193
196
  rake (>= 12.3.3)
194
197
  rspec (~> 3.11.0)
195
198
  rspec_junit_formatter (~> 0.5.1)
196
- rubocop (~> 1.27)
199
+ rubocop (~> 1.50)
197
200
  rubocop-rake (~> 0.6.0)
198
201
  u3d!
199
202
 
200
203
  BUNDLED WITH
201
- 2.3.13
204
+ 2.3.25
data/Rakefile CHANGED
@@ -200,15 +200,8 @@ end
200
200
  desc 'Run all rspec tests'
201
201
  task :test_all do
202
202
  formatter = "--format progress"
203
- if ENV["CIRCLECI"]
204
- Dir.mkdir("/tmp/rspec/")
205
- formatter += " -r rspec_junit_formatter --format RspecJunitFormatter -o /tmp/rspec/rspec.xml"
206
- TEST_FILES = `(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)`.tr!("\n", ' ')
207
- rspec_args = "#{formatter} #{TEST_FILES}"
208
- else
209
- formatter += ' --pattern "./spec/**/*_spec.rb"'
210
- rspec_args = formatter
211
- end
203
+ formatter += ' --pattern "./spec/**/*_spec.rb"'
204
+ rspec_args = formatter
212
205
  sh "rspec #{rspec_args}"
213
206
  end
214
207
 
@@ -16,7 +16,7 @@ PATH
16
16
  plist (>= 3.1.0, < 4.0.0)
17
17
  rexml
18
18
  rubyzip (>= 1.0.0)
19
- security (= 0.1.3)
19
+ security (= 0.1.5)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -75,7 +75,7 @@ GEM
75
75
  plist (>= 3.1.0, < 4.0.0)
76
76
  public_suffix (~> 2.0.0)
77
77
  rubyzip (>= 1.3.0, < 2.0.0)
78
- security (= 0.1.3)
78
+ security (= 0.1.5)
79
79
  simctl (~> 1.6.3)
80
80
  slack-notifier (>= 2.0.0, < 3.0.0)
81
81
  terminal-notifier (>= 2.0.0, < 3.0.0)
@@ -16,7 +16,7 @@ PATH
16
16
  plist (>= 3.1.0, < 4.0.0)
17
17
  rexml
18
18
  rubyzip (>= 1.0.0)
19
- security (= 0.1.3)
19
+ security (= 0.1.5)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -75,7 +75,7 @@ GEM
75
75
  plist (>= 3.1.0, < 4.0.0)
76
76
  public_suffix (~> 2.0.0)
77
77
  rubyzip (>= 1.3.0, < 2.0.0)
78
- security (= 0.1.3)
78
+ security (= 0.1.5)
79
79
  simctl (~> 1.6.3)
80
80
  slack-notifier (>= 2.0.0, < 3.0.0)
81
81
  terminal-notifier (>= 2.0.0, < 3.0.0)
@@ -142,7 +142,7 @@ GEM
142
142
  rexml (3.2.5)
143
143
  rouge (2.0.7)
144
144
  rubyzip (1.3.0)
145
- security (0.1.3)
145
+ security (0.1.5)
146
146
  signet (0.12.0)
147
147
  addressable (~> 2.3)
148
148
  faraday (~> 0.9)
data/lib/u3d/cache.rb CHANGED
@@ -104,9 +104,9 @@ module U3d
104
104
  end
105
105
 
106
106
  def os_data_need_update?(data, os)
107
- data[os.id2name].nil?\
108
- || data[os.id2name]['lastupdate'].nil?\
109
- || (Time.now.to_i - data[os.id2name]['lastupdate'] > CACHE_LIFE)\
107
+ data[os.id2name].nil? \
108
+ || data[os.id2name]['lastupdate'].nil? \
109
+ || (Time.now.to_i - data[os.id2name]['lastupdate'] > CACHE_LIFE) \
110
110
  || (data[os.id2name]['versions'] || []).empty?
111
111
  end
112
112
 
@@ -31,7 +31,7 @@ module U3d
31
31
  # Name of the directory for the package downloading
32
32
  DOWNLOAD_DIRECTORY = 'Unity_Packages'
33
33
  # Path to the directory for the package downloading
34
- DOWNLOAD_PATH = "#{ENV['HOME']}/Downloads"
34
+ DOWNLOAD_PATH = "#{Dir.home}/Downloads"
35
35
  # Regex to get the name of a localization asset
36
36
  UNITY_LANGUAGE_FILE_REGEX = %r{/\d+/[0-9.]+/([\w-]+)$}.freeze
37
37
  # Regex to get the name of a package out of its file name
@@ -54,7 +54,7 @@ module U3d
54
54
  versions_and_paths = versions_and_paths.select { |a| a[0].parts[0] == vn.parts[0] && a[0].parts[1] == vn.parts[1] && a[0].parts[2] >= vn.parts[2] }
55
55
 
56
56
  if versions_and_paths.empty?
57
- UI.info "No closest version from UnityHub found for version #{version}"
57
+ UI.message "No closest version from UnityHub found for version #{version}"
58
58
  return []
59
59
  end
60
60
  path = versions_and_paths.first[1]
@@ -180,7 +180,7 @@ module U3d
180
180
  end
181
181
 
182
182
  def default_log_file
183
- "#{ENV['HOME']}/Library/Logs/Unity/Editor.log"
183
+ "#{Dir.home}/Library/Logs/Unity/Editor.log"
184
184
  end
185
185
 
186
186
  def exe_path
@@ -293,7 +293,7 @@ module U3d
293
293
  end
294
294
 
295
295
  def default_log_file
296
- "#{ENV['HOME']}/.config/unity3d/Editor.log"
296
+ "#{Dir.home}/.config/unity3d/Editor.log"
297
297
  end
298
298
 
299
299
  def exe_path
data/lib/u3d/installer.rb CHANGED
@@ -424,7 +424,7 @@ module U3d
424
424
  install_location = d.root.attributes['install-location']
425
425
  raise "Not sure how to install this module with identifier #{identifier} install-location: #{install_location}" unless install_location.start_with? '/Applications/Unity/'
426
426
 
427
- install_location.gsub(%(\/Applications\/Unity), "#{unity_root_path}/Editor/Data")
427
+ install_location.gsub(%(/Applications/Unity), "#{unity_root_path}/Editor/Data")
428
428
  end
429
429
  end
430
430
 
@@ -40,13 +40,13 @@ module U3d
40
40
  # petit cachotier va!
41
41
  def number
42
42
  require 'base64'
43
- Base64.decode64(self['DeveloperData'])[4..-1]
43
+ Base64.decode64(self['DeveloperData'])[4..]
44
44
  end
45
45
 
46
46
  class << self
47
47
  LICENSES_DIR_MAC = File.join("/", "Library", "Application Support", "Unity").freeze
48
48
  LICENSES_DIR_WINDOWS = File.join("C:/ProgramData", "Unity").freeze
49
- LICENSES_DIR_LINUX = File.join(ENV['HOME'], ".local", "share", "unity3d", "Unity").freeze
49
+ LICENSES_DIR_LINUX = File.join(Dir.home, ".local", "share", "unity3d", "Unity").freeze
50
50
 
51
51
  def from_path(path)
52
52
  doc = REXML::Document.new(File.read(path))
@@ -75,21 +75,19 @@ module U3d
75
75
 
76
76
  # Optimized version of load_version_modules that only makes one HTTP call
77
77
  def load_versions_modules(versions, cached_versions, os, offline)
78
- ini_modules = versions
79
- .map { |version| [version, INIModulesParser.load_ini(version, cached_versions, os: os, offline: offline)] }
80
- .map do |version, ini_data|
78
+ ini_modules = versions.to_h do |version|
79
+ ini_data = INIModulesParser.load_ini(version, cached_versions, os: os, offline: offline)
81
80
  url_root = cached_versions[version]
82
81
  modules = ini_data.map { |k, v| module_from_ini_data(k, v, url_root, os) }
83
82
  [version, modules]
84
- end.to_h
83
+ end
85
84
 
86
85
  HubModulesParser.download_modules(os: os) unless offline
87
- hub_modules = versions
88
- .map { |version| [version, HubModulesParser.load_modules(version, os: os, offline: true)] }
89
- .map do |version, json_data|
86
+ hub_modules = versions.to_h do |version|
87
+ json_data = HubModulesParser.load_modules(version, os: os, offline: true)
90
88
  modules = json_data.map { |data| module_from_json_data(data, os) }
91
89
  [version, modules]
92
- end.to_h
90
+ end
93
91
 
94
92
  return ini_modules.merge(hub_modules) do |_version, ini_version_modules, json_version_modules|
95
93
  (ini_version_modules + json_version_modules).uniq(&:id)
@@ -64,7 +64,7 @@ module U3d
64
64
  when Net::HTTPRedirection
65
65
  # A session must be opened with the server before accessing forum
66
66
  res = nil
67
- cookie_str = ''
67
+ cookie_str = +''
68
68
  # Store the name and value of the cookies returned by the server
69
69
  response['set-cookie'].gsub(/\s+/, '').split(',').each do |c|
70
70
  cookie_str << ("#{c.split(';', 2)[0]}; ")
@@ -181,9 +181,9 @@ module U3d
181
181
  end
182
182
 
183
183
  def fetch_from_json(url, pattern)
184
- fetch_json(url, pattern).map do |build|
184
+ fetch_json(url, pattern).to_h do |build|
185
185
  [build['version'], pattern.match(build['downloadUrl'])[1]]
186
- end.to_h
186
+ end
187
187
  end
188
188
 
189
189
  def fetch_betas(url, pattern)
data/lib/u3d/utils.rb CHANGED
@@ -34,7 +34,11 @@ module U3d
34
34
  # Regex to capture each part of a version string (0.0.0x0)
35
35
  CSIDL_LOCAL_APPDATA = 0x001c
36
36
  UNITY_VERSION_REGEX = /(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:(\w)(?:(\d+))?)?/.freeze
37
+ MOZILLA_AGENT_HEADER = {
38
+ 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0'
39
+ }.freeze
37
40
 
41
+ # rubocop:disable Metrics/ClassLength
38
42
  class << self
39
43
  def final_url(url, redirect_limit: 10)
40
44
  follow_redirects(url, redirect_limit: redirect_limit, http_method: :head) do |request, _response|
@@ -56,6 +60,9 @@ module U3d
56
60
  def follow_redirects(url, redirect_limit: 10, http_method: :get, request_headers: {}, &block)
57
61
  raise 'Too many redirections' if redirect_limit.zero?
58
62
 
63
+ # Unity blocks the default Ruby agent, use another one
64
+ request_headers = MOZILLA_AGENT_HEADER.merge(request_headers)
65
+
59
66
  response = nil
60
67
  request = nil
61
68
  uri = URI(url)
@@ -206,7 +213,7 @@ module U3d
206
213
  def parse_unity_version(version)
207
214
  ver = UNITY_VERSION_REGEX.match(version)
208
215
  if ver.nil?
209
- raise ArgumentError, "Version (#{version}) does not match the Unity "\
216
+ raise ArgumentError, "Version (#{version}) does not match the Unity " \
210
217
  'version format 0.0.0x0'
211
218
  end
212
219
  [ver[1], ver[2], ver[3], ver[4], ver[5]]
@@ -340,6 +347,7 @@ module U3d
340
347
  opt
341
348
  end
342
349
  end
350
+ # rubocop:enable Metrics/ClassLength
343
351
  end
344
352
  # rubocop:enable Metrics/ModuleLength
345
353
  end
data/lib/u3d/version.rb CHANGED
@@ -23,11 +23,11 @@
23
23
  ## --- END LICENSE BLOCK ---
24
24
 
25
25
  module U3d
26
- VERSION = '1.3.2'
26
+ VERSION = '1.3.4'
27
27
  DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity game engine from command line.'
28
- UNITY_VERSIONS_NOTE = "Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
29
- "\t. 'f' are the main release candidates for Unity\n"\
30
- "\t. 'p' are patches fixing those releases\n"\
31
- "\t. 'b' are the beta releases\n"\
28
+ UNITY_VERSIONS_NOTE = "Unity uses the following version formatting: 0.0.0x0. The 'x' can takes different values:\n" \
29
+ "\t. 'f' are the main release candidates for Unity\n" \
30
+ "\t. 'p' are patches fixing those releases\n" \
31
+ "\t. 'b' are the beta releases\n" \
32
32
  "\t. 'a' are the alpha releases (not currently discovered)\n"
33
33
  end
@@ -149,12 +149,12 @@ module U3dCore
149
149
 
150
150
  def grant_admin_privileges(command)
151
151
  if Helper.windows?
152
- raise CredentialsError, "The command \'#{command}\' must be run in administrative shell" unless has_admin_privileges?
152
+ raise CredentialsError, "The command '#{command}' must be run in administrative shell" unless has_admin_privileges?
153
153
  else
154
154
  env_username = ENV['USER']
155
155
  unless env_username == "root"
156
156
  cred = U3dCore::Credentials.new(user: env_username)
157
- raise CredentialsError, "The command \'#{command}\' must be run with admin privileges" unless has_admin_privileges?
157
+ raise CredentialsError, "The command '#{command}' must be run with admin privileges" unless has_admin_privileges?
158
158
 
159
159
  command = "sudo -k && echo #{cred.password.shellescape} | sudo -S bash -c \"#{command}\""
160
160
  end
@@ -28,9 +28,9 @@ require 'colored'
28
28
 
29
29
  module U3dCore
30
30
  module Helper
31
- DEFAULT_LINUX_PATH = File.join(ENV['HOME'], '.u3d').freeze
32
- DEFAULT_MAC_PATH = File.join(ENV['HOME'], 'Library', 'Application Support', 'u3d').freeze
33
- DEFAULT_WINDOWS_PATH = File.join(ENV['HOME'], 'AppData', 'Local', 'u3d').freeze
31
+ DEFAULT_LINUX_PATH = File.join(Dir.home, '.u3d').freeze
32
+ DEFAULT_MAC_PATH = File.join(Dir.home, 'Library', 'Application Support', 'u3d').freeze
33
+ DEFAULT_WINDOWS_PATH = File.join(Dir.home, 'AppData', 'Local', 'u3d').freeze
34
34
 
35
35
  def self.data_path
36
36
  case operating_system
@@ -115,7 +115,6 @@ module U3dCore
115
115
 
116
116
  # the current operating system
117
117
  def self.operating_system
118
- # rubocop:disable Style/GuardClause
119
118
  if linux?
120
119
  return :linux
121
120
  elsif mac?
@@ -125,7 +124,6 @@ module U3dCore
125
124
  else
126
125
  raise 'Could not assume what OS you\'re running, please specify it as much as possible'
127
126
  end
128
- # rubocop:enable Style/GuardClause
129
127
  end
130
128
 
131
129
  def self.win_64?
@@ -54,7 +54,7 @@ module U3dCore
54
54
  end
55
55
 
56
56
  def to_version(tag_name)
57
- tag_name = tag_name[1..-1] if tag_name[0] == 'v'
57
+ tag_name = tag_name[1..] if tag_name[0] == 'v'
58
58
  tag_name
59
59
  end
60
60
 
data/u3d.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ["Jerome Lacoste", "Paul Niezborala"]
11
11
  spec.email = 'jerome@wewanttoknow.com'
12
12
 
13
- spec.required_ruby_version = '>= 2.5.0'
13
+ spec.required_ruby_version = '>= 2.6.0'
14
14
 
15
15
  spec.summary = "U3d"
16
16
  spec.description = U3d::DESCRIPTION
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency 'plist', '>= 3.1.0', '< 4.0.0' # Generate the Xcode config plist file
35
35
  spec.add_dependency "rexml" # rexml was unbundled from the stdlib in ruby 3
36
36
  spec.add_dependency 'rubyzip', '>= 1.0.0' # Installation of .zip files
37
- spec.add_dependency 'security', '= 0.1.3' # macOS Keychain manager, a dead project, no updates expected
37
+ spec.add_dependency 'security', '= 0.1.5' # macOS Keychain manager, a dead project, no updates expected
38
38
  # Development only
39
39
  spec.add_development_dependency "activesupport", ">= 5.2.4.3" # force secure transitive dep
40
40
  spec.add_development_dependency "addressable", ">= 2.8.0" # force secure transitive dep
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "rake", ">= 12.3.3"
48
48
  spec.add_development_dependency "rspec", "~> 3.11.0"
49
49
  spec.add_development_dependency 'rspec_junit_formatter', '~> 0.5.1'
50
- spec.add_development_dependency 'rubocop', '~> 1.27'
50
+ spec.add_development_dependency 'rubocop', '~> 1.50' # for ruby 2.6 compatibility
51
51
  spec.add_development_dependency 'rubocop-rake', '~> 0.6.0'
52
52
  # spec.add_development_dependency 'rubocop-rspec', '~> 2.10.0'
53
53
  spec.metadata['rubygems_mfa_required'] = 'true'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Lacoste
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-06-08 00:00:00.000000000 Z
12
+ date: 2024-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
@@ -167,14 +167,14 @@ dependencies:
167
167
  requirements:
168
168
  - - '='
169
169
  - !ruby/object:Gem::Version
170
- version: 0.1.3
170
+ version: 0.1.5
171
171
  type: :runtime
172
172
  prerelease: false
173
173
  version_requirements: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - '='
176
176
  - !ruby/object:Gem::Version
177
- version: 0.1.3
177
+ version: 0.1.5
178
178
  - !ruby/object:Gem::Dependency
179
179
  name: activesupport
180
180
  requirement: !ruby/object:Gem::Requirement
@@ -321,14 +321,14 @@ dependencies:
321
321
  requirements:
322
322
  - - "~>"
323
323
  - !ruby/object:Gem::Version
324
- version: '1.27'
324
+ version: '1.50'
325
325
  type: :development
326
326
  prerelease: false
327
327
  version_requirements: !ruby/object:Gem::Requirement
328
328
  requirements:
329
329
  - - "~>"
330
330
  - !ruby/object:Gem::Version
331
- version: '1.27'
331
+ version: '1.50'
332
332
  - !ruby/object:Gem::Dependency
333
333
  name: rubocop-rake
334
334
  requirement: !ruby/object:Gem::Requirement
@@ -351,7 +351,6 @@ executables:
351
351
  extensions: []
352
352
  extra_rdoc_files: []
353
353
  files:
354
- - ".circleci/config.yml"
355
354
  - ".github/ISSUE_TEMPLATE.md"
356
355
  - ".github/PULL_REQUEST_TEMPLATE.md"
357
356
  - ".github/workflows/ci.yml"
@@ -530,14 +529,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
530
529
  requirements:
531
530
  - - ">="
532
531
  - !ruby/object:Gem::Version
533
- version: 2.5.0
532
+ version: 2.6.0
534
533
  required_rubygems_version: !ruby/object:Gem::Requirement
535
534
  requirements:
536
535
  - - ">="
537
536
  - !ruby/object:Gem::Version
538
537
  version: '0'
539
538
  requirements: []
540
- rubygems_version: 3.1.6
539
+ rubygems_version: 3.4.10
541
540
  signing_key:
542
541
  specification_version: 4
543
542
  summary: U3d
data/.circleci/config.yml DELETED
@@ -1,87 +0,0 @@
1
- # Ruby CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
- #
5
- version: 2.1
6
-
7
- orbs:
8
- ruby: circleci/ruby@1.1
9
-
10
- #executors:
11
- # linux:
12
- # docker:
13
- # - image: cimg/base:2020.01
14
- # macos:
15
- # macos:
16
- # xcode: 11.4
17
-
18
- workflows:
19
- all-tests:
20
- jobs:
21
- - build:
22
- matrix:
23
- parameters:
24
- # os: [linux]
25
- ruby-version: ["2.5", "2.6", "2.7", "3.0", "3.1"]
26
-
27
- jobs:
28
- build:
29
- parameters:
30
- # os:
31
- # type: executor
32
- ruby-version:
33
- type: string
34
-
35
- docker:
36
- - image: cimg/ruby:<< parameters.ruby-version >>
37
-
38
- # executor: << parameters.os >>
39
-
40
- working_directory: ~/repo
41
-
42
- steps:
43
- - checkout
44
-
45
- # Download and cache dependencies
46
- - restore_cache:
47
- keys:
48
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
49
- # fallback to using the latest cache if no exact match is found
50
- - v1-dependencies-
51
-
52
- - run:
53
- name: Configure Bundler
54
- command: |
55
- echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
56
- source $BASH_ENV
57
- gem install bundler -v "$BUNDLER_VERSION"
58
- bundle config set path '.bundle'
59
-
60
- - run:
61
- name: install dependencies
62
- command: |
63
- bundle install --jobs=4 --retry=3
64
-
65
- - save_cache:
66
- paths:
67
- - ./venv
68
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
69
-
70
- # Database setup
71
- # - run: bundle exec rake db:create
72
- # - run: bundle exec rake db:schema:load
73
-
74
- # run tests!
75
- - run:
76
- name: run tests
77
- command: |
78
- echo $BUNDLER_VERSION
79
- bundle --version
80
- bundle exec rake
81
-
82
- # collect reports
83
- - store_test_results:
84
- path: /tmp/rspec/
85
- - store_artifacts:
86
- path: /tmp/rspec/
87
- destination: test-results