hwid 0.2.7 → 0.3.2

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
- SHA1:
3
- metadata.gz: cf5f02abc40d8fed666c54a114c57f9fb306e6cd
4
- data.tar.gz: 787f1663100f88f7380501cafc871e5d30846ff6
2
+ SHA256:
3
+ metadata.gz: 435704cced440b14a5acd917ee320fd80d7554158678b714d6677912049f3920
4
+ data.tar.gz: e84f5730ad744e0e40d11897f08ee57ad1b4de5cd17e485d4337f061a46c4527
5
5
  SHA512:
6
- metadata.gz: 3269367eea485271cabf0578b26b73ca8ef69dfb9e9a80c6751b202e9c1ffa67bb60e1c317219561f4059ce851f050daa41398adc2547089188a93fe0bd7d97e
7
- data.tar.gz: 3ed7fe15c4fb851c70b41708687f0ac8f4fbf7a3461b2c328063d3849d9c2fa48c8e69f209d37549967b6ab8d883d3c14a2f6ebcb0a8fc1d52f6de73041e77b0
6
+ metadata.gz: e06d03aa7342f371497921396d8275a5dd7eab3074f22bf4caa93974e41c4cfac9ea01600db286054d890fdef59efc16ea8212986a8c5507b4fefbd3e0434331
7
+ data.tar.gz: 4798b145ba45655c3bbbf42fcd800e12ec022c440f1c3609978aa5ca9d5ce57ae7a415adc985f18044174468ddb812e0ecaa84a03df59eba3502cf0ea42ae4d2
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.1.5'
2
+ ruby '2.6.6'
3
3
  gem "codeclimate-test-reporter"
4
4
  gem "minitest"
