cyrillic 0.2.0 → 0.4.0

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.
@@ -0,0 +1,188 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cyrillic
4
+ module UaPassport
5
+ k = %w[А Б В Г Ґ Д Е Ж З И І К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ а б в г ґ д е ж з и і к л м н о п р с т у ф х ц ч ш щ].freeze
6
+ v = %w[A B V H G D E Zh Z Y I K L M N O P R S T U F Kh Ts Ch Sh Shch a b v h g d e zh z y i k l m n o p r s t u f kh ts ch sh shch].freeze
7
+
8
+ CHARACTER_TABLE = k.zip(v).to_h.freeze
9
+
10
+ class << self
11
+ def transliterate(str = "")
12
+ return "" if str.nil? || str.empty?
13
+
14
+ str = str.to_s.gsub('Зг', 'Zgh').gsub('зг', 'zgh')
15
+
16
+ result = +""
17
+ str.each_char.with_index do |char, index|
18
+ prev_char = index.positive? ? str[index - 1] : nil
19
+ is_word_start = prev_char.nil? || prev_char == ' '
20
+
21
+ case char
22
+ when 'Є'
23
+ result << (is_word_start ? 'Ye' : 'Ie')
24
+ when 'є'
25
+ result << (is_word_start ? 'ye' : 'ie')
26
+ when 'Ї'
27
+ result << (is_word_start ? 'Yi' : 'I')
28
+ when 'ї'
29
+ result << (is_word_start ? 'yi' : 'i')
30
+ when 'Й'
31
+ result << (is_word_start ? 'Y' : 'I')
32
+ when 'й'
33
+ result << (is_word_start ? 'y' : 'i')
34
+ when 'Ю'
35
+ result << (is_word_start ? 'Yu' : 'Iu')
36
+ when 'ю'
37
+ result << (is_word_start ? 'yu' : 'iu')
38
+ when 'Я'
39
+ result << (is_word_start ? 'Ya' : 'Ia')
40
+ when 'я'
41
+ result << (is_word_start ? 'ya' : 'ia')
42
+ when 'Ь', 'ь', "'"
43
+ # Ignored in transliteration
44
+ else
45
+ result << (CHARACTER_TABLE[char] || char)
46
+ end
47
+ end
48
+ result
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ UaPassport = Cyrillic::UaPassport unless defined?(UaPassport)
55
+
56
+ # https://pasport.org.ua/faq/transliteration
57
+ # https://zakon.rada.gov.ua/laws/show/55-2010-%D0%BF/sp:dark?dark=0#Text
58
+
59
+ # ТАБЛИЦЯ
60
+ # транслітерації українського алфавіту латиницею
61
+
62
+ # ------------------------------------------------------------------
63
+ # | Український | Латиниця | Позиція у | Приклади написання |
64
+ # | алфавіт | | слові |--------------------------|
65
+ # | | | |українською | латиницею |
66
+ # | | | | мовою | |
67
+ # |-------------+----------+------------+------------+-------------|
68
+ # | Аа | Aa | |Алушта |Alushta |
69
+ # | | | |Андрій |Andrii |
70
+ # |-------------+----------+------------+------------+-------------|
71
+ # | Бб | Bb | |Борщагівка |Borshchahivka|
72
+ # | | | |Борисенко |Borysenko |
73
+ # |-------------+----------+------------+------------+-------------|
74
+ # | Вв | Vv | |Вінниця |Vinnytsia |
75
+ # | | | |Володимир |Volodymyr |
76
+ # |-------------+----------+------------+------------+-------------|
77
+ # | Гг | Hh | |Гадяч |Hadiach |
78
+ # | | | |Богдан |Bohdan |
79
+ # | | | |Згурський |Zghurskyi |
80
+ # |-------------+----------+------------+------------+-------------|
81
+ # | Ґґ | Gg | |Ґалаґан |Galagan |
82
+ # | | | |Ґорґани |Gorgany |
83
+ # |-------------+----------+------------+------------+-------------|
84
+ # | Дд | Dd | |Донецьк |Donetsk |
85
+ # | | | |Дмитро |Dmytro |
86
+ # |-------------+----------+------------+------------+-------------|
87
+ # | Ее | Ee | |Рівне |Rivne |
88
+ # | | | |Олег |Oleh |
89
+ # | | | |Есмань |Esman |
90
+ # |-------------+----------+------------+------------+-------------|
91
+ # | Єє | Ye | на початку |Єнакієве |Yenakiieve |
92
+ # | | | слова |Гаєвич |Haievych |
93
+ # | | ie | в інших |Короп'є |Koropie |
94
+ # | | | позиціях | | |
95
+ # |-------------+----------+------------+------------+-------------|
96
+ # | Жж | Zh zh | |Житомир |Zhytomyr |
97
+ # | | | |Жанна |Zhanna |
98
+ # | | | |Жежелів |Zhezheliv |
99
+ # |-------------+----------+------------+------------+-------------|
100
+ # | Зз | Zz | |Закарпаття |Zakarpattia |
101
+ # | | | |Казимирчук |Kazymyrchuk |
102
+ # |-------------+----------+------------+------------+-------------|
103
+ # | Ии | Yy | |Медвин |Medvyn |
104
+ # | | | |Михайленко |Mykhailenko |
105
+ # |-------------+----------+------------+------------+-------------|
106
+ # | Іі | Ii | |Іванків |Ivankiv |
107
+ # | | | |Іващенко |Ivashchenko |
108
+ # |-------------+----------+------------+------------+-------------|
109
+ # | Її | Yi | на початку |Їжакевич |Yizhakevych |
110
+ # | | | слова |Кадиївка |Kadyivka |
111
+ # | | i | в інших |Мар'їне |Marine |
112
+ # | | | позиціях | | |
113
+ # |-------------+----------+------------+------------+-------------|
114
+ # | Йй | Y | на початку |Йосипівка |Yosypivka |
115
+ # | | | слова |Стрий |Stryi |
116
+ # | | i | в других |Олексій |Oleksii |
117
+ # | | | позиціях | | |
118
+ # |-------------+----------+------------+------------+-------------|
119
+ # | Кк | Kk | |Київ |Kyiv |
120
+ # | | | |Коваленко |Kovalenko |
121
+ # |-------------+----------+------------+------------+-------------|
122
+ # | Лл | Ll | |Лебедин |Lebedyn |
123
+ # | | | |Леонід |Leonid |
124
+ # |-------------+----------+------------+------------+-------------|
125
+ # | Мм | Mm | |Миколаїв |Mykolaiv |
126
+ # | | | |Маринич |Marynych |
127
+ # |-------------+----------+------------+------------+-------------|
128
+ # | Нн | Nn | |Ніжин |Nizhyn |
129
+ # | | | |Наталія |Nataliia |
130
+ # |-------------+----------+------------+------------+-------------|
131
+ # | Оо | Oo | |Одеса |Odesa |
132
+ # | | | |Онищенко |Onyshchenko |
133
+ # |-------------+----------+------------+------------+-------------|
134
+ # | Пп | Pp | |Полтава |Poltava |
135
+ # | | | |Петро |Petro |
136
+ # |-------------+----------+------------+------------+-------------|
137
+ # | Рр | Rr | |Решетилівка |Reshetylivka |
138
+ # | | | |Рибчинський |Rybchynskyi |
139
+ # |-------------+----------+------------+------------+-------------|
140
+ # | Сс | Ss | |Суми |Sumy |
141
+ # | | | |Соломія |Solomiia |
142
+ # |-------------+----------+------------+------------+-------------|
143
+ # | Тт | Tt | |Тернопіль |Ternopil |
144
+ # | | | |Троць |Trots |
145
+ # |-------------+----------+------------+------------+-------------|
146
+ # | Уу | Uu | |Ужгород |Uzhhorod |
147
+ # | | | |Уляна |Uliana |
148
+ # |-------------+----------+------------+------------+-------------|
149
+ # | Фф | Ff | |Фастів |Fastiv |
150
+ # | | | |Філіпчук |Filipchuk |
151
+ # |-------------+----------+------------+------------+-------------|
152
+ # | Хх | Kh kh | |Харків |Kharkiv |
153
+ # | | | |Христина |Khrystyna |
154
+ # |-------------+----------+------------+------------+-------------|
155
+ # | Цц | Ts ts | |Біла Церква |Bila Tserkva |
156
+ # | | | |Стеценко |Stetsenko |
157
+ # |-------------+----------+------------+------------+-------------|
158
+ # | Чч | Ch ch | |Чернівці |Chernivtsi |
159
+ # | | | |Шевченко |Shevchenko |
160
+ # |-------------+----------+------------+------------+-------------|
161
+ # | Шш | Sh sh | |Шостка |Shostka |
162
+ # | | | |Кишеньки |Kyshenky |
163
+ # |-------------+----------+------------+------------+-------------|
164
+ # | Щщ |Shch shch | |Щербухи |Shcherbukhy |
165
+ # | | | |Гоща |Hoshcha |
166
+ # | | | |Гаращенко |Harashchenko |
167
+ # |-------------+----------+------------+------------+-------------|
168
+ # | Юю | Yu | на початку |Юрій |Yurii |
169
+ # | | | слова |Корюківка |Koriukivka |
170
+ # | | iu | в інших | | |
171
+ # | | | позиціях | | |
172
+ # |-------------+----------+------------+------------+-------------|
173
+ # | Яя | Ya | на початку |Яготин |Yahotyn |
174
+ # | | | слова |Ярошенко |Yaroshenko |
175
+ # | | ia | в інших |Костянтин |Kostiantyn |
176
+ # | | | позиціях |Знам'янка |Znamianka |
177
+ # | | | |Феодосія |Feodosiia |
178
+ # ------------------------------------------------------------------
179
+ #
180
+ # _______________
181
+ # Примітка: 1. Буквосполучення "зг" відтворюється латиницею як "zgh"
182
+ # (наприклад, Згорани - Zghorany, Розгон - Rozghon) на
183
+ # відміну від "zh" - відповідника української літери
184
+ # "ж".
185
+ # 2. М'який знак і апостроф латиницею не відтворюються.
186
+ # 3. Транслітерація прізвищ та імен осіб і географічних
187
+ # назв здійснюється шляхом відтворення кожної літери
188
+ # латиницею.
@@ -1,8 +1,14 @@
1
- module Ukrainian
1
+ # frozen_string_literal: true
2
2
 
