u3d 1.1.1 → 1.1.2

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: 0e34b0f9202cf4e0351462879c8719ff898285538f1dc046c62e89bd96978c9b
4
- data.tar.gz: 4a8413ab008d81a86cee87e02c28428b41e27c927b60826e80fb2b00cdff21fe
3
+ metadata.gz: 39ab620cd00d64d5922f9bb0364676387a9c687db681facffcd064ab41a16bbb
4
+ data.tar.gz: fe8917047cdafdb4bbdd72ec89244fce86995d401d735f6b863d49775c8b13c7
5
5
  SHA512:
6
- metadata.gz: 5270c48e07ea3d371747ed6b8192345a543a6ed7be5b2102683d1fd585bf1facf998fcee407f339a2ba893e43b2f512cc709ec66dd76dab4e8bb1b4e3729c49a
7
- data.tar.gz: 22391cbcbca376248c726cec2615adf91c7630bec60244616fe51fd3c11a88986676db54e5cac9d405e8dd91efcbeb2d08c0e843d935585f55657d421a9d642b
6
+ metadata.gz: 8e1ac4eb2ed6317097f3aaf6c2a5e8ffe3dfa7abda27c544a27453ca248bcd1deb0a8a418a45fbe2c550e980aaa2c34d15f03582c988d800ff79c75394f02cdb
7
+ data.tar.gz: e698af18c57fcd4bc685c8fdb2c8b82fe06e6a28161b4376263e3698f7e6aa7f21d5a5d66ca66fd80037f6a771a452fb4d313e880545087ea526e881dfc59861
@@ -1,4 +1,4 @@
1
- future-release=v1.1.1
1
+ future-release=v1.1.2
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog,question
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.1.2](https://github.com/DragonBox/u3d/tree/v1.1.2) (2018-07-12)
4
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.1.1...v1.1.2)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - u3d/available: Add option to not use the central cache [\#324](https://github.com/DragonBox/u3d/pull/324) ([niezbop](https://github.com/niezbop))
9
+
3
10
  ## [v1.1.1](https://github.com/DragonBox/u3d/tree/v1.1.1) (2018-07-12)
4
11
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.1.0...v1.1.1)
5
12
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.1.1)
4
+ u3d (1.1.2)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  file-tail (>= 1.2.0)
data/README.md CHANGED
@@ -76,6 +76,12 @@ export LANG=en_US.UTF-8
76
76
 
77
77
  You can find your shell profile at ~/.bashrc, ~/.bash_profile or ~/.zshrc depending on your system.
78
78
 
