mobility 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +5 -3
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +26 -20
- data/README.md +7 -8
- data/lib/mobility/plugins/active_record/query.rb +5 -0
- data/lib/mobility/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5879d6ea43de5adf3be544ef11aaa634adabd6cad56609122450a1c648875f3
|
4
|
+
data.tar.gz: 7b0a1ed6187a0bb4aa75729c7e894c5673908e2443b50ba0da32f905ba4bf51f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 860741ebf12f984401bac6b03726ac4b10a5c64befbd60a199130154768e6c2c34567009999487dcdaba49f41c12fd73f9fcb86441d9e7ad71b7d59adb4976a6
|
7
|
+
data.tar.gz: 27f2da6d8118a5b582035d721437f71520b2d4bcb81f8dba63c81f77b8c2d2e3badc6ec98349086e9c7fa651d62df38255c495cc76dccc0bb2bb6a988458e007
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
|
1
|
+
��*O"��eqw3����zm-���DZ-�36�h���%#K<��7�_�����*&O )b�J̸��F���.��0_��w��\o���oGx�s���
|
2
|
+
uM�
|
3
|
+
ϙ%��e�PS��: p&��P���B��~^V{� oO�JМ�j�V���Kϑ�"�C*m�
|
4
|
+
Qgd��$Z���~]T��W���tp���P�P
|
5
|
+
����
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,31 +1,37 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/rails/rails.git
|
3
|
+
revision: ac3910791d0294f6721e5a39e0063aa005535f10
|
4
|
+
branch: main
|
5
|
+
specs:
|
6
|
+
activemodel (7.0.0.alpha)
|
7
|
+
activesupport (= 7.0.0.alpha)
|
8
|
+
activerecord (7.0.0.alpha)
|
9
|
+
activemodel (= 7.0.0.alpha)
|
10
|
+
activesupport (= 7.0.0.alpha)
|
11
|
+
activesupport (7.0.0.alpha)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
|
1
18
|
PATH
|
2
19
|
remote: .
|
3
20
|
specs:
|
4
|
-
mobility (1.
|
21
|
+
mobility (1.1.1)
|
5
22
|
i18n (>= 0.6.10, < 2)
|
6
23
|
request_store (~> 1.0)
|
7
24
|
|
8
25
|
GEM
|
9
26
|
remote: https://rubygems.org/
|
10
27
|
specs:
|
11
|
-
activemodel (6.0.3.4)
|
12
|
-
activesupport (= 6.0.3.4)
|
13
|
-
activerecord (6.0.3.4)
|
14
|
-
activemodel (= 6.0.3.4)
|
15
|
-
activesupport (= 6.0.3.4)
|
16
|
-
activesupport (6.0.3.4)
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>= 0.7, < 2)
|
19
|
-
minitest (~> 5.1)
|
20
|
-
tzinfo (~> 1.1)
|
21
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
22
28
|
benchmark-ips (2.8.4)
|
23
29
|
byebug (11.1.3)
|
24
30
|
coderay (1.1.3)
|
25
31
|
concurrent-ruby (1.1.8)
|
26
32
|
database_cleaner (1.99.0)
|
27
33
|
diff-lcs (1.4.4)
|
28
|
-
ffi (1.
|
34
|
+
ffi (1.15.0)
|
29
35
|
formatador (0.2.5)
|
30
36
|
guard (2.16.2)
|
31
37
|
formatador (>= 0.2.4)
|
@@ -41,14 +47,14 @@ GEM
|
|
41
47
|
guard (~> 2.1)
|
42
48
|
guard-compat (~> 1.1)
|
43
49
|
rspec (>= 2.99.0, < 4.0)
|
44
|
-
i18n (1.8.
|
50
|
+
i18n (1.8.10)
|
45
51
|
concurrent-ruby (~> 1.0)
|
46
|
-
listen (3.
|
52
|
+
listen (3.5.1)
|
47
53
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
48
54
|
rb-inotify (~> 0.9, >= 0.9.10)
|
49
55
|
lumberjack (1.2.8)
|
50
56
|
method_source (1.0.0)
|
51
|
-
minitest (5.14.
|
57
|
+
minitest (5.14.4)
|
52
58
|
nenv (0.3.0)
|
53
59
|
notiffany (0.1.3)
|
54
60
|
nenv (~> 0.1)
|
@@ -82,9 +88,8 @@ GEM
|
|
82
88
|
rspec-support (3.10.2)
|
83
89
|
shellany (0.0.1)
|
84
90
|
thor (1.1.0)
|
85
|
-
|
86
|
-
|
87
|
-
thread_safe (~> 0.1)
|
91
|
+
tzinfo (2.0.4)
|
92
|
+
concurrent-ruby (~> 1.0)
|
88
93
|
yard (0.9.26)
|
89
94
|
zeitwerk (2.4.2)
|
90
95
|
|
@@ -92,7 +97,8 @@ PLATFORMS
|
|
92
97
|
ruby
|
93
98
|
|
94
99
|
DEPENDENCIES
|
95
|
-
activerecord
|
100
|
+
activerecord!
|
101
|
+
activesupport!
|
96
102
|
benchmark-ips
|
97
103
|
database_cleaner (~> 1.5, >= 1.5.3)
|
98
104
|
guard-rspec
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Mobility
|
|
12
12
|
[docs]: http://www.rubydoc.info/gems/mobility
|
13
13
|
[wiki]: https://github.com/shioyama/mobility/wiki
|
14
14
|
|
15
|
-
**This is the readme for version 1.
|
15
|
+
**This is the readme for version 1.x of Mobility. If you are using an earlier
|
16
16
|
version (0.8.x or earlier), you probably want the readme on the [0-8
|
17
17
|
branch](https://github.com/shioyama/mobility/tree/0-8).**
|
18
18
|
|
@@ -55,7 +55,7 @@ Installation
|
|
55
55
|
Add this line to your application's Gemfile:
|
56
56
|
|
57
57
|
```ruby
|
58
|
-
gem 'mobility', '~> 1.1.
|
58
|
+
gem 'mobility', '~> 1.1.2'
|
59
59
|
```
|
60
60
|
|
61
61
|
### ActiveRecord (Rails)
|
@@ -130,9 +130,7 @@ default `type` option for the KeyValue backend to `:string`.
|
|
130
130
|
end
|
131
131
|
```
|
132
132
|
|
133
|
-
We will assume the configuration above in the examples that follow.
|
134
|
-
configuration options are described in the [API
|
135
|
-
docs](http://www.rubydoc.info/gems/mobility/Mobility/Configuration).
|
133
|
+
We will assume the configuration above in the examples that follow.
|
136
134
|
|
137
135
|
See [Getting Started](#quickstart) to get started translating your models.
|
138
136
|
|
@@ -486,9 +484,7 @@ end
|
|
486
484
|
```
|
487
485
|
|
488
486
|
Internally, Mobility assigns the fallbacks hash to an instance of
|
489
|
-
`I18n::Locale::Fallbacks.new
|
490
|
-
`fallbacks_generator` configuration option, see the [API documentation on
|
491
|
-
configuration](http://www.rubydoc.info/gems/mobility/Mobility/Configuration)).
|
487
|
+
`I18n::Locale::Fallbacks.new`.
|
492
488
|
|
493
489
|
By setting fallbacks for German and French to Japanese, values will fall
|
494
490
|
through to the Japanese value if none is present for either of these locales,
|
@@ -1028,6 +1024,9 @@ Integrations
|
|
1028
1024
|
* [mobility-ransack](https://github.com/shioyama/mobility-ransack): Search
|
1029
1025
|
attributes translated by Mobility with
|
1030
1026
|
[Ransack](https://github.com/activerecord-hackery/ransack).
|
1027
|
+
* [mobility-actiontext](https://github.com/sedubois/mobility-actiontext): Translate
|
1028
|
+
Rails [Action Text](https://guides.rubyonrails.org/action_text_overview.html) rich text
|
1029
|
+
with Mobility.
|
1031
1030
|
|
1032
1031
|
Tutorials
|
1033
1032
|
---------
|
@@ -137,6 +137,8 @@ enabled for any one attribute on the model.
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def order(opts, *rest)
|
140
|
+
return super unless @klass.respond_to?(:mobility_attribute?)
|
141
|
+
|
140
142
|
case opts
|
141
143
|
when Symbol, String
|
142
144
|
@klass.mobility_attribute?(opts) ? order({ opts => :asc }, *rest) : super
|
@@ -161,6 +163,9 @@ enabled for any one attribute on the model.
|
|
161
163
|
define_method method_name do |*attrs, &block|
|
162
164
|
return super(*attrs, &block) if (method_name == 'select' && block.present?)
|
163
165
|
|
166
|
+
if ::ActiveRecord::VERSION::STRING < '7.0'
|
167
|
+
return super(*attrs, &block) unless @klass.respond_to?(:mobility_attribute?)
|
168
|
+
end
|
164
169
|
return super(*attrs, &block) unless attrs.any?(&@klass.method(:mobility_attribute?))
|
165
170
|
|
166
171
|
keys = attrs.dup
|
data/lib/mobility/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Salzberg
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
eBMcZq0d1tbtv1M1UXND9mOfhLZ31YvoSTPkrJiRpljUNgD0+ugelnr1/5X/9k8y
|
35
35
|
J9QOd3C5jpSShf/HMvpJnFuSYFm19cH9GrHjvw==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2021-
|
37
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: request_store
|
metadata.gz.sig
CHANGED
Binary file
|