hwid 0.1.0
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 +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +24 -0
- data/README.md +20 -0
- data/bin/hwid.rb +5 -0
- data/lib/hwid.rb +7 -0
- data/lib/hwid/base.rb +40 -0
- data/test/coverage/assets/0.7.1/application.css +1110 -0
- data/test/coverage/assets/0.7.1/application.js +626 -0
- data/test/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/test/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/test/coverage/assets/0.7.1/favicon_green.png +0 -0
- data/test/coverage/assets/0.7.1/favicon_red.png +0 -0
- data/test/coverage/assets/0.7.1/favicon_yellow.png +0 -0
- data/test/coverage/assets/0.7.1/loading.gif +0 -0
- data/test/coverage/assets/0.7.1/magnify.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/test/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/coverage/index.html +72 -0
- data/test/test_helper.rb +17 -0
- data/test/test_hwid.rb +33 -0
- metadata +93 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html xmlns='http://www.w3.org/1999/xhtml'>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Code coverage for Test</title>
|
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
6
|
+
<script src='./assets/0.7.1/application.js' type='text/javascript'></script>
|
|
7
|
+
<link href='./assets/0.7.1/application.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
|
8
|
+
<link rel="shortcut icon" type="image/png" href="./assets/0.7.1/favicon_green.png" />
|
|
9
|
+
<link rel="icon" type="image/png" href="./assets/0.7.1/favicon.png" />
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<div id="loading">
|
|
14
|
+
<img src="./assets/0.7.1/loading.gif" alt="loading"/>
|
|
15
|
+
</div>
|
|
16
|
+
<div id="wrapper" style="display:none;">
|
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2013-10-08T18:39:39+08:00">2013-10-08T18:39:39+08:00</abbr></div>
|
|
18
|
+
<ul class="group_tabs"></ul>
|
|
19
|
+
|
|
20
|
+
<div id="content">
|
|
21
|
+
<div class="file_list_container" id="AllFiles">
|
|
22
|
+
<h2>
|
|
23
|
+
<span class="group_name">All Files</span>
|
|
24
|
+
(<span class="covered_percent"><span class="green">100.0%</span></span>
|
|
25
|
+
covered at
|
|
26
|
+
<span class="covered_strength">
|
|
27
|
+
<span class="red">
|
|
28
|
+
0.0
|
|
29
|
+
</span>
|
|
30
|
+
</span> hits/line)
|
|
31
|
+
</h2>
|
|
32
|
+
<a name="AllFiles"></a>
|
|
33
|
+
<div>
|
|
34
|
+
<b>0</b> files in total.
|
|
35
|
+
<b>0.0</b> relevant lines.
|
|
36
|
+
<span class="green"><b>0.0</b> lines covered</span> and
|
|
37
|
+
<span class="red"><b>0.0</b> lines missed </span>
|
|
38
|
+
</div>
|
|
39
|
+
<table class="file_list">
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th>File</th>
|
|
43
|
+
<th>% covered</th>
|
|
44
|
+
<th>Lines</th>
|
|
45
|
+
<th>Relevant Lines</th>
|
|
46
|
+
<th>Lines covered</th>
|
|
47
|
+
<th>Lines missed</th>
|
|
48
|
+
<th>Avg. Hits / Line</th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
|
|
53
|
+
</tbody>
|
|
54
|
+
</table>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div id="footer">
|
|
62
|
+
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.7.1
|
|
63
|
+
and simplecov-html v0.7.1<br/>
|
|
64
|
+
using test
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="source_files">
|
|
68
|
+
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
data/test/test_helper.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
puts "in test helper"
|
|
2
|
+
require 'rubygems'
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
require "codeclimate-test-reporter"
|
|
5
|
+
CodeClimate::TestReporter.start
|
|
6
|
+
require 'stringio'
|
|
7
|
+
require 'minitest/autorun'
|
|
8
|
+
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
|
+
|
|
15
|
+
require File.dirname(__FILE__) + '/../lib/hwid'
|
|
16
|
+
|
|
17
|
+
|
data/test/test_hwid.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
puts File.dirname(__FILE__)
|
|
2
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class HwidTest < Minitest::Test
|
|
6
|
+
|
|
7
|
+
def setup
|
|
8
|
+
@f=Hwid::Base.new
|
|
9
|
+
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def test_basic
|
|
13
|
+
assert @f!=nil, "should be created"
|
|
14
|
+
end
|
|
15
|
+
def test_prase
|
|
16
|
+
@f.parse('Serial: 1234')
|
|
17
|
+
assert @f.parse('Serial: 1234')=='1234', "basic parse"
|
|
18
|
+
assert @f.parse('Serial:1234')=='1234', "basic parse no blanks"
|
|
19
|
+
assert @f.parse('Serial:1234 ')=='1234', "basic parse trailing blank"
|
|
20
|
+
assert @f.parse(' ')=='unknown', "bad parse"
|
|
21
|
+
end
|
|
22
|
+
def test_system
|
|
23
|
+
assert @f.systemid!='unknown', "return id"
|
|
24
|
+
end
|
|
25
|
+
def test_class
|
|
26
|
+
assert Hwid.systemid!='unknown', "return id"
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
metadata
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: hwid
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Scott Sproule
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2014-08-16 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Get a rough hardware id of the system that the gem is running on
|
|
14
|
+
email: scott.sproule@ficonab.com
|
|
15
|
+
executables:
|
|
16
|
+
- hwid.rb
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- Gemfile
|
|
21
|
+
- Gemfile.lock
|
|
22
|
+
- README.md
|
|
23
|
+
- bin/hwid.rb
|
|
24
|
+
- lib/hwid.rb
|
|
25
|
+
- lib/hwid/base.rb
|
|
26
|
+
- test/coverage/assets/0.7.1/application.css
|
|
27
|
+
- test/coverage/assets/0.7.1/application.js
|
|
28
|
+
- test/coverage/assets/0.7.1/fancybox/blank.gif
|
|
29
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_close.png
|
|
30
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_loading.png
|
|
31
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_nav_left.png
|
|
32
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_nav_right.png
|
|
33
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png
|
|
34
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png
|
|
35
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png
|
|
36
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png
|
|
37
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png
|
|
38
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png
|
|
39
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png
|
|
40
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png
|
|
41
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_title_left.png
|
|
42
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_title_main.png
|
|
43
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_title_over.png
|
|
44
|
+
- test/coverage/assets/0.7.1/fancybox/fancy_title_right.png
|
|
45
|
+
- test/coverage/assets/0.7.1/fancybox/fancybox-x.png
|
|
46
|
+
- test/coverage/assets/0.7.1/fancybox/fancybox-y.png
|
|
47
|
+
- test/coverage/assets/0.7.1/fancybox/fancybox.png
|
|
48
|
+
- test/coverage/assets/0.7.1/favicon_green.png
|
|
49
|
+
- test/coverage/assets/0.7.1/favicon_red.png
|
|
50
|
+
- test/coverage/assets/0.7.1/favicon_yellow.png
|
|
51
|
+
- test/coverage/assets/0.7.1/loading.gif
|
|
52
|
+
- test/coverage/assets/0.7.1/magnify.png
|
|
53
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
|
54
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
|
55
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
|
56
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
|
57
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
|
58
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
|
59
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
|
60
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
|
61
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png
|
|
62
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png
|
|
63
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png
|
|
64
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
|
65
|
+
- test/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
|
66
|
+
- test/coverage/index.html
|
|
67
|
+
- test/test_helper.rb
|
|
68
|
+
- test/test_hwid.rb
|
|
69
|
+
homepage: http://github.com/semdinsp/hwid
|
|
70
|
+
licenses:
|
|
71
|
+
- MIT
|
|
72
|
+
metadata: {}
|
|
73
|
+
post_install_message:
|
|
74
|
+
rdoc_options: []
|
|
75
|
+
require_paths:
|
|
76
|
+
- lib
|
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - '>='
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
|
+
requirements:
|
|
84
|
+
- - '>='
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: 1.3.4
|
|
87
|
+
requirements: []
|
|
88
|
+
rubyforge_project: hwid
|
|
89
|
+
rubygems_version: 2.2.2
|
|
90
|
+
signing_key:
|
|
91
|
+
specification_version: 4
|
|
92
|
+
summary: Hardware id for mac and rasp pi (not secure)
|
|
93
|
+
test_files: []
|