3
- k = %w(А Б В Г Ґ Д Е Є Ж З И І Ї Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ь Ю Я а б в г ґ д е є ж з и і ї й к л м н о п р с т у ф х ц ч ш щ ь ю я)
4
- v = %w(A B V H G D E Ye Zh Z Y I Yi I K L M N O P R S T U F Kh Ts Ch Sh Shch ʹ Iu Ia a b v h g d e ye zh z y i yi i k l m n o p r s t u f kh ts ch sh shch ʹ iu ia)
5
-
6
- CHARACTER_TABLE = Hash[k.zip(v)]
3
+ module Cyrillic
4
+ # Ukrainian national transliteration system.
5
+ module Ukrainian
6
+ k = %w[А Б В Г Ґ Д Е Є Ж З И І Ї Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ь Ю Я а б в г ґ д е є ж з и і ї й к л м н о п р с т у ф х ц ч ш щ ь ю я].freeze
7
+ v = %w[A B V H G D E Ye Zh Z Y I Yi I K L M N O P R S T U F Kh Ts Ch Sh Shch ʹ Iu Ia a b v h g d e ye zh z y i yi i k l m n o p r s t u f kh ts ch sh shch ʹ iu ia].freeze
7
8
 
9
+ CHARACTER_TABLE = k.zip(v).to_h.freeze
10
+ REGEXP = Regexp.union(CHARACTER_TABLE.keys).freeze
11
+ end
8
12
  end
