known-languages 0.0.0 → 0.0.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: 1a8d66bcfb3bfe8537b34a12174ddeca514c79acd423f769aa5be66014df31db
4
- data.tar.gz: ece0906eeb1b61f2086094398d585b03e2128a85fecc0fb293bf0caafeb9763e
3
+ metadata.gz: 7951b4b4d1de2210f74e3cb86c1ea17796f381ac279a442869ebb40ac8b6a1e9
4
+ data.tar.gz: d7d29ed9f8e08ceb76618b5a10ac5e7bbe6fb26f1b2e6ebf4aa125023f1bba2a
5
5
  SHA512:
6
- metadata.gz: 5dd5f79134e08cb904a4ac6418c69e3b5182ae85a4b0beb184253999682eabfa0556e9457bb9f97a51ab8b69e915a10e57ac6c7b3aa6195e733b31a8b87f137a
7
- data.tar.gz: 4ab3b516154d0167045a000099ed9c11adedea246160ff1ebab87acde37d434e699e26bcef8a465a0ad0ab2b726d1c48fff59643879b9fe9d337e0aef4ab49e4
6
+ metadata.gz: ac49361b3c03c07290bcc7044dadcf0f99d716396ea5bed9f5015eccbdedd7d8b137b7f5db8f0b1a7117deb8ba89d27fa7f7d45c1cadccbf8fd7244d09e8a58d
7
+ data.tar.gz: e51e3ae76fbd748f8939ab2b4c7c940bd25988f736024c05c72f6d1c1d00adc0629fddad2d67b07888d8eea629ccaf458feaa9750382a89c6355174ff24abf0f
data/CHANGES.md CHANGED
@@ -5,4 +5,6 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## 0.0.0 - 2026-06-22
8
+ ## 0.0.2 - 2026-06-23
9
+
10
+ ## 0.0.1 - 2026-06-22
data/README.md CHANGED
@@ -5,16 +5,53 @@
5
5
  [![Package](https://img.shields.io/gem/v/known-languages)](https://rubygems.org/gems/known-languages)
6
6
  [![Documentation](https://img.shields.io/badge/rubydoc-latest-blue)](https://rubydoc.info/gems/known-languages)
7
7
 
8
- Well-known languages for Ruby.
8
+ **Well-known languages for Ruby.**
9
+
10
+ <sub>
11
+
12
+ [[Features](#-features)] |
13
+ [[Prerequisites](#%EF%B8%8F-prerequisites)] |
14
+ [[Installation](#%EF%B8%8F-installation)] |
15
+ [[Examples](#-examples)] |
16
+ [[Reference](#-reference)] |
17
+ [[Development](#%E2%80%8D-development)]
18
+
19
+ </sub>
20
+
21
+ ## ✨ Features
22
+
23
+ - Provides an enum of all well-known human languages (ISO 639-1).
24
+ - 100% pure and safe Ruby with zero dependencies and no bloat.
25
+ - Cuts red tape: 100% free and unencumbered public domain software.
26
+ - Polyglot software also available for Dart, Python, and Rust.
27
+
28
+ ## 🛠️ Prerequisites
29
+
30
+ - [Ruby] 3.2+
31
+
32
+ ## ⬇️ Installation
33
+
34
+ ### Installation from RubyGems
35
+
36
+ ```bash
37
+ gem install known-languages
38
+ bundle add known-languages
39
+ ```
9
40
 
10
41
  ## 👉 Examples
11
42
 
12
- ### Importing well-known languages
43
+ ### Importing the Library
13
44
 
14
45
  ```ruby
15
46
  require 'known/languages'
47
+
48
+ include Known::Languages
16
49
  ```
17
50
 
51
+ ## 📚 Reference
52
+
53
+ [rubydoc.info/gems/known-languages](https://rubydoc.info/gems/known-languages)
54
+
18
55
  ## 👨‍💻 Development
19
56
 
20
57
  ```bash
@@ -28,3 +65,5 @@ git clone https://github.com/it-is-known/known-languages.git
28
65
  [![Share on Hacker News](https://img.shields.io/badge/share%20on-hn-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/it-is-known/known-languages&t=Known%20Languages)
29
66
  [![Share on Facebook](https://img.shields.io/badge/share%20on-fb-1976D2?logo=facebook)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/it-is-known/known-languages)
30
67
  [![Share on LinkedIn](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/it-is-known/known-languages)
68
+
69
+ [Ruby]: https://ruby-lang.org
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.2
@@ -2,3 +2,90 @@
2
2
 
3
3
  module Known; end
4
4
  module Known::Languages; end
5
+
6
+ ##
7
+ # A language (based on ISO 639-1).
8
+ class Known::Languages::Language
9
+ ##
10
+ # The language code (ISO 639-1).
11
+ #
12
+ # @return [Symbol]
13
+ attr_reader :code
14
+
15
+ private_class_method :new
16
+
17
+ ##
18
+ # Defines a new language.
19
+ #
20
+ # @param code [#to_sym] The language code (ISO 639-1).
21
+ def initialize(code)
22
+ @code = code.to_sym
23
+ self.freeze
24
+ end
25
+
26
+ ##
27
+ # Arabic ("ar" in ISO 639-1)
28
+ #
29
+ # @return [Language]
30
+ ARABIC = new(:ar)
31
+
32
+ ##
33
+ # Bengali ("bn" in ISO 639-1)
34
+ #
35
+ # @return [Language]
36
+ BENGALI = new(:bn)
37
+
38
+ ##
39
+ # English ("en" in ISO 639-1)
40
+ #
41
+ # @return [Language]
42
+ ENGLISH = new(:en)
43
+
44
+ ##
45
+ # Esperanto ("eo" in ISO 639-1)
46
+ #
47
+ # @return [Language]
48
+ ESPERANTO = new(:eo)
49
+
50
+ ##
51
+ # Spanish ("es" in ISO 639-1)
52
+ #
53
+ # @return [Language]
54
+ SPANISH = new(:es)
55
+
56
+ ##
57
+ # French ("fr" in ISO 639-1)
58
+ #
59
+ # @return [Language]
60
+ FRENCH = new(:fr)
61
+
62
+ ##
63
+ # Hindi ("hi" in ISO 639-1)
64
+ #
65
+ # @return [Language]
66
+ HINDI = new(:hi)
67
+
68
+ ##
69
+ # Indonesian ("id" in ISO 639-1)
70
+ #
71
+ # @return [Language]
72
+ INDONESIAN = new(:id)
73
+
74
+ ##
75
+ # Portuguese ("pt" in ISO 639-1)
76
+ #
77
+ # @return [Language]
78
+ PORTUGUESE = new(:pt)
79
+
80
+ ##
81
+ # Urdu ("ur" in ISO 639-1)
82
+ #
83
+ # @return [Language]
84
+ URDU = new(:ur)
85
+
86
+ ##
87
+ # Chinese ("zh" in ISO 639-1)
88
+ #
89
+ # @return [Language]
90
+ CHINESE = new(:zh)
91
+ end # Known::Languages::Language
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: known-languages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-03-09 00:00:00.000000000 Z
10
+ date: 2026-06-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rspec