hwid 0.2.8 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1faaf21f59377fe46496924d8134230232c17d11
4
- data.tar.gz: 305bd8ce6cbc9480c854a7e889b7b43d1e71ae0b
2
+ SHA256:
3
+ metadata.gz: 838db53f8809add27ff2c04ffc860b1a5c1c643f67d4de1b859c4206bb0de653
4
+ data.tar.gz: 32aac1b8014de46a4f98b690f3006cad9e5b9f05852cbfd1cebc7a5148ee0f33
5
5
  SHA512:
6
- metadata.gz: 8879627977daad9a40fd2f3c31eacf3b53526ff37f4e5dcbe928b57e39287f5c107d22bb3a004799ce551a5eb0daea089e39a305144745cd8ae2dc56b562246a
7
- data.tar.gz: 3a6e0e43d35903a6e2895af3330b78d6b6576fbcca9b77dab43d8288193fa4bcda84cd95ed6cc6310054d193b67dc7d21745e41af0b7770a8a583bbc125f748e
6
+ metadata.gz: 3e2f3db416287f9dd923f7e2d22a1c053b04b24979fa847b31a1af6e94c329cc5dfd2b533bc5dad31b524619e58dfb32ed7b2ae09ffc1c9049ca0067c9ae1b15
7
+ data.tar.gz: 89b80f249c84c9b8933b43f17b71d7bbd18f3ae4dbb290560e9deb4a9016f07f9e799c0afd0ca89ec39fdc2550afcc4599411ac80991754d23fb78913967f2a4
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
Binary file
@@ -0,0 +1,14 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "hwid"
3
+ s.version = "0.3.3"
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
@@ -58,14 +58,16 @@ module Hwid
58
58
  self.parse(res)
59
59
  end
60
60
  def get_mac_id
61
- res=run_cmd('/usr/sbin/system_profiler SPHardwareDataType -timeout 0 | grep Serial')
61
+ res=run_cmd('/usr/sbin/system_profiler SPHardwareDataType -timeout 5 | grep Serial')
62
62
  self.parse(res)
63
63
  end
64
64
  def get_linuxdebian_id
65
65
  res="Serial: unknown"
66
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.*
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
-
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","")
69
71
  #res=run_cmd("lshw | grep -A 10 '*-cpu' | grep -oP '(serial: )\\K.*'")
70
72
  #puts "Interim result is #{res.inspect}"
71
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.8
4
+ version: 0.3.3
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-12-07 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,8 @@ files:
21
21
  - Gemfile.lock
22
22
  - README.md
23
23
  - bin/hwid.rb
24
+ - hwid-0.3.2.gem
25
+ - hwid.gemspec
24
26
  - lib/hwid.rb
25
27
  - lib/hwid/base.rb
26
28
  - test/coverage/assets/0.7.1/application.css
@@ -94,7 +96,7 @@ homepage: http://github.com/semdinsp/hwid
94
96
  licenses:
95
97
  - MIT
96
98
  metadata: {}
97
- post_install_message:
99
+ post_install_message:
98
100
  rdoc_options: []
99
101
  require_paths:
100
102
  - lib
@@ -109,9 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
111
  - !ruby/object:Gem::Version
110
112
  version: 1.3.4
111
113
  requirements: []
112
- rubyforge_project: hwid
113
- rubygems_version: 2.4.3
114
- signing_key:
114
+ rubygems_version: 3.0.8
115
+ signing_key:
115
116
  specification_version: 4
116
117
  summary: Hardware id for mac and rasp pi (not secure)
117
118
  test_files: []