13
+
14
+ Ukrainian = Cyrillic::Ukrainian unless defined?(Ukrainian)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Cyrillic
2
- VERSION = "0.2.0"
4
+ VERSION = "0.4.0"
3
5
  end
data/lib/cyrillic.rb CHANGED
@@ -1,22 +1,133 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "cyrillic/version"
2
4
  require "cyrillic/iso9"
3
5
  require "cyrillic/mongolian"
4
6
  require "cyrillic/ukrainian"
7
+ require "cyrillic/ua_passport"
8
+ require "cyrillic/de"
9
+ require "cyrillic/serbian"
10
+ require "cyrillic/gost779b"
11
+ require "cyrillic/bgn_pcgn"
12
+ require "cyrillic/bulgarian"
13
+ require "cyrillic/belarusian"
5
14
 
6
15
  module Cyrillic
16
+ k = %w[
17
+ А Б В Г Д Е Ё Ж З И І Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Ѣ Э Ю Я Ѳ Ѵ
18
+ а б в г д е ё ж з и і й к л м н о п р с т у ф х ц ч ш щ ъ ы ь ѣ э ю я ѳ ѵ
19
+ ].freeze
20
+ v = %w[
21
+ A B V G D E Ë ZH Z I Ī Ĭ K L M N O P R S T U F KH TS CH SH SHCH ʺ Y ʹ IE Ė IU IA Ḟ Ẏ
22
+ a b v g d e ë zh z i ī ĭ k l m n o p r s t u f kh ts ch sh shch ʺ y ʹ ie ė iu ia ḟ ẏ
23
+ ].freeze
24
+
25
+ CHARACTER_TABLE = k.zip(v).to_h.freeze
26
+ REGEXP = Regexp.union(CHARACTER_TABLE.keys).freeze
27
+
28
+ SCHEMES = {
29
+ cyrillic: [CHARACTER_TABLE, REGEXP].freeze,
30
+ default: [CHARACTER_TABLE, REGEXP].freeze,
31
+ iso9: [Iso9::CHARACTER_TABLE, Iso9::REGEXP].freeze,
32
+ mongolian: [Mongolian::CHARACTER_TABLE, Mongolian::REGEXP].freeze,
33
+ ukrainian: [Ukrainian::CHARACTER_TABLE, Ukrainian::REGEXP].freeze,
34
+ ua_passport: :ua_passport,
35
+ de: [De::CHARACTER_TABLE, De::REGEXP].freeze,
36
+ serbian: [Serbian::CHARACTER_TABLE, Serbian::REGEXP].freeze,
37
+ gost779b: [Gost779b::CHARACTER_TABLE, Gost779b::REGEXP].freeze,
38
+ bgn_pcgn: [BgnPcgn::CHARACTER_TABLE, BgnPcgn::REGEXP].freeze,
39
+ bulgarian: [Bulgarian::CHARACTER_TABLE, Bulgarian::REGEXP].freeze,
40
+ belarusian: [Belarusian::CHARACTER_TABLE, Belarusian::REGEXP].freeze
41
+ }.freeze
7
42
 
