macserialrb 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/spec.yml +24 -0
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +0 -1
- data/ext/macserialrb/extconf.rb +2 -2
- data/ext/macserialrb/macserialrb.c +7 -3
- data/lib/macserialrb/version.rb +1 -1
- data/macserialrb.gemspec +3 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 956988b9ff82039e8dbaeb9da1a1ed7f069890eb8f5de8ac1effdf972752ed17
|
4
|
+
data.tar.gz: 598a8596566dca75dbb9ce1b626e02533ec6a94de92b2d9757a5a73ce1962ebe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f57ce8dbdb32761f86bed730a7095b214b090e5c090b7cf84444fd891d854772109208def885a45b820d11db5ed0f1b8250fe09fafc5067056f680dfbaa3af
|
7
|
+
data.tar.gz: 4167a5d6c8d7f1fe7471379e5628bc095c36a7b0f499320a6248afd0d79290c1cf5c30596905451a4b5bdd82d1ec60e71d9356cdc65637c3a22895866002c526
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Ruby Spec
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
fail-fast: false
|
9
|
+
matrix:
|
10
|
+
os: [ubuntu, macos]
|
11
|
+
ruby: [2.5, 2.6, 2.7]
|
12
|
+
|
13
|
+
runs-on: ${{ matrix.os }}-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
|
18
|
+
- uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: test
|
24
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Macserialrb
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/csrutil/macserialrb.svg?branch=main)](https://travis-ci.org/csrutil/macserialrb)
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/macserialrb.svg)](https://badge.fury.io/rb/macserialrb)
|
5
4
|
![](https://ruby-gem-downloads-badge.herokuapp.com/macserialrb)
|
6
5
|
|
data/ext/macserialrb/extconf.rb
CHANGED
@@ -2,9 +2,9 @@ require "mkmf"
|
|
2
2
|
|
3
3
|
case RUBY_PLATFORM
|
4
4
|
when /linux/i
|
5
|
-
$CPPFLAGS += " -std=c11 -
|
5
|
+
$CPPFLAGS += " -std=c11 -Wall"
|
6
6
|
when /darwin/i
|
7
|
-
$CPPFLAGS += " -std=c11 -
|
7
|
+
$CPPFLAGS += " -std=c11 -Wall"
|
8
8
|
end
|
9
9
|
|
10
10
|
create_makefile("macserialrb/macserialrb")
|
@@ -60,6 +60,10 @@ generate(int argc, VALUE *argv, VALUE self)
|
|
60
60
|
VALUE model = Qnil;
|
61
61
|
VALUE obj = rb_hash_new();
|
62
62
|
|
63
|
+
VALUE productName = Qnil;
|
64
|
+
VALUE SystemSerialNumber = Qnil;
|
65
|
+
VALUE MLB = Qnil;
|
66
|
+
|
63
67
|
for (int i = 0; i < argc; ++i)
|
64
68
|
{
|
65
69
|
model = rb_hash_aref(argv[i], rb_to_symbol( rb_str_new2("model") ));
|
@@ -80,9 +84,9 @@ generate(int argc, VALUE *argv, VALUE self)
|
|
80
84
|
get_mlb(&info, mlb, MLB_MAX_SIZE);
|
81
85
|
sprintf(ssn, "%s%s%s%s%s", info.country, info.year, info.week, info.line, info.model);
|
82
86
|
|
83
|
-
|
84
|
-
|
85
|
-
|
87
|
+
productName = rb_str_new2(ApplePlatformData[info.modelIndex].productName);
|
88
|
+
SystemSerialNumber = rb_str_new2(ssn);
|
89
|
+
MLB = rb_str_new2(mlb);
|
86
90
|
|
87
91
|
rb_hash_aset(obj, rb_to_symbol( rb_str_new2("productName") ), productName);
|
88
92
|
rb_hash_aset(obj, rb_to_symbol( rb_str_new2("SystemSerialNumber") ), SystemSerialNumber);
|
data/lib/macserialrb/version.rb
CHANGED
data/macserialrb.gemspec
CHANGED
@@ -8,15 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = "macserialrb is a tool that obtains and decodes Mac serial number and board identifier to provide more information about the production of your hardware. "
|
10
10
|
spec.description = "macserialrb is a tool that obtains and decodes Mac serial number and board identifier to provide more information about the production of your hardware. "
|
11
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.homepage = "https://github.com/appleserial/macserialrb"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
15
15
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
19
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/appleserial/macserialrb"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/appleserial/macserialrb/README.md"
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
22
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macserialrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- csrutil
|
@@ -20,6 +20,7 @@ extensions:
|
|
20
20
|
- ext/macserialrb/extconf.rb
|
21
21
|
extra_rdoc_files: []
|
22
22
|
files:
|
23
|
+
- ".github/workflows/spec.yml"
|
23
24
|
- ".gitignore"
|
24
25
|
- ".rspec"
|
25
26
|
- ".travis.yml"
|
@@ -46,13 +47,13 @@ files:
|
|
46
47
|
- lib/macserialrb.rb
|
47
48
|
- lib/macserialrb/version.rb
|
48
49
|
- macserialrb.gemspec
|
49
|
-
homepage: https://github.com/
|
50
|
+
homepage: https://github.com/appleserial/macserialrb
|
50
51
|
licenses:
|
51
52
|
- MIT
|
52
53
|
metadata:
|
53
|
-
homepage_uri: https://github.com/
|
54
|
-
source_code_uri: https://github.com/
|
55
|
-
changelog_uri: https://github.com/
|
54
|
+
homepage_uri: https://github.com/appleserial/macserialrb
|
55
|
+
source_code_uri: https://github.com/appleserial/macserialrb
|
56
|
+
changelog_uri: https://github.com/appleserial/macserialrb/README.md
|
56
57
|
post_install_message:
|
57
58
|
rdoc_options: []
|
58
59
|
require_paths:
|