macaddr 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/macaddr.rb CHANGED
@@ -23,7 +23,7 @@ end
23
23
  require 'systemu'
24
24
 
25
25
  module Mac
26
- VERSION = '1.5.0'
26
+ VERSION = '1.6.0'
27
27
 
28
28
  def Mac.version
29
29
  ::Mac::VERSION
@@ -31,7 +31,7 @@ module Mac
31
31
 
32
32
  def Mac.dependencies
33
33
  {
34
- 'systemu' => [ 'systemu' , '>= 2.4.0' ]
34
+ 'systemu' => [ 'systemu' , '~> 2.2.0' ]
35
35
  }
36
36
  end
37
37
 
@@ -54,7 +54,7 @@ module Mac
54
54
  def address
55
55
  return @mac_address if defined? @mac_address and @mac_address
56
56
  re = %r/[^:\-](?:[0-9A-F][0-9A-F][:\-]){5}[0-9A-F][0-9A-F][^:\-]/io
57
- cmds = '/sbin/ifconfig', '/bin/ifconfig', 'ifconfig', 'ipconfig /all'
57
+ cmds = '/sbin/ifconfig', '/bin/ifconfig', 'ifconfig', 'ipconfig /all', 'cat /sys/class/net/*/address'
58
58
 
59
59
  null = test(?e, '/dev/null') ? '/dev/null' : 'NUL'
60
60
 
data/macaddr.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "macaddr"
6
- spec.version = "1.5.0"
6
+ spec.version = "1.6.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "macaddr"
9
9
  spec.description = "description: macaddr kicks the ass"
@@ -19,6 +19,7 @@ Gem::Specification::new do |spec|
19
19
  "rvmrc.example",
20
20
  "test",
21
21
  "test/data",
22
+ "test/data/noifconfig",
22
23
  "test/data/osx",
23
24
  "test/mac_test.rb",
24
25
  "test/testing.rb"]
@@ -30,7 +31,7 @@ Gem::Specification::new do |spec|
30
31
  spec.test_files = nil
31
32
 
32
33
 
33
- spec.add_dependency(*["systemu", ">= 2.4.0"])
34
+ spec.add_dependency(*["systemu", "~> 2.2.0"])
34
35
 
35
36
 
36
37
  spec.extensions.push(*[])
@@ -0,0 +1,3 @@
1
+ d0:4e:f1:68:29:79
2
+ 00:00:00:00:00:00
3
+ a2:28:b1:98:31:30
data/test/mac_test.rb CHANGED
@@ -32,7 +32,8 @@ BEGIN {
32
32
  $data = {}
33
33
 
34
34
  {
35
- 'c8:bc:c8:9b:28:b1' => 'osx'
35
+ 'c8:bc:c8:9b:28:b1' => 'osx',
36
+ 'd0:4e:f1:68:29:79' => 'noifconfig'
36
37
  }.each do |expected, basename|
37
38
  entry = File.join($datadir, basename)
38
39
  $data[expected] = IO.read(entry)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macaddr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-02 00:00:00.000000000 Z
12
+ date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: systemu
16
- requirement: &2164444740 !ruby/object:Gem::Requirement
16
+ requirement: &70340735661820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 2.4.0
21
+ version: 2.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164444740
24
+ version_requirements: *70340735661820
25
25
  description: ! 'description: macaddr kicks the ass'
26
26
  email: ara.t.howard@gmail.com
27
27
  executables: []
@@ -35,6 +35,7 @@ files:
35
35
  - lib/macaddr.rb
36
36
  - macaddr.gemspec
37
37
  - rvmrc.example
38
+ - test/data/noifconfig
38
39
  - test/data/osx
39
40
  - test/mac_test.rb
40
41
  - test/testing.rb
@@ -58,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
59
  version: '0'
59
60
  requirements: []
60
61
  rubyforge_project: codeforpeople
61
- rubygems_version: 1.8.10
62
+ rubygems_version: 1.8.11
62
63
  signing_key:
63
64
  specification_version: 3
64
65
  summary: macaddr