thai_id_utils 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9194c3362b9038193a979c13e0d7723bb0c6f0c3ce41ff17523086ef8a04672
4
- data.tar.gz: dac42ef970424a31999019dc4c3d8d1fa5c5739c55427440906e118d4c2cecba
3
+ metadata.gz: 6475eea4d79e998ecd38cddabe1fde552506a8be42ebe49c8bb9e53537078ee1
4
+ data.tar.gz: e8c623b974cbc84d7e7ae989db53ad4fb1a7db0cf1795be20b75204ec070a904
5
5
  SHA512:
6
- metadata.gz: c3f92740ba6ac0700b5cddb7abdc23a74cdc759a822a14936a1a36acbd43e021ad42f395889ec09d4db5cf3ed1f641599d454d1b8eb4cc17756365f26f853ab9
7
- data.tar.gz: 49bbfa319256583fd8156cea558995d2d555e17352b0391830046ff78cdb90034306c9cf5cb0d5eacf13195380d61c3196e14d7d7d27f38b266195b04c67240c
6
+ metadata.gz: 41f37e9ed4760dc95d0fba9f271e66bce6b1e05b7a0a6e00425953517b45c2c41c8f4974857faf5f6880157252bb89980ee4ecb11829ba57c67c1d14b6a5ce71
7
+ data.tar.gz: 2a685abb6f8e64bd9a45d0796390e0e9389d65b6e0fc0e1d913ccc5c8274109836175c73074de3bb8a90adc380bb25b4604e90f24fce587d9ddf600a11f9ccb3
data/README.md CHANGED
@@ -11,23 +11,24 @@ require "thai_id_utils"
11
11
 
12
12
  id = "3012304567082"
13
13
 
14
- # Validate checksum
14
+ # Validate checksum / ตรวจสอบความถูกต้องของ checksum
15
15
  if ThaiIdUtils.valid?(id)
16
16
  puts "Valid!"
17
17
  else
18
18
  puts "Invalid ID"
19
19
  end
20
20
 
21
- # 🔍 Decode components
21
+ # Decode components / ถอดรหัสส่วนประกอบ
22
22
  info = ThaiIdUtils.decode(id)
23
23
  # => { category: 1, office_code: "6099", district_code: "99", sequence: "00257" }
24
24
  puts info.inspect
25
25
 
26
- # 🏷️ Get category description
26
+ # Get category description / คำอธิบายประเภท
27
27
  desc = ThaiIdUtils.category_description(info[:category])
28
28
  # => "Thai nationals who were born after 1 January 1984 and had their birth notified within the given deadline (15 days)."
29
29
  puts desc
30
30
 
31
- # 🎲 Generate a new random valid ID
31
+ # Generate a new random valid ID / สร้างหมายเลขบัตรประชาชนใหม่แบบสุ่มที่ถูกต้อง
32
32
  new_id = ThaiIdUtils.generate
33
33
  puts new_id # => e.g. "3601205234518"
34
+ ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ThaiIdUtils
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thai_id_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chayut Orapinpatipat
@@ -41,10 +41,11 @@ files:
41
41
  - Rakefile
42
42
  - lib/thai_id_utils.rb
43
43
  - lib/thai_id_utils/version.rb
44
- homepage: https://github.com/chayuto/thai-id-utils
44
+ homepage: https://github.com/chayuto/thai_id_utils
45
45
  licenses:
46
46
  - MIT
47
- metadata: {}
47
+ metadata:
48
+ documentation_uri: https://github.com/chayuto/thai_id_utils#readme
48
49
  post_install_message:
49
50
  rdoc_options: []
50
51
  require_paths: