rs_russian 0.15.0 → 0.19.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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +17 -18
- data/lib/russian/active_model_ext/custom_error_message.rb +3 -2
- data/lib/russian/rails_admin_datetime.rb +1 -1
- data/lib/russian/version.rb +1 -1
- data/lib/russian.rb +2 -2
- data/node_modules/.yarn-integrity +13 -0
- data/russian.gemspec +3 -3
- data/spec/i18n/locale/datetime_spec.rb +1 -1
- data/spec/russian_spec.rb +2 -2
- data/yarn.lock +4 -0
- metadata +18 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a745c80df10e41854e986cb2dc2675f0d61fa31c123a8a4b5aa22e3bde250c72
|
|
4
|
+
data.tar.gz: 182cdccc6c3eac28c4665bb86f6a1b9b9232bdd841ddcc4a9468586d63760655
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 502e7cb384de3004ef1b8cd388fa2df304a249a13f19b2f26a182ce133f9dc96f8e718cee99dc1770319dcd03f7287f0f04a53211c2e13b0a04c235efaca054c
|
|
7
|
+
data.tar.gz: '09ef6253a92adf3520907af11e6422ecddb4af0cfa7caeb529d56f6f16a4d22a3adec570f34888896b17c28225e8b84a608423f2b762366904d74578ce16fce5'
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
ruby-2.6.6
|
data/Gemfile.lock
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rs_russian (0.
|
|
5
|
-
activesupport (>=
|
|
6
|
-
i18n (~> 1.
|
|
4
|
+
rs_russian (0.19.0)
|
|
5
|
+
activesupport (>= 6.1.0, < 6.2.0)
|
|
6
|
+
i18n (~> 1.8.0)
|
|
7
7
|
unicode (~> 0.4.4)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (6.
|
|
12
|
+
activesupport (6.1.4.1)
|
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
14
|
-
i18n (>=
|
|
15
|
-
minitest (
|
|
16
|
-
tzinfo (~>
|
|
17
|
-
zeitwerk (~> 2.
|
|
18
|
-
concurrent-ruby (1.1.
|
|
19
|
-
diff-lcs (1.
|
|
20
|
-
i18n (1.
|
|
14
|
+
i18n (>= 1.6, < 2)
|
|
15
|
+
minitest (>= 5.1)
|
|
16
|
+
tzinfo (~> 2.0)
|
|
17
|
+
zeitwerk (~> 2.3)
|
|
18
|
+
concurrent-ruby (1.1.9)
|
|
19
|
+
diff-lcs (1.4.4)
|
|
20
|
+
i18n (1.8.10)
|
|
21
21
|
concurrent-ruby (~> 1.0)
|
|
22
|
-
minitest (5.
|
|
22
|
+
minitest (5.14.4)
|
|
23
23
|
rake (10.5.0)
|
|
24
24
|
rspec (2.99.0)
|
|
25
25
|
rspec-core (~> 2.99.0)
|
|
@@ -29,20 +29,19 @@ GEM
|
|
|
29
29
|
rspec-expectations (2.99.2)
|
|
30
30
|
diff-lcs (>= 1.1.3, < 2.0)
|
|
31
31
|
rspec-mocks (2.99.4)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
thread_safe (~> 0.1)
|
|
32
|
+
tzinfo (2.0.4)
|
|
33
|
+
concurrent-ruby (~> 1.0)
|
|
35
34
|
unicode (0.4.4.4)
|
|
36
|
-
zeitwerk (2.
|
|
35
|
+
zeitwerk (2.4.2)
|
|
37
36
|
|
|
38
37
|
PLATFORMS
|
|
39
38
|
ruby
|
|
40
39
|
|
|
41
40
|
DEPENDENCIES
|
|
42
|
-
bundler
|
|
41
|
+
bundler
|
|
43
42
|
rake (< 11.0)
|
|
44
43
|
rs_russian!
|
|
45
44
|
rspec (~> 2.14)
|
|
46
45
|
|
|
47
46
|
BUNDLED WITH
|
|
48
|
-
|
|
47
|
+
2.2.7
|
|
@@ -25,13 +25,14 @@ if defined?(ActiveModel::Errors)
|
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
alias_method :to_hash_old, :to_hash
|
|
28
29
|
def to_hash(full_messages = false)
|
|
29
30
|
if full_messages
|
|
30
|
-
self.
|
|
31
|
+
self.to_hash_old.each_with_object({}) do |(attribute, array), messages|
|
|
31
32
|
messages[attribute] = array.map { |message| full_message(attribute, message) }
|
|
32
33
|
end
|
|
33
34
|
else
|
|
34
|
-
self.
|
|
35
|
+
self.to_hash_old.map do |k, vs|
|
|
35
36
|
m = vs.map do |v|
|
|
36
37
|
if v =~ /^\^/
|
|
37
38
|
v[1..-1]
|
data/lib/russian/version.rb
CHANGED
data/lib/russian.rb
CHANGED
|
@@ -52,13 +52,13 @@ module Russian
|
|
|
52
52
|
|
|
53
53
|
# See I18n::translate
|
|
54
54
|
def translate(key, options = {})
|
|
55
|
-
I18n.translate(key, options.merge({ :locale => LOCALE }))
|
|
55
|
+
I18n.translate(key, **options.merge({ :locale => LOCALE }))
|
|
56
56
|
end
|
|
57
57
|
alias :t :translate
|
|
58
58
|
|
|
59
59
|
# See I18n::localize
|
|
60
60
|
def localize(object, options = {})
|
|
61
|
-
I18n.localize(object, options.merge({ :locale => LOCALE }))
|
|
61
|
+
I18n.localize(object, **options.merge({ :locale => LOCALE }))
|
|
62
62
|
end
|
|
63
63
|
alias :l :localize
|
|
64
64
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"systemParams": "linux-x64-72",
|
|
3
|
+
"modulesFolders": [],
|
|
4
|
+
"flags": [],
|
|
5
|
+
"linkedModules": [
|
|
6
|
+
"extract-css-chunks-webpack-plugin",
|
|
7
|
+
"react-notification-system-redux"
|
|
8
|
+
],
|
|
9
|
+
"topLevelPatterns": [],
|
|
10
|
+
"lockfileEntries": {},
|
|
11
|
+
"files": [],
|
|
12
|
+
"artifacts": {}
|
|
13
|
+
}
|
data/russian.gemspec
CHANGED
|
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
spec.add_dependency 'i18n', '~> 1.
|
|
21
|
+
spec.add_dependency 'i18n', '~> 1.8.0'
|
|
22
22
|
spec.add_dependency 'unicode', '~> 0.4.4'
|
|
23
|
-
spec.add_dependency 'activesupport', ['>=
|
|
23
|
+
spec.add_dependency 'activesupport', ['>= 6.1.0', '< 6.2.0']
|
|
24
24
|
|
|
25
|
-
spec.add_development_dependency 'bundler'
|
|
25
|
+
spec.add_development_dependency 'bundler'
|
|
26
26
|
spec.add_development_dependency 'rake', '< 11.0'
|
|
27
27
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
|
28
28
|
end
|
data/spec/russian_spec.rb
CHANGED
|
@@ -124,9 +124,9 @@ describe Russian do
|
|
|
124
124
|
lambda { Russian.send(method, 1) }.should raise_error(ArgumentError)
|
|
125
125
|
lambda { Russian.send(method, 1, "вещь") }.should raise_error(ArgumentError)
|
|
126
126
|
lambda { Russian.send(method, 1, "вещь", "вещи") }.should raise_error(ArgumentError)
|
|
127
|
-
|
|
127
|
+
expect { Russian.send(method, 1, "вещь", "вещи", "вещей") }.not_to raise_error
|
|
128
128
|
lambda { Russian.send(method, 3.14, "вещь", "вещи", "вещей") }.should raise_error(ArgumentError)
|
|
129
|
-
|
|
129
|
+
expect { Russian.send(method, 3.14, "вещь", "вещи", "вещей", "вещи") }.not_to raise_error
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
end
|
data/yarn.lock
ADDED
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rs_russian
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- glebtv
|
|
8
8
|
- Yaroslav Markin
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: i18n
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
20
|
+
version: 1.8.0
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version:
|
|
27
|
+
version: 1.8.0
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: unicode
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -45,34 +45,34 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version:
|
|
48
|
+
version: 6.1.0
|
|
49
49
|
- - "<"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version: 6.
|
|
51
|
+
version: 6.2.0
|
|
52
52
|
type: :runtime
|
|
53
53
|
prerelease: false
|
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
|
56
56
|
- - ">="
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
|
-
version:
|
|
58
|
+
version: 6.1.0
|
|
59
59
|
- - "<"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 6.
|
|
61
|
+
version: 6.2.0
|
|
62
62
|
- !ruby/object:Gem::Dependency
|
|
63
63
|
name: bundler
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
68
|
+
version: '0'
|
|
69
69
|
type: :development
|
|
70
70
|
prerelease: false
|
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
- !ruby/object:Gem::Dependency
|
|
77
77
|
name: rake
|
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,6 +135,7 @@ files:
|
|
|
135
135
|
- lib/russian/russian_rails.rb
|
|
136
136
|
- lib/russian/transliteration.rb
|
|
137
137
|
- lib/russian/version.rb
|
|
138
|
+
- node_modules/.yarn-integrity
|
|
138
139
|
- russian.gemspec
|
|
139
140
|
- spec/fixtures/en.yml
|
|
140
141
|
- spec/fixtures/ru.yml
|
|
@@ -144,11 +145,12 @@ files:
|
|
|
144
145
|
- spec/russian_spec.rb
|
|
145
146
|
- spec/spec_helper.rb
|
|
146
147
|
- spec/transliteration_spec.rb
|
|
148
|
+
- yarn.lock
|
|
147
149
|
homepage: https://github.com/rs-pro/russian
|
|
148
150
|
licenses:
|
|
149
151
|
- MIT
|
|
150
152
|
metadata: {}
|
|
151
|
-
post_install_message:
|
|
153
|
+
post_install_message:
|
|
152
154
|
rdoc_options: []
|
|
153
155
|
require_paths:
|
|
154
156
|
- lib
|
|
@@ -163,8 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
165
|
- !ruby/object:Gem::Version
|
|
164
166
|
version: '0'
|
|
165
167
|
requirements: []
|
|
166
|
-
rubygems_version: 3.
|
|
167
|
-
signing_key:
|
|
168
|
+
rubygems_version: 3.2.13
|
|
169
|
+
signing_key:
|
|
168
170
|
specification_version: 4
|
|
169
171
|
summary: Russian language support for Ruby and Rails
|
|
170
172
|
test_files:
|