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 +4 -4
- data/lib/plat4m/sniff/windows.rb +11 -4
- data/lib/plat4m/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15ad6738f1fff758126da46f89b408b099562c7b63eed44adac9ff1337af8515
|
4
|
+
data.tar.gz: 86e6a9b2dcff17fde635ec71a9b4bf461ced8243d9068e00adef7ed04c83f512
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52d3410ee2d848bf2f8506dc00b2c5aea509ec9c58f32058316f9a3caf8a50411d97be36675ced3d1606e8e67f5e055e717492723e00f8a8c9a7759d07fd5d6
|
7
|
+
data.tar.gz: 194f8f5eb5e11358738a11ea72a2f979f65db4286ee01c3103d9afa840adbd9caf23fb23b3d292ec87db4b110ff4e31b26e791078db4deeb4c63a761585f3a17
|
data/lib/plat4m/sniff/windows.rb
CHANGED
@@ -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
|
39
|
-
|
40
|
-
ver =
|
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
|
data/lib/plat4m/version.rb
CHANGED
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.
|
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-
|
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
|