plat4m 1.1.2 → 1.1.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: 4481fa20e386ce17cb2e32497e4751ef06a0c8fe8f6924ccc39123ef39b1d7fc
4
- data.tar.gz: abe2c6c42b690c0d62f2172cf7fa105d8f18979f34c5ea0bcf8dc1df2a7c26aa
3
+ metadata.gz: 15ad6738f1fff758126da46f89b408b099562c7b63eed44adac9ff1337af8515
4
+ data.tar.gz: 86e6a9b2dcff17fde635ec71a9b4bf461ced8243d9068e00adef7ed04c83f512
5
5
  SHA512:
6
- metadata.gz: fc950cde9aa00a2b3071db15c912bc946b931aeac7afc6f823a7083a21a97bd6d8fdf04eedfd6a6140f9ee3c94132fd6e7f4b75f1b3efb1d67fe9e1c3a295923
7
- data.tar.gz: b4d5e19123e3651fdbcb2b6ddc96f817750a809f04add82a7b08353898dfae08f733d3a523fa93954c629a8666aba813e9323a3accf06eabbc862f1f34f412f1
6
+ metadata.gz: c52d3410ee2d848bf2f8506dc00b2c5aea509ec9c58f32058316f9a3caf8a50411d97be36675ced3d1606e8e67f5e055e717492723e00f8a8c9a7759d07fd5d6
7
+ data.tar.gz: 194f8f5eb5e11358738a11ea72a2f979f65db4286ee01c3103d9afa840adbd9caf23fb23b3d292ec87db4b110ff4e31b26e791078db4deeb4c63a761585f3a17
@@ -35,11 +35,18 @@ module Plat4m
35
35
  distro = {
36
36
  distro: RUBY_PLATFORM.match?(/mingw/i) ? 'mingw' : 'windows'
37
37
  }
38
- # the 'ver' command returns something like "Microsoft Windows [Version xx.xx.xx.xx]"
39
- match = `ver`.strip.match(/\[(.*)\]/)
40
- ver = match[1].split.last
41
- distro[:release] = ver.split('.').shift
38
+ # the 'ver' command outputs something like "Microsoft Windows [Version xx.xx.xx.xx]"
39
+ # the 'for ...' statement parses this and echos only the 'xx.xx.xx.xx' part
40
+ ver = `for /f "tokens=2 delims=[]" %s in ('ver') do @(for /f "tokens=2" %v in ('echo %s') do @echo %v)`.strip
42
41
  distro[:version] = ver
42
+ build = ver.split('.')[2].to_i
43
+ distro[:release] = if build >= 22000
44
+ '11'
45
+ elsif build >= 10240
46
+ '10'
47
+ else
48
+ '<10'
49
+ end
43
50
  # in case of MingW built Ruby assume availability of RubyInstaller Devkit
44
51
  distro[:pkgman] = distro[:distro]=='mingw' ? Pacman.new(distro) : nil
45
52
  distro
@@ -8,6 +8,6 @@
8
8
  module Plat4m
9
9
 
10
10
  # Current Plat4m version.
11
- VERSION = '1.1.2'
11
+ VERSION = '1.1.3'
12
12
 
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plat4m
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-30 00:00:00.000000000 Z
11
+ date: 2024-10-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Plat4m is a simple runtime system platform scouting and support library.
14
14
  email: mcorino@m2c-software.nl