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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d970cb4b2012f65b0825d81e9d1dc44e07d59caab58d8bf604214b108fe8d24
4
- data.tar.gz: 75bf5d2fa6d7dd3212ad3a4c45d59539fbe69096a0bfa2358cf84244d0888c07
3
+ metadata.gz: f5879d6ea43de5adf3be544ef11aaa634adabd6cad56609122450a1c648875f3
4
+ data.tar.gz: 7b0a1ed6187a0bb4aa75729c7e894c5673908e2443b50ba0da32f905ba4bf51f
5
5
  SHA512:
6
- metadata.gz: 6fc1966f382adf690b7237b5d06b164be8b6c5e0b4a87765e1de3f0127f3ece0ec25b0e6814539c7b6f94f8c03e2b616f4c2d3a4c4b7ad2f9081f98eaad57ff8
7
- data.tar.gz: 32525fa60fd1c873d3ce14d41c0134bfb83bcdaf1290ca41f0d6b69aa22454ee67d7fcaed4978a60b07f1ae80f0ad7200ac8c275ab205599ac62c87c2786f54d
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
- A��Xc@S:Wx;��Gs8)�{���e� x2j��hZ����G"&�0њx��������
2
- 6z+��+���k�kr��i]=-`5$�������%�S�Z��Urs��S����(�v����>�J�d�Όr�����@-f�`�vE���_����K�ŧ@�c$��hɻQ\�{��D��9�51w���D�* 0���p��ka�L�
3
- F��<��ް�����9#�u
1
+ ��*O"��eqw3����zm-���DZ-�36h���%#K<��7_�����*&O )bJ̸��F���.��0_��w��\o���oGxs���
2
+ uM
3
+ ϙ%��ePS��: p& ��P���B��~^V{� oO�JМ�j�V���Kϑ�"�C*m�
4
+ Qgd��$Z���~]T��W���tp���P�P
5
+ ����
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## 1.1
4
4
 
5
+ ### 1.1.2
6
+ - Check whether class responds to mobility_attribute?
7
+ ([#515](https://github.com/shioyama/mobility/pull/515))
8
+
5
9
  ### 1.1.1
6
10
  - Updated signing key
7
11
 
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.0.7)
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.14.2)
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.8)
50
+ i18n (1.8.10)
45
51
  concurrent-ruby (~> 1.0)
46
- listen (3.4.1)
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.3)
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
- thread_safe (0.3.6)
86
- tzinfo (1.2.9)
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 (~> 6.0.0)
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.0 of Mobility. If you are using an earlier
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.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. Other
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` (this can be customized by setting the
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
@@ -8,7 +8,7 @@ module Mobility
8
8
  module VERSION
9
9
  MAJOR = 1
10
10
  MINOR = 1
11
- TINY = 1
11
+ TINY = 2
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
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.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-02-18 00:00:00.000000000 Z
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