rqrcode 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/rqrcode/qrcode/qr_8bit_byte.rb +3 -1
- data/lib/rqrcode/qrcode/qr_util.rb +12 -12
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -27,7 +27,9 @@ module RQRCode
|
|
27
27
|
|
28
28
|
def write( buffer )
|
29
29
|
( 0...@data.size ).each do |i|
|
30
|
-
|
30
|
+
c = @data[i]
|
31
|
+
c = c.ord if c.respond_to?(:ord)#String#[] returns single-char string in 1.9, .ord gets ASCII pos
|
32
|
+
buffer.put( c, 8 )
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
@@ -137,10 +137,10 @@ module RQRCode #:nodoc:
|
|
137
137
|
|
138
138
|
# 1 - 9
|
139
139
|
case mode
|
140
|
-
when QRMODE[:mode_number]
|
141
|
-
when QRMODE[:mode_alpha_num]
|
142
|
-
when QRMODE[:mode_8bit_byte]
|
143
|
-
when QRMODE[:mode_kanji]
|
140
|
+
when QRMODE[:mode_number] then 10
|
141
|
+
when QRMODE[:mode_alpha_num] then 9
|
142
|
+
when QRMODE[:mode_8bit_byte] then 8
|
143
|
+
when QRMODE[:mode_kanji] then 8
|
144
144
|
else
|
145
145
|
raise QRCodeRunTimeError, "mode: #{mode}"
|
146
146
|
end
|
@@ -149,10 +149,10 @@ module RQRCode #:nodoc:
|
|
149
149
|
|
150
150
|
# 10 -26
|
151
151
|
case mode
|
152
|
-
when QRMODE[:mode_number]
|
153
|
-
when QRMODE[:mode_alpha_num]
|
154
|
-
when QRMODE[:mode_8bit_byte]
|
155
|
-
when QRMODE[:mode_kanji]
|
152
|
+
when QRMODE[:mode_number] then 12
|
153
|
+
when QRMODE[:mode_alpha_num] then 11
|
154
|
+
when QRMODE[:mode_8bit_byte] then 16
|
155
|
+
when QRMODE[:mode_kanji] then 10
|
156
156
|
else
|
157
157
|
raise QRCodeRunTimeError, "mode: #{mode}"
|
158
158
|
end
|
@@ -161,10 +161,10 @@ module RQRCode #:nodoc:
|
|
161
161
|
|
162
162
|
# 27 - 40
|
163
163
|
case mode
|
164
|
-
when QRMODE[:mode_number]
|
165
|
-
when QRMODE[:mode_alpha_num]
|
166
|
-
when QRMODE[:mode_8bit_byte]
|
167
|
-
when QRMODE[:mode_kanji]
|
164
|
+
when QRMODE[:mode_number] then 14
|
165
|
+
when QRMODE[:mode_alpha_num] then 13
|
166
|
+
when QRMODE[:mode_8bit_byte] then 16
|
167
|
+
when QRMODE[:mode_kanji] then 12
|
168
168
|
else
|
169
169
|
raise QRCodeRunTimeError, "mode: #{mode}"
|
170
170
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rqrcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Robertson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-03-15 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements: []
|
71
71
|
|
72
72
|
rubyforge_project: rqrcode
|
73
|
-
rubygems_version: 1.
|
73
|
+
rubygems_version: 1.3.1
|
74
74
|
signing_key:
|
75
75
|
specification_version: 2
|
76
76
|
summary: A library to encode QR Codes
|