8
- k = %w(А Б В Г Д Е Ё Ж З И І Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Ѣ Э Ю Я Ѳ Ѵ а б в г д е ё ж з и і й к л м н о п р с т у ф х ц ч ш щ ъ ы ь ѣ э ю я ѳ ѵ)
9
- v = %w(A B V G D E Ë ZH Z I Ī Ĭ K L M N O P R S T U F KH TS CH SH SHCH ʺ Y ʹ IE Ė IU IA Ḟ Ẏ a b v g d e ë zh z i ī ĭ k l m n o p r s t u f kh ts ch sh shch ʺ y ʹ ie ė iu ia ḟ ẏ)
43
+ def self.build_reverse_mapping(table, extra = {})
44
+ rev = table.reject { |_cyr, lat| lat.nil? || lat.empty? }.to_h { |cyr, lat| [lat, cyr] }
45
+ rev.merge!(extra)
46
+ sorted_keys = rev.keys.sort_by { |key| -key.length }
47
+ [rev.freeze, Regexp.union(sorted_keys).freeze].freeze
48
+ end
10
49
 
11
- CHARACTER_TABLE = Hash[k.zip(v)]
50
+ REVERSE_SCHEMES = {
51
+ iso9: build_reverse_mapping(Iso9::CHARACTER_TABLE),
52
+ serbian: build_reverse_mapping(
53
+ Serbian::CHARACTER_TABLE,
54
+ { "LJ" => "Љ", "NJ" => "Њ", "DŽ" => "Џ", "DZ" => "Џ", "dz" => "џ" }
55
+ ),
56
+ gost779b: build_reverse_mapping(Gost779b::CHARACTER_TABLE),
57
+ bgn_pcgn: build_reverse_mapping(BgnPcgn::CHARACTER_TABLE),
58
+ bulgarian: build_reverse_mapping(Bulgarian::CHARACTER_TABLE),
59
+ belarusian: build_reverse_mapping(Belarusian::CHARACTER_TABLE),
60
+ mongolian: build_reverse_mapping(Mongolian::CHARACTER_TABLE),
61
+ ukrainian: build_reverse_mapping(Ukrainian::CHARACTER_TABLE),
62
+ de: build_reverse_mapping(De::CHARACTER_TABLE),
63
+ cyrillic: build_reverse_mapping(CHARACTER_TABLE),
64
+ default: build_reverse_mapping(CHARACTER_TABLE)
65
+ }.freeze
12
66
 
