t_t 1.3.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -3
- data/Gemfile +1 -1
- data/gemfiles/{Gemfile.actionpack-3.2.x → Gemfile.actionpack-5.2.x} +1 -1
- data/gemfiles/{Gemfile.actionpack-4.0.x → Gemfile.actionpack-6.0.x} +1 -1
- data/gemfiles/{Gemfile.actionpack-4.1.x → Gemfile.actionpack-6.1.x} +1 -1
- data/gemfiles/{Gemfile.actionpack-4.2.x → Gemfile.actionpack-7.0.x} +1 -1
- data/gemfiles/Gemfile.actionpack-7.1.x +4 -0
- data/gemfiles/Gemfile.actionpack-7.2.x +4 -0
- data/lib/t_t/base.rb +4 -4
- data/t_t.gemspec +17 -16
- metadata +31 -30
- data/gemfiles/Gemfile.actionpack-5.0.x +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43daf46a465895001cca405a2552f2e7c95ca43daf10bf90441020ded7e501b7
|
4
|
+
data.tar.gz: e9f53d229def5e60591acf7999ef4d66d73cb084611b5dba889e3f70045512de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c53149fc642ba89029cfa203b1526480fd4d4c3b3fd0eb3591349b4bf56bdca6fa4eec205c296768d6fe6b851d0d081f8e5553c585dd8c4455d15ef4652fc9c
|
7
|
+
data.tar.gz: f57d5864894add5b74a85700908e8339e4e7a0fb41038720e04827354958f6184c2a8328eb1041bba1dcaede0e34c81f225c3c14fcde43af11635526fb47fadd
|
data/.travis.yml
CHANGED
@@ -5,8 +5,11 @@ rvm:
|
|
5
5
|
- 2.3
|
6
6
|
- ruby-head
|
7
7
|
gemfile:
|
8
|
-
- gemfiles/Gemfile.actionpack-3.2.x
|
9
|
-
- gemfiles/Gemfile.actionpack-4.2.x
|
10
|
-
- gemfiles/Gemfile.actionpack-5.0.x
|
11
8
|
- gemfiles/Gemfile.actionpack-5.1.x
|
9
|
+
- gemfiles/Gemfile.actionpack-5.2.x
|
10
|
+
- gemfiles/Gemfile.actionpack-6.0.x
|
11
|
+
- gemfiles/Gemfile.actionpack-6.1.x
|
12
|
+
- gemfiles/Gemfile.actionpack-7.0.x
|
13
|
+
- gemfiles/Gemfile.actionpack-7.1.x
|
14
|
+
- gemfiles/Gemfile.actionpack-7.2.x
|
12
15
|
- Gemfile
|
data/Gemfile
CHANGED
data/lib/t_t/base.rb
CHANGED
@@ -70,7 +70,7 @@ module TT
|
|
70
70
|
class_eval <<-RUBY
|
71
71
|
def #{ meth_name }(key, options = {})
|
72
72
|
I18n.t "\#{ _config.fetch(:ns) }.#{ path }.\#{ key }",
|
73
|
-
{ default: [:"#{ path }.\#{ key }"] }.merge(options)
|
73
|
+
**{ default: [:"#{ path }.\#{ key }"] }.merge(options)
|
74
74
|
end
|
75
75
|
RUBY
|
76
76
|
end
|
@@ -117,7 +117,7 @@ module TT
|
|
117
117
|
|
118
118
|
resource = r(model_name)
|
119
119
|
resources = rs(model_name)
|
120
|
-
I18n.t path, {
|
120
|
+
I18n.t path, **{
|
121
121
|
default: defaults, r: @downcase.call(resource, I18n.locale), R: resource,
|
122
122
|
rs: @downcase.call(resources, I18n.locale), RS: resources
|
123
123
|
}.merge!(custom)
|
@@ -137,7 +137,7 @@ module TT
|
|
137
137
|
custom = args.last.is_a?(Hash) ? args.pop : {}
|
138
138
|
model_name = args.first
|
139
139
|
path, defaults = _resolve_errors(model_name, attr_name, error_name)
|
140
|
-
I18n.t path, { default: defaults }.merge!(custom)
|
140
|
+
I18n.t path, **{ default: defaults }.merge!(custom)
|
141
141
|
end
|
142
142
|
|
143
143
|
def r(model_name = nil)
|
@@ -152,7 +152,7 @@ module TT
|
|
152
152
|
|
153
153
|
def t(key, custom = {})
|
154
154
|
defaults = [:"#{ _config.fetch(:ns) }.common.#{ key }"].concat(Array(custom[:default]))
|
155
|
-
I18n.t "#{ _config.fetch(:root) }.#{ key }", custom.merge(default: defaults)
|
155
|
+
I18n.t "#{ _config.fetch(:root) }.#{ key }", **custom.merge(default: defaults)
|
156
156
|
end
|
157
157
|
|
158
158
|
private
|
data/t_t.gemspec
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name =
|
5
|
-
spec.version =
|
6
|
-
spec.authors = [
|
7
|
-
spec.email = [
|
8
|
-
spec.summary =
|
9
|
-
spec.description =
|
10
|
-
spec.homepage =
|
11
|
-
spec.license =
|
4
|
+
spec.name = 't_t'
|
5
|
+
spec.version = '1.4.0'
|
6
|
+
spec.authors = ['Sergii Pchelintsev']
|
7
|
+
spec.email = %w[sergii.pchelintsev@gmail.com]
|
8
|
+
spec.summary = 'An opinioned I18n helper'
|
9
|
+
spec.description = 'An opinioned I18n helper'
|
10
|
+
spec.homepage = ''
|
11
|
+
spec.license = 'MIT'
|
12
|
+
spec.required_ruby_version = '>= 2.7'
|
12
13
|
|
13
14
|
spec.files = `git ls-files -z`.split("\x0")
|
14
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
15
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
|
-
spec.require_paths = [
|
17
|
+
spec.require_paths = %w[lib]
|
17
18
|
|
18
|
-
spec.add_dependency
|
19
|
-
spec.add_dependency
|
19
|
+
spec.add_dependency 'i18n', '>= 0.6'
|
20
|
+
spec.add_dependency 'activesupport', '>= 5.2'
|
20
21
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
22
|
+
spec.add_development_dependency 'rails', '>= 5.2'
|
23
|
+
spec.add_development_dependency 'bundler', '>= 2.3'
|
24
|
+
spec.add_development_dependency 'minitest'
|
25
|
+
spec.add_development_dependency 'rack-test'
|
26
|
+
spec.add_development_dependency 'rake'
|
26
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t_t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- Sergii Pchelintsev
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.6
|
19
|
+
version: '0.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.6
|
26
|
+
version: '0.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '5.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '5.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '5.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '5.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '2.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rack-test
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,19 +98,19 @@ dependencies:
|
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
description: An opinioned I18n helper
|
112
112
|
email:
|
113
|
-
-
|
113
|
+
- sergii.pchelintsev@gmail.com
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
@@ -123,12 +123,13 @@ files:
|
|
123
123
|
- docs/action_factory.md
|
124
124
|
- docs/synchronisation.md
|
125
125
|
- examples/simple_app.yml
|
126
|
-
- gemfiles/Gemfile.actionpack-3.2.x
|
127
|
-
- gemfiles/Gemfile.actionpack-4.0.x
|
128
|
-
- gemfiles/Gemfile.actionpack-4.1.x
|
129
|
-
- gemfiles/Gemfile.actionpack-4.2.x
|
130
|
-
- gemfiles/Gemfile.actionpack-5.0.x
|
131
126
|
- gemfiles/Gemfile.actionpack-5.1.x
|
127
|
+
- gemfiles/Gemfile.actionpack-5.2.x
|
128
|
+
- gemfiles/Gemfile.actionpack-6.0.x
|
129
|
+
- gemfiles/Gemfile.actionpack-6.1.x
|
130
|
+
- gemfiles/Gemfile.actionpack-7.0.x
|
131
|
+
- gemfiles/Gemfile.actionpack-7.1.x
|
132
|
+
- gemfiles/Gemfile.actionpack-7.2.x
|
132
133
|
- lib/t_t.rb
|
133
134
|
- lib/t_t/action_factory.rb
|
134
135
|
- lib/t_t/base.rb
|
@@ -152,7 +153,7 @@ homepage: ''
|
|
152
153
|
licenses:
|
153
154
|
- MIT
|
154
155
|
metadata: {}
|
155
|
-
post_install_message:
|
156
|
+
post_install_message:
|
156
157
|
rdoc_options: []
|
157
158
|
require_paths:
|
158
159
|
- lib
|
@@ -160,15 +161,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
161
|
requirements:
|
161
162
|
- - ">="
|
162
163
|
- !ruby/object:Gem::Version
|
163
|
-
version: '
|
164
|
+
version: '2.7'
|
164
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
166
|
requirements:
|
166
167
|
- - ">="
|
167
168
|
- !ruby/object:Gem::Version
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
-
signing_key:
|
171
|
+
rubygems_version: 3.4.10
|
172
|
+
signing_key:
|
172
173
|
specification_version: 4
|
173
174
|
summary: An opinioned I18n helper
|
174
175
|
test_files: []
|