to_russian_words 1.1.3 → 1.1.5
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 +5 -5
- data/.rubocop.yml +17 -8
- data/.tool-versions +1 -0
- data/Gemfile +1 -1
- data/lib/to_russian_words/divisions.rb +15 -14
- data/lib/to_russian_words/russian_gender_labels.rb +59 -6
- data/lib/to_russian_words/utils.rb +76 -25
- data/lib/to_russian_words/version.rb +1 -1
- data/lib/to_russian_words.rb +11 -9
- data/spec/spec_helper.rb +3 -1
- data/spec/to_russiam_words_spec.rb +56 -2
- data/spec/to_russian_words/division_spec.rb +6 -1
- data/to_russian_words.gemspec +1 -1
- metadata +8 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2fa00e231f37cc6a9c17b4992c265f20989aed5bca7e308fb015bfabc8c97c44
|
4
|
+
data.tar.gz: f700e3f291646f2829c0b23de72469adfa7e0c2257563b2dbee07b76e6d42c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95bc1539e7e55acf0566d85a88f43d8c68b90c3ba0f8c3c3fd1fccdcb101ad15708fd968e25e20a3569e6aa8b02cddf2ef48608b7d01fca936d957453dec2634
|
7
|
+
data.tar.gz: cd595886dd1c316a73153b1fa790d18a25e27e3a2081698a5e824279348fafc10f409139dfd3238aa93be14776ea32c855a7ae069b2d22bebb3d65c852c182b9
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 2.3
|
3
3
|
UseCache: false
|
4
|
-
Style/BracesAroundHashParameters:
|
5
|
-
EnforcedStyle: context_dependent
|
6
4
|
Style/CollectionMethods:
|
7
5
|
Description: Preferred collection methods.
|
8
6
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
@@ -21,7 +19,7 @@ Style/DotPosition:
|
|
21
19
|
SupportedStyles:
|
22
20
|
- leading
|
23
21
|
- trailing
|
24
|
-
|
22
|
+
Naming/FileName:
|
25
23
|
Description: Use snake_case for source file names.
|
26
24
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
27
25
|
Enabled: false
|
@@ -35,7 +33,8 @@ Style/IfUnlessModifier:
|
|
35
33
|
Description: Favor modifier if/unless usage when you have a single-line body.
|
36
34
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
37
35
|
Enabled: false
|
38
|
-
|
36
|
+
Layout/LineLength:
|
37
|
+
Max: 120
|
39
38
|
Style/OptionHash:
|
40
39
|
Description: Don't use option hashes when you can use keyword arguments.
|
41
40
|
Enabled: false
|
@@ -61,8 +60,10 @@ Style/PredicateName:
|
|
61
60
|
- is_
|
62
61
|
- has_
|
63
62
|
- have_
|
63
|
+
- does_
|
64
64
|
NamePrefixBlacklist:
|
65
65
|
- is_
|
66
|
+
- does_
|
66
67
|
Exclude:
|
67
68
|
- spec/**/*
|
68
69
|
Style/RaiseArgs:
|
@@ -114,7 +115,15 @@ Style/StringLiteralsInInterpolation:
|
|
114
115
|
SupportedStyles:
|
115
116
|
- single_quotes
|
116
117
|
- double_quotes
|
117
|
-
Style/
|
118
|
+
Style/TrailingCommaInArrayLiteral:
|
119
|
+
Description: Checks for trailing comma in parameter lists and literals.
|
120
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
121
|
+
Enabled: false
|
122
|
+
EnforcedStyleForMultiline: no_comma
|
123
|
+
SupportedStyles:
|
124
|
+
- comma
|
125
|
+
- no_comma
|
126
|
+
Style/TrailingCommaInHashLiteral:
|
118
127
|
Description: Checks for trailing comma in parameter lists and literals.
|
119
128
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
120
129
|
Enabled: false
|
@@ -167,7 +176,7 @@ Lint/AssignmentInCondition:
|
|
167
176
|
Style/InlineComment:
|
168
177
|
Description: Avoid inline comments.
|
169
178
|
Enabled: false
|
170
|
-
|
179
|
+
Naming/AccessorMethodName:
|
171
180
|
Description: Check the naming of accessor methods for get_/set_.
|
172
181
|
Enabled: false
|
173
182
|
Style/Alias:
|
@@ -221,11 +230,11 @@ Style/WhenThen:
|
|
221
230
|
Lint/EachWithObjectArgument:
|
222
231
|
Description: Check for immutable argument given to each_with_object.
|
223
232
|
Enabled: true
|
224
|
-
Lint/
|
233
|
+
Lint/SuppressedException:
|
225
234
|
Description: Don't suppress exception.
|
226
235
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
227
236
|
Enabled: false
|
228
|
-
Lint/
|
237
|
+
Lint/LiteralAsCondition:
|
229
238
|
Description: Checks of literals used in conditions.
|
230
239
|
Enabled: false
|
231
240
|
Lint/LiteralInInterpolation:
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.2
|
data/Gemfile
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module ToRussianWords
|
3
4
|
module Divisions
|
4
5
|
NOMINATIVE_DIVISIONS = [
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
["", "", ""].freeze,
|
7
|
+
%w(тысяча тысячи тысяч).freeze,
|
8
|
+
%w(миллион миллиона миллионов).freeze,
|
9
|
+
%w(миллиард миллиарда миллиардов).freeze,
|
10
|
+
%w(триллион триллиона триллионов).freeze,
|
11
|
+
%w(квадрильон квадрильона квадрильонов).freeze,
|
12
|
+
%w(нониллион нониллиона нониллионов).freeze
|
12
13
|
].freeze
|
13
14
|
|
14
15
|
DATIVE_DIVISIONS = [
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
["", "", ""].freeze,
|
17
|
+
%w(тысячи тысяч тысяч).freeze,
|
18
|
+
%w(миллиона миллионов миллионов).freeze,
|
19
|
+
%w(миллиарда миллиардов миллиардов).freeze,
|
20
|
+
%w(триллиона триллионов триллионов).freeze,
|
21
|
+
%w(квадрильона квадрильонов квадрильонов).freeze,
|
22
|
+
%w(нониллиона нониллионов нониллионов).freeze
|
22
23
|
].freeze
|
23
24
|
end
|
24
25
|
end
|
@@ -1,12 +1,65 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module ToRussianWords
|
3
4
|
module RussianGenderLabels
|
4
|
-
NOMINATIVE_RUSSIAN_FEMALE_LABEL =
|
5
|
-
|
6
|
-
|
5
|
+
NOMINATIVE_RUSSIAN_FEMALE_LABEL = {
|
6
|
+
1 => "одна",
|
7
|
+
2 => "две",
|
8
|
+
|
9
|
+
21 => "двадцать одна",
|
10
|
+
22 => "двадцать две",
|
11
|
+
|
12
|
+
31 => "тридцать одна",
|
13
|
+
32 => "тридцать две",
|
14
|
+
|
15
|
+
41 => "сорок одна",
|
16
|
+
42 => "сорок две",
|
17
|
+
|
18
|
+
51 => "пятьдесят одна",
|
19
|
+
52 => "пятьдесят две",
|
20
|
+
|
21
|
+
61 => "шестьдесят одна",
|
22
|
+
62 => "шестьдесят две",
|
23
|
+
|
24
|
+
71 => "семьдесят одна",
|
25
|
+
72 => "семьдесят две",
|
26
|
+
|
27
|
+
81 => "восемьдесят одна",
|
28
|
+
82 => "восемьдесят две",
|
29
|
+
|
30
|
+
91 => "девяносто одна",
|
31
|
+
92 => "девяносто две",
|
32
|
+
|
33
|
+
}.freeze
|
34
|
+
|
35
|
+
DATIVE_RUSSIAN_FEMALE_LABEL = {
|
36
|
+
0 => "",
|
37
|
+
1 => "одной",
|
38
|
+
2 => "двух",
|
39
|
+
|
40
|
+
21 => "двадцати одной",
|
41
|
+
22 => "двадцати двух",
|
42
|
+
|
43
|
+
31 => "тридцати одной",
|
44
|
+
32 => "тридцати двух",
|
45
|
+
|
46
|
+
41 => "сорока одной",
|
47
|
+
42 => "сорока двух",
|
48
|
+
|
49
|
+
51 => "пятидесяти одной",
|
50
|
+
52 => "пятидесяти двух",
|
51
|
+
|
52
|
+
61 => "шестидесяти одной",
|
53
|
+
62 => "шестидесяти двух",
|
54
|
+
|
55
|
+
71 => "семидесяти одной",
|
56
|
+
72 => "семидесяти двух",
|
57
|
+
|
58
|
+
81 => "восьмидесяти одной",
|
59
|
+
82 => "восьмидесяти двух",
|
7
60
|
|
8
|
-
|
9
|
-
|
10
|
-
|
61
|
+
91 => "девяноста одной",
|
62
|
+
92 => "девяноста двух",
|
63
|
+
}.freeze
|
11
64
|
end
|
12
65
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "./
|
4
|
-
require_relative "./
|
2
|
+
|
3
|
+
require_relative "./under_hundred"
|
4
|
+
require_relative "./divisions"
|
5
|
+
require_relative "./russian_gender_labels"
|
5
6
|
module ToRussianWords
|
6
7
|
module Utils
|
7
8
|
include UnderHundred
|
@@ -10,41 +11,74 @@ module ToRussianWords
|
|
10
11
|
|
11
12
|
def result_below_one_thousand(num, counter, russian_case)
|
12
13
|
hundred, remaining = num.divmod(100)
|
13
|
-
|
14
14
|
return higher_than_hundred(hundred, remaining, counter, russian_case) if hundred != 0
|
15
|
-
|
15
|
+
|
16
|
+
if hundred == 0 && remaining != 0
|
17
|
+
get_label(russian_case: russian_case, hundred: counter == 1 ? num : nil, counter: counter,
|
18
|
+
remaining: remaining)
|
19
|
+
end
|
16
20
|
end
|
17
21
|
|
18
22
|
def higher_than_hundred(hundred, remaining, counter, russian_case)
|
19
|
-
century = (hundred == 1 ?
|
23
|
+
century = (hundred == 1 ? "" : get_label(russian_case: russian_case, hundred: hundred, remaining: hundred))
|
20
24
|
if remaining != 0
|
21
|
-
return century + "#{hundred_name(hundred,
|
25
|
+
return century + "#{hundred_name(hundred,
|
26
|
+
russian_case)} " + get_label(russian_case: russian_case, counter: counter,
|
27
|
+
remaining: remaining)
|
22
28
|
end
|
23
|
-
|
29
|
+
century + "#{hundred_name(hundred, russian_case)} " if remaining == 0
|
24
30
|
end
|
25
31
|
|
26
32
|
def check_sign(num)
|
27
|
-
num < 0 ? [num.abs,
|
33
|
+
num < 0 ? [num.abs, "negative "] : [num, ""]
|
28
34
|
end
|
29
35
|
|
30
36
|
def numerical?(num)
|
31
37
|
Integer(num)
|
32
|
-
rescue
|
33
|
-
raise
|
38
|
+
rescue StandardError
|
39
|
+
raise "A whole number is expected"
|
34
40
|
end
|
35
41
|
|
36
|
-
def under_hundred(russian_case, hundred = 0)
|
42
|
+
def under_hundred(russian_case, hundred = 0, counter = 0)
|
37
43
|
case russian_case
|
38
|
-
when
|
39
|
-
[1, 2].include?(hundred)
|
44
|
+
when "dative"
|
45
|
+
if [1, 2].include?(hundred)
|
46
|
+
[DATIVE_RUSSIAN_FEMALE_LABEL, DATIVE_UNDER_HUNDRED]
|
47
|
+
else
|
48
|
+
(
|
49
|
+
if counter == 1
|
50
|
+
[DATIVE_RUSSIAN_FEMALE_LABEL, DATIVE_UNDER_HUNDRED]
|
51
|
+
else
|
52
|
+
[DATIVE_UNDER_HUNDRED, DATIVE_UNDER_HUNDRED]
|
53
|
+
end
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
40
57
|
else
|
41
|
-
[1, 2].include?(hundred)
|
58
|
+
if [1, 2].include?(hundred)
|
59
|
+
[NOMINATIVE_RUSSIAN_FEMALE_LABEL, NOMINATIVE_UNDER_HUNDRED]
|
60
|
+
else
|
61
|
+
(
|
62
|
+
if counter == 1
|
63
|
+
[NOMINATIVE_RUSSIAN_FEMALE_LABEL, NOMINATIVE_UNDER_HUNDRED]
|
64
|
+
else
|
65
|
+
[NOMINATIVE_UNDER_HUNDRED, NOMINATIVE_UNDER_HUNDRED]
|
66
|
+
end
|
67
|
+
)
|
68
|
+
end
|
42
69
|
end
|
43
70
|
end
|
44
71
|
|
72
|
+
def get_label(russian_case:, remaining:, hundred: 0, counter: 0)
|
73
|
+
female, male = under_hundred(russian_case, hundred, counter)
|
74
|
+
res = female[remaining]
|
75
|
+
res = male[remaining] if res.nil?
|
76
|
+
res
|
77
|
+
end
|
78
|
+
|
45
79
|
def divisions(russian_case)
|
46
80
|
case russian_case
|
47
|
-
when
|
81
|
+
when "dative"
|
48
82
|
DATIVE_DIVISIONS
|
49
83
|
else
|
50
84
|
NOMINATIVE_DIVISIONS
|
@@ -53,23 +87,40 @@ module ToRussianWords
|
|
53
87
|
|
54
88
|
def hundred_name(hundred, russian_case)
|
55
89
|
case russian_case
|
56
|
-
when
|
90
|
+
when "dative"
|
57
91
|
if hundred == 1
|
58
|
-
|
92
|
+
"ста"
|
59
93
|
else
|
60
|
-
|
94
|
+
"сот"
|
61
95
|
end
|
62
96
|
else
|
63
|
-
if [1
|
64
|
-
|
97
|
+
if [1].include? hundred
|
98
|
+
"сто"
|
65
99
|
elsif hundred == 2
|
66
|
-
|
67
|
-
elsif hundred
|
68
|
-
|
100
|
+
"сти"
|
101
|
+
elsif [3, 4].include?(hundred)
|
102
|
+
"ста"
|
69
103
|
else
|
70
|
-
|
104
|
+
"сот"
|
71
105
|
end
|
72
106
|
end
|
73
107
|
end
|
108
|
+
|
109
|
+
def get_division(russian_case, counter, remaining)
|
110
|
+
# binding.pry
|
111
|
+
variants = divisions(russian_case)[counter]
|
112
|
+
pluralize(remaining, *variants)
|
113
|
+
end
|
114
|
+
|
115
|
+
def pluralize(number, singular, few, plural)
|
116
|
+
number = number.abs
|
117
|
+
return plural if (11..14).include?(number % 100)
|
118
|
+
|
119
|
+
case number % 10
|
120
|
+
when 1 then singular
|
121
|
+
when 2..4 then few
|
122
|
+
else plural
|
123
|
+
end
|
124
|
+
end
|
74
125
|
end
|
75
126
|
end
|
data/lib/to_russian_words.rb
CHANGED
@@ -1,31 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module ToRussianWords
|
3
|
-
require
|
4
|
-
require_relative
|
5
|
-
require_relative
|
6
|
-
require_relative
|
4
|
+
require "to_russian_words/version"
|
5
|
+
require_relative "./to_russian_words/under_hundred"
|
6
|
+
require_relative "./to_russian_words/divisions"
|
7
|
+
require_relative "./to_russian_words/utils"
|
7
8
|
|
8
9
|
include ToRussianWords::UnderHundred
|
9
10
|
include ToRussianWords::Divisions
|
10
11
|
include ToRussianWords::Utils
|
11
12
|
|
12
|
-
def to_words(russian_case =
|
13
|
+
def to_words(russian_case = "nominative")
|
13
14
|
to_russian_words(russian_case)
|
14
15
|
end
|
15
16
|
|
16
|
-
def to_russian_words(russian_case =
|
17
|
+
def to_russian_words(russian_case = "nominative")
|
17
18
|
num = numerical?(self)
|
18
19
|
num, sign = check_sign(num)
|
19
|
-
return (sign +
|
20
|
+
return (sign + get_label(russian_case: russian_case, remaining: num)) if num <= 100
|
21
|
+
|
20
22
|
counter = 0
|
21
23
|
result = []
|
22
24
|
while num != 0
|
23
25
|
num, remaining = num.divmod(1000)
|
24
26
|
temp_result = result_below_one_thousand(remaining, counter, russian_case)
|
25
|
-
result << temp_result +
|
27
|
+
result << temp_result + " " + get_division(russian_case, counter, remaining) if temp_result
|
26
28
|
counter += 1
|
27
29
|
end
|
28
|
-
sign + result.reverse.join(
|
30
|
+
sign + result.reverse.join(" ").rstrip
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "coveralls"
|
3
4
|
Coveralls.wear!
|
4
|
-
$LOAD_PATH.unshift File.expand_path("
|
5
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
5
6
|
require "to_russian_words"
|
6
7
|
require "pry"
|
8
|
+
|
7
9
|
RSpec.configure do |config|
|
8
10
|
config.expect_with :rspec do |expectations|
|
9
11
|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require_relative "spec_helper"
|
3
4
|
RSpec.describe "to_russian_word" do
|
4
5
|
context "#to_word" do
|
5
|
-
it "converts 1 to
|
6
|
+
it "converts 1 to `один`" do
|
6
7
|
expect(1.to_russian_words).to eq("один")
|
7
8
|
end
|
8
9
|
|
9
|
-
it "converts '1' to
|
10
|
+
it "converts '1' to `один`" do
|
10
11
|
expect("1".to_russian_words).to eq("один")
|
11
12
|
end
|
12
13
|
|
@@ -22,5 +23,58 @@ RSpec.describe "to_russian_word" do
|
|
22
23
|
# Fixnum before Ruby 2.4, Integer from Ruby 2.4
|
23
24
|
expect(1.methods).to include :to_russian_words
|
24
25
|
end
|
26
|
+
|
27
|
+
it "converts 123 to `сто двадцать три`" do
|
28
|
+
expect(123.to_russian_words).to eq("сто двадцать три")
|
29
|
+
end
|
30
|
+
|
31
|
+
it "converts 1234 to `одна тысяча двести тридцать четыре`" do
|
32
|
+
expect(1234.to_russian_words).to eq("одна тысяча двести тридцать четыре")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "converts 12345 to `двенадцать тысяч триста сорок пять`" do
|
36
|
+
expect(12_345.to_russian_words).to eq("двенадцать тысяч триста сорок пять")
|
37
|
+
end
|
38
|
+
|
39
|
+
it "converts 122456 to `сто двадцать две тысячи четыреста пятьдесят шесть`" do
|
40
|
+
expect(122_456.to_russian_words).to eq("сто двадцать две тысячи четыреста пятьдесят шесть")
|
41
|
+
end
|
42
|
+
it "converts 41234 to `сорок одна тысяча двести тридцать четыре`" do
|
43
|
+
expect(41_234.to_russian_words).to eq("сорок одна тысяча двести тридцать четыре")
|
44
|
+
end
|
45
|
+
|
46
|
+
it "converts 42234 to `сорок две тысячи двести тридцать четыре`" do
|
47
|
+
expect(42_234.to_russian_words).to eq("сорок две тысячи двести тридцать четыре")
|
48
|
+
end
|
49
|
+
|
50
|
+
it "converts 21021021 to `двадцать один миллион двадцать одна тысяча двадцать один`" do
|
51
|
+
expect(21_021_021.to_russian_words).to eq("двадцать один миллион двадцать одна тысяча двадцать один")
|
52
|
+
end
|
53
|
+
|
54
|
+
it "converts 2021021 to `два миллиона двадцать одна тысяча двадцать один`" do
|
55
|
+
expect(2_021_021.to_russian_words).to eq("два миллиона двадцать одна тысяча двадцать один")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context "#to_words('dative')" do
|
60
|
+
it "converts 20 to 'двадцати'" do
|
61
|
+
expect(20.to_russian_words("dative")).to eq("двадцати")
|
62
|
+
end
|
63
|
+
it "converts 21 to 'двадцати одного'" do
|
64
|
+
expect(21.to_russian_words("dative")).to eq("двадцати одного")
|
65
|
+
end
|
66
|
+
it "converts 22 to 'двадцати двух'" do
|
67
|
+
expect(22.to_russian_words("dative")).to eq("двадцати двух")
|
68
|
+
end
|
69
|
+
it "converts 23 to 'двадцати трех'" do
|
70
|
+
expect(23.to_russian_words("dative")).to eq("двадцати трех")
|
71
|
+
end
|
72
|
+
it 'converts 21021021 to "двадцати одного миллиона двадцати одной тысячи двадцати одного"' do
|
73
|
+
expect(21_021_021.to_russian_words("dative")).to eq("двадцати одного миллиона двадцати одной тысячи двадцати одного")
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'converts 12012012 to "двенадцати миллионов двенадцати тысяч двенадцати"' do
|
77
|
+
expect(12_012_012.to_russian_words("dative")).to eq("двенадцати миллионов двенадцати тысяч двенадцати")
|
78
|
+
end
|
25
79
|
end
|
26
80
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require_relative "../spec_helper"
|
3
4
|
RSpec.describe "DIVISIONS" do
|
4
5
|
let(:subject) do
|
@@ -12,10 +13,14 @@ RSpec.describe "DIVISIONS" do
|
|
12
13
|
end
|
13
14
|
|
14
15
|
it "has '' at index 0" do
|
15
|
-
expect(subject[0]).to eq ""
|
16
|
+
expect(subject[0][0]).to eq ""
|
16
17
|
end
|
17
18
|
|
18
19
|
it "is expected to be frozen" do
|
19
20
|
expect(subject.frozen?).to be true
|
20
21
|
end
|
22
|
+
|
23
|
+
it "is expected to be frozen" do
|
24
|
+
expect(subject[0].frozen?).to be true
|
25
|
+
end
|
21
26
|
end
|
data/to_russian_words.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "bundler"
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency "rubocop"
|
26
26
|
spec.add_development_dependency "rspec"
|
metadata
CHANGED
@@ -1,29 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_russian_words
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasiliy Gandzha
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-08-26 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '0'
|
20
19
|
type: :development
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
25
|
+
version: '0'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: rake
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +89,7 @@ files:
|
|
90
89
|
- ".gitignore"
|
91
90
|
- ".rspec"
|
92
91
|
- ".rubocop.yml"
|
92
|
+
- ".tool-versions"
|
93
93
|
- Gemfile
|
94
94
|
- LICENSE.txt
|
95
95
|
- README.md
|
@@ -109,7 +109,6 @@ homepage: https://github.com/VasiliyG/to_russian_words
|
|
109
109
|
licenses:
|
110
110
|
- MIT
|
111
111
|
metadata: {}
|
112
|
-
post_install_message:
|
113
112
|
rdoc_options: []
|
114
113
|
require_paths:
|
115
114
|
- lib
|
@@ -124,9 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
123
|
- !ruby/object:Gem::Version
|
125
124
|
version: '0'
|
126
125
|
requirements: []
|
127
|
-
|
128
|
-
rubygems_version: 2.6.8
|
129
|
-
signing_key:
|
126
|
+
rubygems_version: 3.6.2
|
130
127
|
specification_version: 4
|
131
128
|
summary: This would convert numbers into russian words.
|
132
129
|
test_files:
|