13
67
  class << self
68
+ # Transliterates Cyrillic text into Roman (Latin) script.
69
+ #
70
+ # @param string [String, #to_s] The text to transliterate.
71
+ # @param to [Symbol, String] The transliteration scheme (:cyrillic, :iso9, :mongolian,
72
+ # :ukrainian, :ua_passport, :de, :serbian, :gost779b, :bgn_pcgn, :bulgarian, :belarusian).
73
+ # @return [String] The transliterated Latin script string.
74
+ # @raise [ArgumentError] If the given transliteration scheme is unknown.
75
+ #
76
+ # @example Default Cyrillic transliteration
77
+ # Cyrillic.transliterate("Кириллица") #=> "Kirillitsa"
78
+ #
79
+ # @example Short alias .t with ISO 9 scheme
80
+ # Cyrillic.t("Кириллица", :iso9) #=> "Kirillica"
81
+ #
82
+ # @example Serbian Cyrillic to Latin (Vukovica to Gajica)
83
+ # Cyrillic.t("Љубљана", :serbian) #=> "Ljubljana"
14
84
  def transliterate(string = "", to = :cyrillic)
15
- character_table = Module.const_get(to.to_s.capitalize)::CHARACTER_TABLE
16
- string.to_s.gsub(/#{Regexp.union(character_table.keys).source}/i, character_table)
85
+ return "" if string.nil? || string.empty?
86
+
87
+ scheme_key = to.to_s.downcase.to_sym
88
+ scheme = SCHEMES[scheme_key]
89
+ unless scheme
90
+ available = (SCHEMES.keys - [:default]).map(&:inspect).join(", ")
91
+ raise ArgumentError, "Unknown transliteration scheme: #{to.inspect}. Available schemes: #{available}"
92
+ end
93
+
94
+ return UaPassport.transliterate(string) if scheme_key == :ua_passport
17
95
 
96
+ table, regexp = scheme
97
+ string.to_s.gsub(regexp, table)
18
98
  end
19
- alias_method :t, :transliterate
20
- end
99
+ alias t transliterate
100
+
101
+ # Detransliterates (reverses) Latin script text back into Cyrillic script.
102
+ #
103
+ # @param string [String, #to_s] The Latin script text to detransliterate.
104
+ # @param from [Symbol, String] The scheme to reverse (:iso9, :serbian, :gost779b, etc.).
105
+ # @return [String] The Cyrillic script string.
106
+ # @raise [ArgumentError] If the given scheme is unknown.
107
+ #
108
+ # @example Reverse ISO 9:1995 transliteration
109
+ # Cyrillic.detransliterate("Transliteraciâ", from: :iso9) #=> "Транслитерация"
110
+ #
111
+ # @example Reverse Serbian transliteration (Gajica to Vukovica)
112
+ # Cyrillic.det("Ljubljana", from: :serbian) #=> "Љубљана"
113
+ #
114
+ # @example Reverse GOST 7.79 System B
115
+ # Cyrillic.det("Shhuka", from: :gost779b) #=> "Щука"
116
+ def detransliterate(string = "", scheme = nil, from: nil)
117
+ return "" if string.nil? || string.empty?
118
+
119
+ chosen = from || scheme || :iso9
120
+ scheme_key = chosen.to_s.downcase.to_sym
121
+ scheme_data = REVERSE_SCHEMES[scheme_key]
122
+ unless scheme_data
123
+ available = (REVERSE_SCHEMES.keys - [:default]).map(&:inspect).join(", ")
124
+ raise ArgumentError, "Unknown detransliteration scheme: #{chosen.inspect}. Available schemes: #{available}"
125
+ end
21
126
 
127
+ table, regexp = scheme_data
128
+ string.to_s.gsub(regexp, table)
129
+ end
130
+ alias det detransliterate
131
+ alias reverse_transliterate detransliterate
132
+ end
22
133
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyrillic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rovetz
@@ -10,68 +10,169 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: rake
13
+ name: benchmark
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '13.0'
18
+ version: '0'
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '13.0'
25
+ version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: benchmark-ips
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: irb
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
26
54
  - !ruby/object:Gem::Dependency
27
55
  name: minitest
28
56
  requirement: !ruby/object:Gem::Requirement
29
57
  requirements:
30
- - - "~>"
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '5.25'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '5.25'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rake
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '13.2'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '13.2'
82
+ - !ruby/object:Gem::Dependency
83
+ name: rdoc
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
31
87
  - !ruby/object:Gem::Version
32
- version: '5.0'
88
+ version: '0'
33
89
  type: :development
34
90
  prerelease: false
35
91
  version_requirements: !ruby/object:Gem::Requirement
36
92
  requirements:
37
- - - "~>"
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
38
101
  - !ruby/object:Gem::Version
39
- version: '5.0'
40
- description: Romanization (transliteration) of Cyrillic. Converts Cyrillic text to
41
- the Roman (Latin) script
102
+ version: '1.64'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '1.64'
110
+ - !ruby/object:Gem::Dependency
111
+ name: simplecov
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0.22'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0.22'
124
+ - !ruby/object:Gem::Dependency
125
+ name: yard
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: 0.9.36
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: 0.9.36
138
+ description: Converts Cyrillic text to the Roman (Latin) script
42
139
  email:
43
140
  - zakbox@gmail.com
44
- executables: []
141
+ executables:
142
+ - cyrillic
45
143
  extensions: []
46
144
  extra_rdoc_files: []
47
145
  files:
48
- - ".gitignore"
49
- - ".travis.yml"
146
+ - ".rubocop.yml"
147
+ - CHANGELOG.md
50
148
  - CODE_OF_CONDUCT.md
51
- - Gemfile
52
- - Gemfile.lock
53
149
  - LICENSE.txt
54
150
  - README.md
55
151
  - Rakefile
56
- - bin/console
57
- - bin/setup
152
+ - benchmark/run.rb
58
153
  - cyrillic.gemspec
154
+ - exe/cyrillic
59
155
  - lib/cyrillic.rb
60
- - lib/cyrillic/ala_lc.rb
156
+ - lib/cyrillic/belarusian.rb
61
157
  - lib/cyrillic/bgn_pcgn.rb
62
- - lib/cyrillic/british_standard.rb
63
- - lib/cyrillic/duden.rb
158
+ - lib/cyrillic/bulgarian.rb
159
+ - lib/cyrillic/de.rb
64
160
  - lib/cyrillic/gost779b.rb
65
161
  - lib/cyrillic/iso9.rb
66
162
  - lib/cyrillic/mongolian.rb
67
- - lib/cyrillic/scientific.rb
68
- - lib/cyrillic/sprognaevn.rb
163
+ - lib/cyrillic/serbian.rb
164
+ - lib/cyrillic/ua_passport.rb
69
165
  - lib/cyrillic/ukrainian.rb
70
166
  - lib/cyrillic/version.rb
71
167
  homepage: https://github.com/rovetz/cyrillic
72
168
  licenses:
73
169
  - MIT
74
- metadata: {}
170
+ metadata:
171
+ source_code_uri: https://github.com/rovetz/cyrillic
172
+ changelog_uri: https://github.com/rovetz/cyrillic/blob/main/CHANGELOG.md
173
+ bug_tracker_uri: https://github.com/rovetz/cyrillic/issues
174
+ documentation_uri: https://rovetz.github.io/cyrillic/
175
+ rubygems_mfa_required: 'true'
75
176
  rdoc_options: []
76
177
  require_paths:
77
178
  - lib
@@ -79,14 +180,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
180
  requirements:
80
181
  - - ">="
81
182
  - !ruby/object:Gem::Version
82
- version: '0'
183
+ version: 3.3.0
83
184
  required_rubygems_version: !ruby/object:Gem::Requirement
84
185
  requirements:
85
186
  - - ">="
86
187
  - !ruby/object:Gem::Version
87
188
  version: '0'
88
189
  requirements: []
89
- rubygems_version: 3.7.2
190
+ rubygems_version: 4.0.20
90
191
  specification_version: 4
91
192
  summary: Romanization (transliteration) of Cyrillic
92
193
  test_files: []
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.0
5
- before_install: gem install bundler -v 1.16.1
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in cyrillic.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,22 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- cyrillic (0.2.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- minitest (5.26.1)
10
- rake (13.3.1)
11
-
12
- PLATFORMS
13
- arm64-darwin-24
14
- ruby
15
-
16
- DEPENDENCIES
17
- cyrillic!
18
- minitest (~> 5.0)
19
- rake (~> 13.0)
20
-
21
- BUNDLED WITH
22
- 2.7.2
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "cyrillic"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
File without changes
File without changes
File without changes
File without changes
File without changes