plat4m 1.0.0 → 1.0.4

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: 9df6b644a5e122916e8230965e4e4999441bd067706d2679e905008f0000c0f8
4
- data.tar.gz: 0efb88c4163e04fef3499e3f542d9a003ffb7fdd28ced4ff0db4a1d8fb3aa8d8
3
+ metadata.gz: 685c2e4edcc91906cd86fe043ac708f5e13d5abdea21f3e5eb6cc0607bd2c5ed
4
+ data.tar.gz: a8b9a9ae28e64180015b6c63b7d7e82915a5b38e22df138680705748c8a3c9ef
5
5
  SHA512:
6
- metadata.gz: e7101d9e5feba298a1b945b010996a7d48f26d3267f31da53b041cf5b4e936eeff29ed8e5ff6277d6548c5d4efda9de05b2779000d3100d611474a99196c5bd7
7
- data.tar.gz: d8c7db00c80acc09fe3308b04a33a522263ffe71b40b01096ab5da4614b9b0486c349907d9f66a440feb738e82ef15e96f10f146a93b451f9f2c970450213e1a
6
+ metadata.gz: 8e0b8127692a652b625c17c94740a1202e1fafcb6a02b14e6658798ab72f53109a7b49ca02c788ea61264ae9b2b2d21968e8c612b023dfeca14ec29fecac544e
7
+ data.tar.gz: c1e1a4006bddac350fd68b54f9b09fe46d0360810c8223fda7282d33cc7828ce3981b22e3cd0b00b690c4433827cb3940681fb55b7918b243425db00562e28c0
@@ -36,6 +36,10 @@ module Plat4m
36
36
  distro: 'macosx'
37
37
  }
38
38
  ver = `sw_vers --productVersion`.strip
39
+ if ver =~ /Usage:\s+sw_vers/
40
+ # older MacOSX
41
+ ver = `sw_vers -productVersion`.strip
42
+ end
39
43
  distro[:release] = ver.split('.').first
40
44
  distro[:version] = ver
41
45
  distro[:pkgman] = MacPkgManager.new
@@ -96,15 +100,11 @@ module Plat4m
96
100
  end
97
101
 
98
102
  def has_macports?
99
- if @has_macports.nil?
100
- @has_macports = system('command -v port>/dev/null')
101
- end
103
+ @has_macports
102
104
  end
103
105
 
104
106
  def has_homebrew?
105
- if @has_homebrew.nil?
106
- @has_homebrew = system('command -v brew>/dev/null')
107
- end
107
+ @has_homebrew
108
108
  end
109
109
 
110
110
  class Homebrew < PkgManager
@@ -50,6 +50,6 @@ module Plat4m
50
50
 
51
51
  end
52
52
 
53
- self.sniffers[:windows] = Sniffer::Darwin
53
+ self.sniffers[:windows] = Sniffer::Windows
54
54
 
55
55
  end
data/lib/plat4m/system.rb CHANGED
@@ -43,7 +43,7 @@ module Plat4m
43
43
  @pkgman = pkgman
44
44
  @other = other
45
45
  @other.each_key do |key|
46
- unless self.method(key.to_sym)
46
+ unless self.respond_to?(key.to_sym)
47
47
  singleton_class.class_eval <<~__CODE
48
48
  define_method(:#{key}) do
49
49
  @other['#{key}']
@@ -8,6 +8,6 @@
8
8
  module Plat4m
9
9
 
10
10
  # Current Plat4m version.
11
- VERSION = '1.0.0'
11
+ VERSION = '1.0.4'
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.0.0
4
+ version: 1.0.4
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-02-20 00:00:00.000000000 Z
11
+ date: 2024-02-21 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