79
+ ## Central cache
80
+
81
+ Because fetching all the versions online can be rather long, especially on slow connections, u3d uses a [central cache](https://dragonbox.github.io/unities/v1/versions.json) which performs the fetching automatically and makes retrieving all the versions much faster.
82
+
83
+ __NOTE__: If you do not want to use the central cache for some reason, you can still perform the version fetching manually by running `u3d available --no-central` which will cache locally the versions that you retrieved so that you can use them later (in `u3d install` for example).
84
+
79
85
  ## Unity versions numbering
80
86
 
81
87
  Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:
@@ -107,8 +107,9 @@ module U3d
107
107
  ver = options[:unity_version]
108
108
  os = valid_os_or_current(options[:operating_system])
109
109
  rl = options[:release_level]
110
+ central = options.fetch(:central, true)
110
111
 
111
- cache_versions = cache_versions(os, force_refresh: options[:force])
112
+ cache_versions = cache_versions(os, force_refresh: options[:force], central_cache: central)
112
113
 
113
114
  if ver
114
115
  cache_versions = cache_versions.extract(*cache_versions.keys.select { |k| Regexp.new(ver).match(k) })
@@ -265,8 +266,8 @@ module U3d
265
266
 
266
267
  private
267
268
 
268
- def cache_versions(os, offline: false, force_refresh: false)
269
- cache = Cache.new(force_os: os, offline: offline, force_refresh: force_refresh, central_cache: true)
269
+ def cache_versions(os, offline: false, force_refresh: false, central_cache: true)
270
+ cache = Cache.new(force_os: os, offline: offline, force_refresh: force_refresh, central_cache: central_cache)
270
271
  cache_os = cache[os.id2name] || {}
271
272
  cache_versions = cache_os['versions'] || {}
272
273
  cache_versions
@@ -114,6 +114,7 @@ Fore more information about how the rules work, see https://github.com/DragonBox
114
114
  oses = U3dCore::Helper.operating_systems
115
115
  c.syntax = 'u3d available [-r | --release_level <level>] [-o | --operating_system <OS>] [-u | --unity_version <version>] [-p | --packages] [-f | --force]'
116
116
  levels = Commands.release_levels
117
+ c.option '--[no-]central', 'Use or not the central version cache'
117
118
  c.option '-f', '--force', 'Force refresh list of available versions'
118
119
  c.option '-r', '--release_level STRING', String, "Checks for availability on specific release level [#{levels.join(', ')}]"
119
120
  c.option '-o', '--operating_system STRING', String, "Checks for availability on specific OS [#{oses.join(', ')}]"
@@ -125,8 +126,14 @@ Fore more information about how the rules work, see https://github.com/DragonBox
125
126
  c.example 'List packages available for Unity version 5.6.0f3', 'u3d available -u 5.6.0f3 -p'
126
127
  c.example 'List packages available for Unity version containing the 5.6 string', 'u3d available -u \'5.6\' -p'
127
128
  c.summary = 'List download-ready versions of Unity'
129
+ c.description = %(
130
+ #{c.summary}
131
+ This command interprets the information that are available on Unity's website and forums to fetch all the version that are available for download.
132
+ It relies on a centralized cache (https://dragonbox.github.io/unities/v1/versions.json) that performs the fetching automatically so that you don't have to do it locally. If you do not want to use this central cache and wish to perform the fetching yourself, you can use the --no-central option.
133
+ )
128
134
  c.action do |_args, options|
129
135
  options.default packages: false
136
+ options.default central: true
130
137
  Commands.list_available(options: convert_options(options))
131
138
  end
132
139
  end
@@ -121,7 +121,7 @@ module U3d
121
121
  # Captures a version and its base url
122
122
  LINUX_DOWNLOAD = %r{'(https?://[\w/\.-]+/[0-9a-f\+]{12,13}/)(./)?UnitySetup-(\d+\.\d+\.\d+\w\d+)'}
123
123
  MAC_DOWNLOAD = %r{"(https?://[\w/\.-]+/[0-9a-f\+]{12,13}/)MacEditorInstaller/[a-zA-Z0-9/\.\+]+-(\d+\.\d+\.\d+\w\d+)\.?\w+"}
124
- MAC_DOWNLOAD_2018_2 = %r{"(https?://[\w/\.-]+/[0-9a-f\+]{12,13}/)UnityDownloadAssistant-[a-zA-Z0-9/\.\+]+-(\d+\.\d+\.\d+\w\d+)\.?\w+"}
124
+ MAC_DOWNLOAD_2018_2 = %r{"(https?://[\w/\.-]+/[0-9a-f\+]{12,13}/)UnityDownloadAssistant-(\d+\.\d+\.\d+\w\d+)\.?\w+"}
125
125
  WIN_DOWNLOAD = %r{"(https?://[\w/\.-]+/[0-9a-f\+]{12,13}/)Windows..EditorInstaller/[a-zA-Z0-9/\.\+]+-(\d+\.\d+\.\d+\w\d+)\.?\w+"}
126
126
  LINUX_DOWNLOAD_DATED = %r{"(https?://[\w/\._-]+/unity\-editor\-installer\-(\d+\.\d+\.\d+\w\d+).*\.sh)"}
127
127
  LINUX_DOWNLOAD_RECENT_PAGE = %r{"(https?://beta\.unity3d\.com/download/[a-zA-Z0-9/\.\+]+/public_download\.html)"}
@@ -21,7 +21,7 @@
21
21
  ## --- END LICENSE BLOCK ---
22
22
 
23
23
  module U3d
24
- VERSION = '1.1.1'.freeze
24
+ VERSION = '1.1.2'.freeze
25
25
  DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity game engine from command line.'.freeze
26
26
  UNITY_VERSIONS_NOTE = "Unity uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
27
27
  "\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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Lacoste