u3d 1.3.2 → 1.3.3

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: 3b8c6297024b13bd11984f6ec8aff579025e29453014a56fdcb39305dcd4327a
4
- data.tar.gz: 4da0b498014481742d548b1c08da1853ced0993e685f0bedaf31a48c818ff5fc
3
+ metadata.gz: 79f773ac16b5e24ec6a48498f0e62abbe4ae90c21e9a565afe7689375dba359e
4
+ data.tar.gz: 27aad3e6f30b0aee9b5e02fd121253f3c6170752bc023108ab39e60faf85ba37
5
5
  SHA512:
6
- metadata.gz: 6ad81c25616217fd76d77623d97a158ccdbf7e10ecf13890539ae3ff84a56c6585a6380e8b955c74bf8648b72f510e2b8f46328f4cec513b81ce27f22807d728
7
- data.tar.gz: bcd292a2c041f976a6076d033f8eb66d94fac77b174bff7a76ffd6850d88c263d265fd951d08221fe16b6ca047be8e641c491a3c2b6e1d602b8385356a54d1ca
6
+ metadata.gz: 4adcd91f22408edc31a15b57623160160fa34eb6493cc91c18881d43eb42b6b0d2a01e7f3ba387f99811c6c8bfdcdd1a9794a948965f0eaae1deda6cd44e68f1
7
+ data.tar.gz: cda628fa54363f7bebf1396ac0e0508f7a29625e8f99458d8ee0e5524e5da8139cb33571a5f4fa1ac59d3ff4d153fff33426faf027def254ef17e799977522e4
@@ -1,4 +1,4 @@
1
- future-release=v1.3.2
1
+ future-release=v1.3.3
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog,question
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.3)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  fiddle
@@ -198,4 +198,4 @@ DEPENDENCIES
198
198
  u3d!
199
199
 
200
200
  BUNDLED WITH
201
- 2.3.13
201
+ 2.3.9
@@ -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]
@@ -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]}; ")
data/lib/u3d/utils.rb CHANGED
@@ -34,6 +34,9 @@ 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
 
38
41
  class << self
39
42
  def final_url(url, redirect_limit: 10)
@@ -56,6 +59,9 @@ module U3d
56
59
  def follow_redirects(url, redirect_limit: 10, http_method: :get, request_headers: {}, &block)
57
60
  raise 'Too many redirections' if redirect_limit.zero?
58
61
 
62
+ # Unity blocks the default Ruby agent, use another one
63
+ request_headers = MOZILLA_AGENT_HEADER.merge(request_headers)
64
+
59
65
  response = nil
60
66
  request = nil
61
67
  uri = URI(url)
data/lib/u3d/version.rb CHANGED
@@ -23,7 +23,7 @@
23
23
  ## --- END LICENSE BLOCK ---
24
24
 
25
25
  module U3d
26
- VERSION = '1.3.2'
26
+ VERSION = '1.3.3'
27
27
  DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity game engine from command line.'
28
28
  UNITY_VERSIONS_NOTE = "Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
29
29
  "\t. 'f' are the main release candidates for Unity\n"\
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.3
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: 2023-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
@@ -537,7 +537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
537
537
  - !ruby/object:Gem::Version
538
538
  version: '0'
539
539
  requirements: []
540
- rubygems_version: 3.1.6
540
+ rubygems_version: 3.0.9
541
541
  signing_key:
542
542
  specification_version: 4
543
543
  summary: U3d