mobility 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d927c413815d0bd56b1f75e5b0a352d2f5832415c4e1f8c50a98fde44d973e92
4
- data.tar.gz: 72d484c61b6b17b9d99e1061444d209ce66a4de70f904d68d1ce612b24656ae0
3
+ metadata.gz: cf9b852c3efdabe4bf4bd64e29a036f93b02169614965e37621f3f8b54315c7a
4
+ data.tar.gz: 3f4b71f87943fabcb6eae21c1960ffb20cb555cbb487c16a213ec4a5bb4f4824
5
5
  SHA512:
6
- metadata.gz: 1167adec126a34ff482d01beaa38e18e4188a79aa1be9e5031f8786d86629724984f7597c29d947ae11ad77d72c7538ecc84ed7474c70c87a3da226e81b1f59c
7
- data.tar.gz: d64f21cab45ffa292e9980962d38c7f76fcaacdcac48b7d83b25fbcc0856b49b6814cefdc78e39382d7c12b944ef27ebedb23c14bffb6f819c972e8c9176cb43
6
+ metadata.gz: 49c5b97f0f2c4d1e260fa49b663334aca25fd8c0bbe5aa958a104d6cbbba31a6a6ea4403bb930f315258f2b07ef533fae0891f9fb189645ed2f1be56ff6e86ff
7
+ data.tar.gz: d132e09bc34036fdf7fe8cda20a7c337e714415b1999fdfd9319148e8584d3567a7f1fc494842bacbaebdb0881fc9b46b49a86b7de6a6ff8cc791f4feaf5192c
@@ -1,2 +1,4 @@
1
- Z���y�yWy��=���T�R?��6�Jl����-��a���q��te����������&�r��Ş�I8��KJ���@FSICĔm�z��1y�/�qDI e�~:�!�/��_�8�
2
- Σ��U�π�Y��>�)��)"0�_k�L���N6~#���o��P��^��5К%��\ M9�$�/)t����uԋ�^�t�ʎ@
1
+ 'ʧ˷���r�&ROt&K7�*�HXiNz[��6M��>�vZi��n?� u����M kt��k�
2
+ �.����ͻ�>�h��`<�{��tt7]��
3
+ _~.�!�TC�"77��?��ܞ3tz5G9UI��j�i�A�
4
+ |D7E�4F"L{ �5�?�|�̸�<�me�4�v�U<d��������US�h!���6~�؁;���m}�VE�4q^�g��um �XgY�bK�ی��KtX��pj���X*��
data.tar.gz.sig CHANGED
Binary file
@@ -1,31 +1,47 @@
1
1
  # Mobility Changelog
2
2
 
3
+ ### Unreleased
4
+ - Remove `Mobility::Plugins::Attributes#each`
5
+ ([#475](https://github.com/shioyama/mobility/pull/475))
6
+ - Add public method `Mobility::Plugins::ActiveRecord::Query.build_query`
7
+ ([#471](https://github.com/shioyama/mobility/pull/471))
8
+
3
9
  ## 1.0
4
10
 
5
- 1.0 is a rewrite of many internals of the gem. Please see the [wiki page on v1.0](https://github.com/shioyama/mobility/wiki/Introduction-to-Mobility-v1.0) for more details on how to upgrade.
11
+ 1.0 is a rewrite of many internals of the gem. Please see the [wiki page on
12
+ v1.0](https://github.com/shioyama/mobility/wiki/Introduction-to-Mobility-v1.0)
13
+ for more details on how to upgrade.
14
+
15
+ ### 1.0.1
16
+
17
+ - Make `Mobility::Plugins::ActiveRecord::Query::VirtualRow` and
18
+ `Mobility::Plugins::ActiveRecord::Query::QueryExtension`
19
+ ([#471](https://github.com/shioyama/mobility/pull/471)) public
20
+ - Fix typo in initializer template
21
+ ([#474](https://github.com/shioyama/mobility/pull/474))
6
22
 
7
- ## 1.0.0
23
+ ### 1.0.0
8
24
 
9
25
  - Fix setting a locale from Rails config
10
26
  ([#468](https://github.com/shioyama/mobility/pull/468)) thanks
11
27
  [sergey-alekseev](https://github.com/sergey-alekseev)!
12
28
  - Fixes validations with validates_uniqueness_of
13
29
  ([#470](https://github.com/shioyama/mobility/pull/470)) thanks
14
- [artplan1](https://github.com/shioyama/mobility/pull/470)!
30
+ [artplan1](https://github.com/artplan1)!
15
31
 
16
- ## 1.0.0.rc1 (pre-release)
32
+ ### 1.0.0.rc1 (pre-release)
17
33
 
18
34
  - Remove `Mobility::ActiveRecord`, `Mobility::Sequel` and `Mobility::Arel`, and
19
35
  general cleanup ([#464](https://github.com/shioyama/mobility/pull/464))
20
36
 
21
- ## 1.0.0.beta2 (pre-release)
37
+ ### 1.0.0.beta2 (pre-release)
22
38
 
23
39
  - Refactor attributes & backend plugins and make `mobility_attributes` public
24
40
  ([#462](https://github.com/shioyama/mobility/pull/462))
25
41
  - Make attribute_methods plugin depend on attributes
26
42
  ([#461](https://github.com/shioyama/mobility/pull/461))
27
43
 
28
- ## 1.0.0.beta1 (pre-release)
44
+ ### 1.0.0.beta1 (pre-release)
29
45
 
30
46
  - Remove `Mobility::Backend#apply_plugin`
31
47
  ([#454](https://github.com/shioyama/mobility/pull/454))
@@ -36,7 +52,7 @@
36
52
  - Fix Ruby 2.7 deprecation warnings
37
53
  ([#460](https://github.com/shioyama/mobility/pull/460))
38
54
 
39
- ## 1.0.0.alpha (pre-release)
55
+ ### 1.0.0.alpha (pre-release)
40
56
 
41
57
  - Default fallbacks plugin to `true` when enabled
42
58
  ([#447](https://github.com/shioyama/mobility/pull/447))
data/Gemfile CHANGED
@@ -8,20 +8,11 @@ orm, orm_version = ENV['ORM'], ENV['ORM_VERSION']
8
8
  group :development, :test do
9
9
  case orm
10
10
  when 'active_record'
11
- orm_version ||= '6.0'
11
+ orm_version ||= '6.1'
12
12
  case orm_version
13
- when '4.2'
14
- gem 'activerecord', '>= 4.2.6', '< 5.0'
15
- when '5.0'
16
- gem 'activerecord', '>= 5.0', '< 5.1'
17
- when '5.1'
18
- gem 'activerecord', '>= 5.1', '< 5.2'
19
- when '5.2'
20
- gem 'activerecord', '>= 5.2.0', '< 5.3'
21
- gem 'railties', '>= 5.2.0.rc2', '< 5.3'
22
- when '6.0'
23
- gem 'activerecord', '>= 6.0.0', '< 6.1'
24
- when '6.1'
13
+ when '4.2', '5.0', '5.1', '5.2', '6.0', '6.1'
14
+ gem 'activerecord', "~> #{orm_version}.0"
15
+ when '6.2'
25
16
  git 'https://github.com/rails/rails.git' do
26
17
  gem 'activerecord'
27
18
  gem 'activesupport'
@@ -32,10 +23,8 @@ group :development, :test do
32
23
  when 'sequel'
33
24
  orm_version ||= '5'
34
25
  case orm_version
35
- when '4'
36
- gem 'sequel', '>= 4.46.0', '< 5.0'
37
26
  when '5'
38
- gem 'sequel', '>= 5.0.0', '< 6.0.0'
27
+ gem 'sequel', "~> #{orm_version}.0"
39
28
  else
40
29
  raise ArgumentError, 'Invalid Sequel version'
41
30
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mobility (1.0.0.rc1)
4
+ mobility (1.0.0)
5
5
  i18n (>= 0.6.10, < 2)
6
6
  request_store (~> 1.0)
7
7
 
@@ -83,16 +83,16 @@ GEM
83
83
  shellany (0.0.1)
84
84
  thor (1.0.1)
85
85
  thread_safe (0.3.6)
86
- tzinfo (1.2.8)
86
+ tzinfo (1.2.9)
87
87
  thread_safe (~> 0.1)
88
88
  yard (0.9.25)
89
- zeitwerk (2.4.1)
89
+ zeitwerk (2.4.2)
90
90
 
91
91
  PLATFORMS
92
92
  ruby
93
93
 
94
94
  DEPENDENCIES
95
- activerecord (>= 6.0.0, < 6.1)
95
+ activerecord (~> 6.0.0)
96
96
  benchmark-ips
97
97
  database_cleaner (~> 1.5, >= 1.5.3)
98
98
  guard-rspec
data/README.md CHANGED
@@ -13,8 +13,8 @@ Mobility
13
13
  [wiki]: https://github.com/shioyama/mobility/wiki
14
14
 
15
15
  **This is the readme for version 1.0 of Mobility. If you are using an earlier
16
- version (0.8.x or earlier), you probably want the readme on the [0-8-stable
17
- branch](https://github.com/shioyama/mobility/tree/0-8-stable).**
16
+ version (0.8.x or earlier), you probably want the readme on the [0-8
17
+ branch](https://github.com/shioyama/mobility/tree/0-8).**
18
18
 
19
19
  Mobility is a gem for storing and retrieving translations as attributes on a
20
20
  class. These translations could be the content of blog posts, captions on
@@ -56,12 +56,9 @@ To use the latest pre-version of Mobility 1.0, add this line to your
56
56
  application's Gemfile:
57
57
 
58
58
  ```ruby
59
- gem 'mobility', '~> 1.0.0'
59
+ gem 'mobility', '~> 1.0.1'
60
60
  ```
61
61
 
62
- For the latest stable version of Mobility, see the readme on the
63
- [0-8-stable](https://github.com/shioyama/mobility/tree/0-8-stable) branch.
64
-
65
62
  ### ActiveRecord (Rails)
66
63
 
67
64
  Requirements:
@@ -121,8 +121,8 @@ Also includes a +configure+ class method to apply plugins to a pluggable
121
121
  # Does this class include all plugins this plugin depends (directly) on?
122
122
  # @param [Class] klass Pluggable class
123
123
  def dependencies_satisfied?(klass)
124
- required_plugins = dependencies.keys.map { |name| Plugins.load_plugin(name) }
125
- (required_plugins - klass.included_modules).none?
124
+ plugin_keys = klass.included_plugins.map { |plugin| Plugins.lookup_name(plugin) }
125
+ (dependencies.keys - plugin_keys).none?
126
126
  end
127
127
 
128
128
  # Specifies a dependency of this plugin.
@@ -67,9 +67,9 @@ enabled for any one attribute on the model.
67
67
  end
68
68
  end
69
69
 
70
- # Internal class to create a "clean room" for manipulating translated
71
- # attribute nodes in an instance-eval'ed block. Inspired by Sequel's
72
- # (much more sophisticated) virtual rows.
70
+ # Creates a "clean room" for manipulating translated attribute nodes in
71
+ # an instance-eval'ed block. Inspired by Sequel's (much more
72
+ # sophisticated) virtual rows.
73
73
  class VirtualRow < BasicObject
74
74
  attr_reader :__backends
75
75
 
@@ -108,7 +108,7 @@ enabled for any one attribute on the model.
108
108
  end
109
109
  end
110
110
  end
111
- private_constant :QueryMethod, :VirtualRow
111
+ private_constant :QueryMethod
112
112
 
113
113
  module QueryExtension
114
114
  def where!(opts, *rest)
@@ -273,7 +273,7 @@ enabled for any one attribute on the model.
273
273
  end
274
274
  end
275
275
 
276
- private_constant :QueryExtension, :FindByMethods
276
+ private_constant :FindByMethods
277
277
  end
278
278
 
279
279
  class MissingBackend < Mobility::Error; end
@@ -8,7 +8,7 @@ module Mobility
8
8
  module VERSION
9
9
  MAJOR = 1
10
10
  MINOR = 0
11
- TINY = 0
11
+ TINY = 1
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -108,7 +108,7 @@ Mobility.configure do
108
108
  #
109
109
  # Adds translated attributes to +attributes+ hash, and defines methods
110
110
  # +translated_attributes+ and +untranslated_attributes+ which return hashes
111
- # with translatd and untranslated attributes, respectively. Be aware that
111
+ # with translated and untranslated attributes, respectively. Be aware that
112
112
  # this plugin can create conflicts with other gems.
113
113
  #
114
114
  # attribute_methods
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
@@ -34,7 +34,7 @@ cert_chain:
34
34
  gSQml7TqcC6dZRsZRwYqzD9kUwdAJoCqno2CBUKs2l0yQAjFT36lRrVJznb7uWwa
35
35
  xpPFnsrtyaZW6Dty8TSG3qzmeGpmpIotA8x1VA==
36
36
  -----END CERTIFICATE-----
37
- date: 2020-12-12 00:00:00.000000000 Z
37
+ date: 2020-12-21 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