5
5
  #gem "minitest-rails"
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hwid (0.2.4)
4
+ hwid (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- codeclimate-test-reporter (0.4.0)
10
- simplecov (>= 0.7.1, < 1.0.0)
9
+ codeclimate-test-reporter (1.0.9)
10
+ simplecov (<= 0.13)
11
11
  docile (1.1.5)
12
- minitest (5.4.0)
13
- multi_json (1.10.1)
14
- simplecov (0.9.0)
12
+ json (2.3.1)
13
+ minitest (5.14.1)
14
+ simplecov (0.13.0)
15
15
  docile (~> 1.1.0)
16
- multi_json
17
- simplecov-html (~> 0.8.0)
18
- simplecov-html (0.8.0)
16
+ json (>= 1.8, < 3)
17
+ simplecov-html (~> 0.10.0)
18
+ simplecov-html (0.10.2)
19
19
 
20
20
  PLATFORMS
21
21
  ruby
@@ -26,7 +26,7 @@ DEPENDENCIES
26
26
  minitest
27
27
 
28
28
  RUBY VERSION
29
- ruby 2.1.5p273
29
+ ruby 2.6.6p146
30
30
 
31
31
  BUNDLED WITH
32
- 1.14.6
32
+ 1.17.3
@@ -0,0 +1,14 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "hwid"
3
+ s.version = "0.3.2"
4
+ s.author = "Scott Sproule"
5
+ s.email = "scott.sproule@ficonab.com"
6
+ s.homepage = "http://github.com/semdinsp/hwid"
7
+ s.summary = "Hardware id for mac and rasp pi (not secure)"
8
+ s.description = "Get a rough hardware id of the system that the gem is running on"
9
+ s.executables = ['hwid.rb'] #should be "name.rb"
10
+ s.files = Dir["{lib,test}/**/*"] +Dir["bin/*.rb"] + Dir["[A-Z]*"] # + ["init.rb"]
11
+ s.require_path = "lib"
12
+ s.license = 'MIT'
13
+ s.required_rubygems_version = ">= 1.3.4"
14
+ end
@@ -30,6 +30,7 @@ module Hwid
30
30
  platform << "x86" if (/x86/ =~ RUBY_PLATFORM) != nil
31
31
  platform << "i686" if (/i686/ =~ RUBY_PLATFORM) != nil
32
32
  platform << "debian" if `uname -a`.include?('Debian')
33
+ platform << "ubuntu" if `uname -a`.include?('Ubuntu')
33
34
  platform << "linux" if (/linux/ =~ RUBY_PLATFORM) != nil
34
35
  platform
35
36
  end
@@ -40,6 +41,7 @@ module Hwid
40
41
  return get_rasp_id if platform.include?("raspberry 2")
41
42
  return get_mac_id if platform.include?("mac")
42
43
  return get_linuxdebian_id if platform.include?("debian") #virtaul box ??
44
+ return get_linuxdebian_id if platform.include?("ubuntu") #virtaul box ??
43
45
  return get_linux_id if platform.include?("linux")
44
46
  end
45
47
  def run_cmd(cmd)
@@ -62,8 +64,10 @@ module Hwid
62
64
  def get_linuxdebian_id
63
65
  res="Serial: unknown"
64
66
  # lshw -quiet -class cpu -disable usb -disable network -disable pci -disable cpuinfo -disable dmi -disable memory -disable isapnp -disable ide -disable device-tree -disable spd | grep -oP '(serial: )\K.*
65
- res=run_cmd("lshw -quiet -class cpu -disable usb -disable network -disable pci -disable cpuinfo -disable dmi -disable memory -disable isapnp -disable ide -disable device-tree -disable spd | grep -oP '(serial: )\\K.*'")
66
-
67
+ # res=run_cmd("lshw -quiet -class cpu -disable usb -disable network -disable pci -disable cpuinfo -disable dmi -disable memory -disable isapnp -disable ide -disable device-tree -disable spd | grep -oP '(serial: )\\K.*'")
68
+ res=run_cmd("lshw -quiet -class cpu -class network -disable usb -disable pci -disable cpuinfo -disable dmi -disable memory -disable isapnp -disable ide -disable device-tree -disable spd | grep -oP '(serial: )\\K.*'")
69
+ res=res.gsub("0000-","")
70
+ res=res.gsub("\n","")
67
71
  #res=run_cmd("lshw | grep -A 10 '*-cpu' | grep -oP '(serial: )\\K.*'")
68
72
  #puts "Interim result is #{res.inspect}"
69
73
  res=res.chomp
@@ -1,16 +1,12 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
1
3
  puts "in test helper"
2
4
  require 'rubygems'
3
5
  require 'bundler/setup'
4
6
  require "codeclimate-test-reporter"
5
- CodeClimate::TestReporter.start
6
7
  require 'stringio'
7
8
  require 'minitest/autorun'
8
9
  require 'minitest/unit'
9
- SimpleCov.command_name 'test'
10
- #SimpleCov.profiles.define 'mygem' do
11
- # add_group "Gem", '/lib/' # additional config here
12
- #end
13
- SimpleCov.start
14
10
 
15
11
  require File.dirname(__FILE__) + '/../lib/hwid'
16
12
 
@@ -1,5 +1,9 @@
1
1
  puts File.dirname(__FILE__)
2
- require File.dirname(__FILE__) + '/test_helper.rb'
2
+ #require File.dirname(__FILE__) + '/test_helper.rb'
3
+ require 'rubygems'
4
+ require File.expand_path("../test_helper", __FILE__)
5
+ #require File.dirname(__FILE__) + '/test_helper.rb'
6
+ #require 'test_helper.rb'
3
7
 
4
8
 
5
9
  class HwidTest < Minitest::Test
@@ -38,4 +42,4 @@ class HwidTest < Minitest::Test
38
42
  end
39
43
 
40
44
 
41
-
45
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hwid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Sproule
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-03 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Get a rough hardware id of the system that the gem is running on
14
14
  email: scott.sproule@ficonab.com
@@ -21,6 +21,7 @@ files:
21
21
  - Gemfile.lock
22
22
  - README.md
23
23
  - bin/hwid.rb
24
+ - hwid.gemspec
24
25
  - lib/hwid.rb
25
26
  - lib/hwid/base.rb
26
27
  - test/coverage/assets/0.7.1/application.css
@@ -94,7 +95,7 @@ homepage: http://github.com/semdinsp/hwid
94
95
  licenses:
95
96
  - MIT
96
97
  metadata: {}
97
- post_install_message:
98
+ post_install_message:
98
99
  rdoc_options: []
99
100
  require_paths:
100
101
  - lib
@@ -109,9 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
110
  - !ruby/object:Gem::Version
110
111
  version: 1.3.4
111
112
  requirements: []
112
- rubyforge_project: hwid
113
- rubygems_version: 2.4.3
114
- signing_key:
113
+ rubygems_version: 3.0.8
114
+ signing_key:
115
115
  specification_version: 4
116
116
  summary: Hardware id for mac and rasp pi (not secure)
117
117
  test_files: []