macaddr 1.6.6 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/macaddr.rb +2 -5
- data/macaddr.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmNhMTdlYWU3ZGFhNmVlNDQ4Y2IzMDU2NjFhODY4YTZjNWIyMWE4ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODljYjgwOGFlOWU5Y2FiZjk4MzA4ZWUzYjhlMGI2OTU5ZGMwMDczYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWJhYTZiMjYxZTE5ZWZlNzUyOWVjZTFjZjRkMWZmNDEyODU0NDNkZTRmODY5
|
10
|
+
MDgzZDk1NTVkODIwOTE2YzllZTYxMDI2ZjQzMmU0Nzc2NDMyYzJlN2I2Mjk0
|
11
|
+
OTMyYTE4ZTljOGUxNGNhYTQyNDhkNzQwYmI5ZWIwNWYzYWMxNTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmY1NjlmYTBmYTYyMDJiYWQ0NTczMzZlZmVjNmE3ZjliZTI3YjBlNDBjNDVm
|
14
|
+
ODkyZDU4NDkwYzllMDRhMjgxMTI2MTM4YmM3Y2JmNDY0MWNkZTg1MzkzMTVi
|
15
|
+
Y2NhNWU2YTRjN2JlNGZlODE2MTNhNDNlNzdhNWNjMjI3NWU4ZmQ=
|
data/lib/macaddr.rb
CHANGED
@@ -23,7 +23,7 @@ end
|
|
23
23
|
require 'systemu'
|
24
24
|
|
25
25
|
module Mac
|
26
|
-
VERSION = '1.6.
|
26
|
+
VERSION = '1.6.7'
|
27
27
|
|
28
28
|
def Mac.version
|
29
29
|
::Mac::VERSION
|
@@ -57,14 +57,11 @@ module Mac
|
|
57
57
|
|
58
58
|
def address
|
59
59
|
return @mac_address if defined? @mac_address and @mac_address
|
60
|
-
re = %r/[^:\-](?:[0-9A-F][0-9A-F][:\-]){5}[0-9A-F][0-9A-F][^:\-]/io
|
61
60
|
cmds = '/sbin/ifconfig', '/bin/ifconfig', 'ifconfig', 'ipconfig /all', 'cat /sys/class/net/*/address'
|
62
61
|
|
63
|
-
null = test(?e, '/dev/null') ? '/dev/null' : 'NUL'
|
64
|
-
|
65
62
|
output = nil
|
66
63
|
cmds.each do |cmd|
|
67
|
-
|
64
|
+
_, stdout, _ = systemu(cmd) rescue next
|
68
65
|
next unless stdout and stdout.size > 0
|
69
66
|
output = stdout and break
|
70
67
|
end
|
data/macaddr.gemspec
CHANGED