hwid 0.3.0 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hwid/base.rb +1 -1
- data/test/test_helper.rb +2 -6
- data/test/test_hwid.rb +6 -2
- metadata +6 -9
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -32
- data/README.md +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e14d5b2a5b55c8620bb2794d533748f233327f0d011a96b91fc0f96efb57c9b
|
4
|
+
data.tar.gz: d602cac4bf9e8109142f78c617a7e3089453f9e686bfc45376733d393b2e25a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1e76c3c7b0233c815afa593732fb2fe4c6a422d3e4e879e6d8a712a8ddba61cb8693c9f85ea80a872d09d5db5ddca35928a762858c34033d0fb49b51ade482
|
7
|
+
data.tar.gz: 064d2fc7614ba90648a0840be814d04580e07943bcf2897c30388ad56f0aab38c65180edc89078766dee8337b6dccda0db19dfd0b2be684971e9a9f105a358e6
|
data/lib/hwid/base.rb
CHANGED
@@ -58,7 +58,7 @@ 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
|
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
|
data/test/test_helper.rb
CHANGED
@@ -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
|
|
data/test/test_hwid.rb
CHANGED
@@ -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.3.
|
4
|
+
version: 0.3.5
|
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:
|
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
|
@@ -17,9 +17,6 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- Gemfile
|
21
|
-
- Gemfile.lock
|
22
|
-
- README.md
|
23
20
|
- bin/hwid.rb
|
24
21
|
- lib/hwid.rb
|
25
22
|
- lib/hwid/base.rb
|
@@ -94,7 +91,7 @@ homepage: http://github.com/semdinsp/hwid
|
|
94
91
|
licenses:
|
95
92
|
- MIT
|
96
93
|
metadata: {}
|
97
|
-
post_install_message:
|
94
|
+
post_install_message:
|
98
95
|
rdoc_options: []
|
99
96
|
require_paths:
|
100
97
|
- lib
|
@@ -109,8 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
106
|
- !ruby/object:Gem::Version
|
110
107
|
version: 1.3.4
|
111
108
|
requirements: []
|
112
|
-
rubygems_version: 3.0.
|
113
|
-
signing_key:
|
109
|
+
rubygems_version: 3.0.8
|
110
|
+
signing_key:
|
114
111
|
specification_version: 4
|
115
112
|
summary: Hardware id for mac and rasp pi (not secure)
|
116
113
|
test_files: []
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
hwid (0.2.9)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
codeclimate-test-reporter (1.0.9)
|
10
|
-
simplecov (<= 0.13)
|
11
|
-
docile (1.1.5)
|
12
|
-
json (2.2.0)
|
13
|
-
minitest (5.11.3)
|
14
|
-
simplecov (0.13.0)
|
15
|
-
docile (~> 1.1.0)
|
16
|
-
json (>= 1.8, < 3)
|
17
|
-
simplecov-html (~> 0.10.0)
|
18
|
-
simplecov-html (0.10.2)
|
19
|
-
|
20
|
-
PLATFORMS
|
21
|
-
ruby
|
22
|
-
|
23
|
-
DEPENDENCIES
|
24
|
-
codeclimate-test-reporter
|
25
|
-
hwid!
|
26
|
-
minitest
|
27
|
-
|
28
|
-
RUBY VERSION
|
29
|
-
ruby 2.1.5p273
|
30
|
-
|
31
|
-
BUNDLED WITH
|
32
|
-
1.14.6
|
data/README.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/semdinsp/hwid.svg?branch=master)](https://travis-ci.org/semdinsp/hwid)[![Code Climate](https://codeclimate.com/github/semdinsp/hwid/badges/gpa.svg)](https://codeclimate.com/github/semdinsp/hwid)
|
2
|
-
[![Gem Version](https://badge.fury.io/rb/hwid.png)](http://badge.fury.io/rb/hwid)
|
3
|
-
|
4
|
-
hwid gem
|
5
|
-
============
|
6
|
-
|
7
|
-
return the hardware id of the system the gem is running on.
|
8
|
-
|
9
|
-
Simple hwid id
|
10
|
-
=====================
|
11
|
-
THis is not secure but gives a simple way to identify the hardware from a particular client application.
|
12
|
-
|
13
|
-
It is a bit slow so perhaps only call it upon startup
|
14
|
-
|
15
|
-
Usage
|
16
|
-
=======
|
17
|
-
|
18
|
-
Hwid.systemid
|
19
|
-
|