nfc 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +6 -0
- data/README.rdoc +3 -4
- data/Rakefile +2 -0
- data/ext/nfc/nfc_device.c +3 -0
- data/lib/nfc.rb +1 -1
- data/lib/nfc/iso14443a.rb +7 -3
- data/test/test_nfc.rb +0 -4
- metadata +4 -4
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -43,11 +43,10 @@ lets you read RFID tags.
|
|
43
43
|
|
44
44
|
== INSTALL:
|
45
45
|
|
46
|
-
First install libnfc[http://libnfc.org/]
|
47
|
-
I installed libnfc like this:
|
46
|
+
First install libnfc[http://libnfc.org/].
|
47
|
+
I installed libnfc via MacPorts[http://www.macports.org/] like this:
|
48
48
|
|
49
|
-
$
|
50
|
-
$ make && make install
|
49
|
+
$ sudo port install libnfc
|
51
50
|
|
52
51
|
The install the gem:
|
53
52
|
|
data/Rakefile
CHANGED
data/ext/nfc/nfc_device.c
CHANGED
data/lib/nfc.rb
CHANGED
data/lib/nfc/iso14443a.rb
CHANGED
@@ -18,15 +18,19 @@ class NFC
|
|
18
18
|
abtAtqa.unpack 'C*'
|
19
19
|
end
|
20
20
|
|
21
|
+
###
|
22
|
+
# Get the UID as a hex string
|
23
|
+
def to_s join_string = ''
|
24
|
+
sprintf((['%02x'] * uiUidLen).join(join_string), * uid).upcase
|
25
|
+
end
|
26
|
+
|
21
27
|
###
|
22
28
|
# Inspect this tag
|
23
29
|
def inspect
|
24
|
-
uid = sprintf((['%02x'] * uiUidLen).join(' '), *self.uid)
|
25
|
-
|
26
30
|
string_ary =
|
27
31
|
[ "(NFC) ISO14443A Tag",
|
28
32
|
" ATQA (SENS_RES): #{sprintf("%02x %02x", *atqa)}",
|
29
|
-
" UID (NFCID1): #{
|
33
|
+
" UID (NFCID1): #{to_s ' '}",
|
30
34
|
" SAK (SEL_RES): #{sprintf("%02x", btSak)}"
|
31
35
|
]
|
32
36
|
if uiAtsLen > 0
|
data/test/test_nfc.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nfc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.3.
|
23
|
+
version: 2.3.3
|
24
24
|
version:
|
25
25
|
description: |-
|
26
26
|
NFC is a ruby wrapper for the Near Field Communication library. The Near
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements: []
|
81
81
|
|
82
82
|
rubyforge_project: seattlerb
|
83
|
-
rubygems_version: 1.3.
|
83
|
+
rubygems_version: 1.3.5
|
84
84
|
signing_key:
|
85
85
|
specification_version: 3
|
86
86
|
summary: NFC is a ruby wrapper for the Near Field Communication library
|