lib/u3d/utils.rb in u3d-1.3.3 vs lib/u3d/utils.rb in u3d-1.3.4
- old
+ new
@@ -36,10 +36,11 @@
UNITY_VERSION_REGEX = /(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:(\w)(?:(\d+))?)?/.freeze
MOZILLA_AGENT_HEADER = {
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0'
}.freeze
+ # rubocop:disable Metrics/ClassLength
class << self
def final_url(url, redirect_limit: 10)
follow_redirects(url, redirect_limit: redirect_limit, http_method: :head) do |request, _response|
request.uri.to_s
end
@@ -210,11 +211,11 @@
end
def parse_unity_version(version)
ver = UNITY_VERSION_REGEX.match(version)
if ver.nil?
- raise ArgumentError, "Version (#{version}) does not match the Unity "\
+ raise ArgumentError, "Version (#{version}) does not match the Unity " \
'version format 0.0.0x0'
end
[ver[1], ver[2], ver[3], ver[4], ver[5]]
end
@@ -344,8 +345,9 @@
opt[:read_timeout] = http_read_timeout if http_read_timeout
UI.verbose "Using http opts: #{opt}"
opt
end
end
+ # rubocop:enable Metrics/ClassLength
end
# rubocop:enable Metrics/ModuleLength
end