mobility 0.8.10 → 1.0.0.beta2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile +50 -18
- data/Gemfile.lock +36 -101
- data/README.md +183 -91
- data/Rakefile +6 -4
- data/lib/mobility.rb +44 -166
- data/lib/mobility/arel.rb +1 -1
- data/lib/mobility/arel/nodes/pg_ops.rb +1 -1
- data/lib/mobility/backend.rb +27 -51
- data/lib/mobility/backends.rb +20 -0
- data/lib/mobility/backends/active_record.rb +4 -0
- data/lib/mobility/backends/active_record/column.rb +2 -0
- data/lib/mobility/backends/active_record/container.rb +6 -7
- data/lib/mobility/backends/active_record/hstore.rb +3 -1
- data/lib/mobility/backends/active_record/json.rb +2 -0
- data/lib/mobility/backends/active_record/jsonb.rb +2 -0
- data/lib/mobility/backends/active_record/key_value.rb +6 -4
- data/lib/mobility/backends/active_record/pg_hash.rb +1 -1
- data/lib/mobility/backends/active_record/serialized.rb +6 -0
- data/lib/mobility/backends/active_record/table.rb +6 -4
- data/lib/mobility/backends/column.rb +0 -6
- data/lib/mobility/backends/container.rb +10 -1
- data/lib/mobility/backends/hash.rb +39 -0
- data/lib/mobility/backends/hash_valued.rb +4 -0
- data/lib/mobility/backends/hstore.rb +0 -1
- data/lib/mobility/backends/json.rb +0 -1
- data/lib/mobility/backends/jsonb.rb +1 -2
- data/lib/mobility/backends/key_value.rb +31 -26
- data/lib/mobility/backends/null.rb +2 -0
- data/lib/mobility/backends/sequel.rb +5 -2
- data/lib/mobility/backends/sequel/column.rb +2 -0
- data/lib/mobility/backends/sequel/container.rb +6 -6
- data/lib/mobility/backends/sequel/hstore.rb +3 -1
- data/lib/mobility/backends/sequel/json.rb +3 -0
- data/lib/mobility/backends/sequel/jsonb.rb +3 -1
- data/lib/mobility/backends/sequel/key_value.rb +8 -6
- data/lib/mobility/backends/sequel/serialized.rb +6 -0
- data/lib/mobility/backends/sequel/table.rb +5 -2
- data/lib/mobility/backends/serialized.rb +1 -3
- data/lib/mobility/backends/table.rb +29 -26
- data/lib/mobility/pluggable.rb +56 -0
- data/lib/mobility/plugin.rb +260 -0
- data/lib/mobility/plugins.rb +27 -24
- data/lib/mobility/plugins/active_model.rb +17 -0
- data/lib/mobility/plugins/active_model/cache.rb +26 -0
- data/lib/mobility/plugins/active_model/dirty.rb +119 -78
- data/lib/mobility/plugins/active_record.rb +34 -0
- data/lib/mobility/plugins/active_record/backend.rb +25 -0
- data/lib/mobility/plugins/active_record/cache.rb +28 -0
- data/lib/mobility/plugins/active_record/dirty.rb +34 -17
- data/lib/mobility/plugins/active_record/query.rb +48 -34
- data/lib/mobility/plugins/active_record/uniqueness_validation.rb +60 -0
- data/lib/mobility/plugins/attribute_methods.rb +29 -20
- data/lib/mobility/plugins/attributes.rb +72 -0
- data/lib/mobility/plugins/backend.rb +161 -0
- data/lib/mobility/plugins/backend_reader.rb +34 -0
- data/lib/mobility/plugins/cache.rb +68 -26
- data/lib/mobility/plugins/default.rb +22 -17
- data/lib/mobility/plugins/dirty.rb +12 -33
- data/lib/mobility/plugins/fallbacks.rb +52 -44
- data/lib/mobility/plugins/fallthrough_accessors.rb +25 -25
- data/lib/mobility/plugins/locale_accessors.rb +22 -35
- data/lib/mobility/plugins/presence.rb +28 -21
- data/lib/mobility/plugins/query.rb +8 -17
- data/lib/mobility/plugins/reader.rb +50 -0
- data/lib/mobility/plugins/sequel.rb +34 -0
- data/lib/mobility/plugins/sequel/backend.rb +25 -0
- data/lib/mobility/plugins/sequel/cache.rb +24 -0
- data/lib/mobility/plugins/sequel/dirty.rb +33 -22
- data/lib/mobility/plugins/sequel/query.rb +21 -6
- data/lib/mobility/plugins/writer.rb +44 -0
- data/lib/mobility/translations.rb +95 -0
- data/lib/mobility/version.rb +12 -1
- data/lib/rails/generators/mobility/templates/initializer.rb +96 -78
- metadata +28 -27
- metadata.gz.sig +0 -0
- data/lib/mobility/active_model.rb +0 -4
- data/lib/mobility/active_model/backend_resetter.rb +0 -26
- data/lib/mobility/active_record.rb +0 -23
- data/lib/mobility/active_record/backend_resetter.rb +0 -26
- data/lib/mobility/active_record/uniqueness_validator.rb +0 -60
- data/lib/mobility/attributes.rb +0 -324
- data/lib/mobility/backend/orm_delegator.rb +0 -44
- data/lib/mobility/backend_resetter.rb +0 -50
- data/lib/mobility/configuration.rb +0 -138
- data/lib/mobility/fallbacks.rb +0 -28
- data/lib/mobility/interface.rb +0 -0
- data/lib/mobility/loaded.rb +0 -4
- data/lib/mobility/plugins/active_record/attribute_methods.rb +0 -38
- data/lib/mobility/plugins/cache/translation_cacher.rb +0 -40
- data/lib/mobility/sequel.rb +0 -9
- data/lib/mobility/sequel/backend_resetter.rb +0 -23
- data/lib/mobility/translates.rb +0 -73
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen-string-literal: true
|
|
2
|
+
|
|
3
|
+
module Mobility
|
|
4
|
+
module Plugins
|
|
5
|
+
module Writer
|
|
6
|
+
=begin
|
|
7
|
+
|
|
8
|
+
Defines attribute writer that delegates to +Mobility::Backend#write+.
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
extend Plugin
|
|
12
|
+
|
|
13
|
+
default true
|
|
14
|
+
requires :backend
|
|
15
|
+
|
|
16
|
+
initialize_hook do |*names|
|
|
17
|
+
if options[:writer]
|
|
18
|
+
names.each do |name|
|
|
19
|
+
class_eval <<-EOM, __FILE__, __LINE__ + 1
|
|
20
|
+
def #{name}=(value, locale: nil, **options)
|
|
21
|
+
#{Writer.setup_source}
|
|
22
|
+
mobility_backends[:#{name}].write(locale, value, **options)
|
|
23
|
+
end
|
|
24
|
+
EOM
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.setup_source
|
|
30
|
+
<<-EOL
|
|
31
|
+
return super(value) if options[:super]
|
|
32
|
+
if (locale &&= locale.to_sym)
|
|
33
|
+
#{"Mobility.enforce_available_locales!(locale)" if I18n.enforce_available_locales}
|
|
34
|
+
options[:locale] = true
|
|
35
|
+
else
|
|
36
|
+
locale = Mobility.locale
|
|
37
|
+
end
|
|
38
|
+
EOL
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
register_plugin(:writer, Writer)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require "mobility/pluggable"
|
|
3
|
+
|
|
4
|
+
module Mobility
|
|
5
|
+
=begin
|
|
6
|
+
|
|
7
|
+
Module containing translation accessor methods and other methods for accessing
|
|
8
|
+
translations.
|
|
9
|
+
|
|
10
|
+
Normally this class will be created by calling +translates+ on the model class,
|
|
11
|
+
added when extending {Mobility}, but it can also be used independent of that
|
|
12
|
+
macro.
|
|
13
|
+
|
|
14
|
+
==Including Translations in a Class
|
|
15
|
+
|
|
16
|
+
Since {Translations} is a subclass of +Module+, including an instance of it is
|
|
17
|
+
like including a module. Options passed to the initializer are passed to
|
|
18
|
+
plugins (if those plugins have been enabled).
|
|
19
|
+
|
|
20
|
+
We can first enable plugins by subclassing `Mobility::Translations`, and
|
|
21
|
+
calling +plugins+ to enable any plugins we want to use. We want reader and
|
|
22
|
+
writer methods for accessing translations, so we enable those plugins:
|
|
23
|
+
|
|
24
|
+
class Translations < Mobility::Translations
|
|
25
|
+
plugins do
|
|
26
|
+
reader
|
|
27
|
+
writer
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
Both `reader` and `writer` depend on the `backend` plugin, so this is also enabled.
|
|
32
|
+
|
|
33
|
+
Then create an instance like this:
|
|
34
|
+
|
|
35
|
+
Translations.new("title", backend: :my_backend)
|
|
36
|
+
|
|
37
|
+
This will generate an anonymous module that behaves approximately like this:
|
|
38
|
+
|
|
39
|
+
Module.new do
|
|
40
|
+
# From Mobility::Plugins::Backend module
|
|
41
|
+
#
|
|
42
|
+
def mobility_backends
|
|
43
|
+
# Returns a memoized hash with attribute name keys and backend instance
|
|
44
|
+
# values. When a key is fetched from the hash, the hash calls
|
|
45
|
+
# +self.class.mobility_backend_class(name)+ (where +name+ is the
|
|
46
|
+
# attribute name) to get the backend class, then instantiate it (passing
|
|
47
|
+
# the model instance and attribute name to its initializer) and return it.
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# From Mobility::Plugins::Reader module
|
|
51
|
+
#
|
|
52
|
+
def title(locale: Mobility.locale)
|
|
53
|
+
mobility_backends[:title].read(locale)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def title?(locale: Mobility.locale)
|
|
57
|
+
mobility_backends[:title].read(locale).present?
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# From Mobility::Plugins::Writer module
|
|
61
|
+
def title=(value, locale: Mobility.locale)
|
|
62
|
+
mobility_backends[:title].write(locale, value)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
Including this module into a model class will thus add the backends method and
|
|
67
|
+
reader and writer methods for accessing translations. Other plugins (e.g.
|
|
68
|
+
fallbacks, cache) modify the result returned by the backend, by hooking into
|
|
69
|
+
the +included+ callback method on the module, see {Mobility::Plugin} for
|
|
70
|
+
details.
|
|
71
|
+
|
|
72
|
+
==Setting up the Model Class
|
|
73
|
+
|
|
74
|
+
Accessor methods alone are of limited use without a hook to actually modify the
|
|
75
|
+
model class. This hook is provided by the {Backend::Setup#setup_model} method,
|
|
76
|
+
which is added to every backend class when it includes the {Backend} module.
|
|
77
|
+
|
|
78
|
+
Assuming the backend has defined a setup block by calling +setup+, this block
|
|
79
|
+
will be called when {Translations} is {#included} in the model class, passed
|
|
80
|
+
attributes and options defined when the backend was defined on the model class.
|
|
81
|
+
This allows a backend to do things like (for example) define associations on a
|
|
82
|
+
model class required by the backend, as happens in the {Backends::KeyValue} and
|
|
83
|
+
{Backends::Table} backends.
|
|
84
|
+
|
|
85
|
+
Since setup blocks are evaluated on the model class, it is possible that
|
|
86
|
+
backends can conflict (for example, overwriting previously defined methods).
|
|
87
|
+
Care should be taken to avoid defining methods on the model class, or where
|
|
88
|
+
necessary, ensure that names are defined in such a way as to avoid conflicts
|
|
89
|
+
with other backends.
|
|
90
|
+
|
|
91
|
+
=end
|
|
92
|
+
class Translations < Pluggable
|
|
93
|
+
include Plugins.load_plugin(:attributes)
|
|
94
|
+
end
|
|
95
|
+
end
|
data/lib/mobility/version.rb
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Mobility
|
|
4
|
-
|
|
4
|
+
def self.gem_version
|
|
5
|
+
Gem::Version.new VERSION::STRING
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
module VERSION
|
|
9
|
+
MAJOR = 1
|
|
10
|
+
MINOR = 0
|
|
11
|
+
TINY = 0
|
|
12
|
+
PRE = "beta2"
|
|
13
|
+
|
|
14
|
+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
|
15
|
+
end
|
|
5
16
|
end
|
|
@@ -1,90 +1,108 @@
|
|
|
1
|
-
Mobility.configure do
|
|
2
|
-
# Sets the default backend to use in models. This can be overridden in models
|
|
3
|
-
# by passing +backend: ...+ to +translates+.
|
|
4
|
-
config.default_backend = :key_value
|
|
1
|
+
Mobility.configure do
|
|
5
2
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
# PLUGINS
|
|
4
|
+
plugins do
|
|
5
|
+
# Backend
|
|
6
|
+
#
|
|
7
|
+
# Sets the default backend to use in models. This can be overridden in models
|
|
8
|
+
# by passing +backend: ...+ to +translates+.
|
|
9
|
+
#
|
|
10
|
+
# To default to a different backend globally, replace +:key_value+ by another
|
|
11
|
+
# backend name.
|
|
12
|
+
#
|
|
13
|
+
backend :key_value
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
# ActiveRecord
|
|
16
|
+
#
|
|
17
|
+
# Defines ActiveRecord as ORM, and enables ActiveRecord-specific plugins.
|
|
18
|
+
active_record
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
# cache
|
|
26
|
-
# dirty
|
|
27
|
-
# fallbacks
|
|
28
|
-
# presence
|
|
29
|
-
# default
|
|
30
|
-
# attribute_methods
|
|
31
|
-
# fallthrough_accessors
|
|
32
|
-
# locale_accessors
|
|
33
|
-
# ]
|
|
20
|
+
# Accessors
|
|
21
|
+
#
|
|
22
|
+
# Define reader and writer methods for translated attributes. Remove either
|
|
23
|
+
# to disable globally, or pass +reader: false+ or +writer: false+ to
|
|
24
|
+
# +translates+ in any translated model.
|
|
25
|
+
#
|
|
26
|
+
reader
|
|
27
|
+
writer
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
# Backend Reader
|
|
30
|
+
#
|
|
31
|
+
# Defines reader to access the backend for any attribute, of the form
|
|
32
|
+
# +<attribute>_backend+.
|
|
33
|
+
#
|
|
34
|
+
backend_reader
|
|
35
|
+
#
|
|
36
|
+
# Or pass an interpolation string to define a different pattern:
|
|
37
|
+
# backend_reader "%s_translations"
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
# Query
|
|
40
|
+
#
|
|
41
|
+
# Defines a scope on the model class which allows querying on
|
|
42
|
+
# translated attributes. The default scope is named +i18n+, pass a different
|
|
43
|
+
# name as default to change the global default, or to +translates+ in any
|
|
44
|
+
# model to change it for that model alone.
|
|
45
|
+
#
|
|
46
|
+
query
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
# config.default_options[:fallbacks] = true
|
|
48
|
+
# Cache
|
|
49
|
+
#
|
|
50
|
+
# Comment out to disable caching reads and writes.
|
|
51
|
+
#
|
|
52
|
+
cache
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
# Dirty
|
|
55
|
+
#
|
|
56
|
+
# Uncomment this line to include and enable globally:
|
|
57
|
+
# dirty
|
|
58
|
+
#
|
|
59
|
+
# Or uncomment this line to include but disable by default, and only enable
|
|
60
|
+
# per model by passing +dirty: true+ to +translates+.
|
|
61
|
+
# dirty false
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
# Fallbacks
|
|
64
|
+
#
|
|
65
|
+
# Uncomment line below to enable fallbacks, using +I18n.fallbacks+.
|
|
66
|
+
# fallbacks
|
|
67
|
+
#
|
|
68
|
+
# Or uncomment this line to enable fallbacks with a global default.
|
|
69
|
+
# fallbacks { :pt => :en }
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
# Presence
|
|
72
|
+
#
|
|
73
|
+
# Converts blank strings to nil on reads and writes. Comment out to
|
|
74
|
+
# disable.
|
|
75
|
+
#
|
|
76
|
+
presence
|
|
70
77
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
#
|
|
79
|
-
# Note: The dirty plugin enables fallthrough_accessors by default.
|
|
80
|
-
#
|
|
81
|
-
# config.default_options[:fallthrough_accessors] = true
|
|
78
|
+
# Default
|
|
79
|
+
#
|
|
80
|
+
# Set a default translation per attributes. When enabled, passing +default:
|
|
81
|
+
# 'foo'+ sets a default translation string to show in case no translation is
|
|
82
|
+
# present. Can also be passed a proc.
|
|
83
|
+
#
|
|
84
|
+
# default 'foo'
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
# Fallthrough Accessors
|
|
87
|
+
#
|
|
88
|
+
# Uses method_missing to define locale-specific accessor methods like
|
|
89
|
+
# +title_en+, +title_en=+, +title_fr+, +title_fr=+ for each translated
|
|
90
|
+
# attribute. If you know what set of locales you want to support, it's
|
|
91
|
+
# generally better to use Locale Accessors (or both together) since
|
|
92
|
+
# +method_missing+ is very slow. (You can use both fallthrough and locale
|
|
93
|
+
# accessor plugins together without conflict.)
|
|
94
|
+
#
|
|
95
|
+
# fallthrough_accessors
|
|
96
|
+
|
|
97
|
+
# Locale Accessors
|
|
98
|
+
#
|
|
99
|
+
# Uses +def+ to define accessor methods for a set of locales. By default uses
|
|
100
|
+
# +I18n.available_locales+, but you can pass the set of locales with
|
|
101
|
+
# +translates+ and/or set a global default here.
|
|
102
|
+
#
|
|
103
|
+
# locale_accessors
|
|
104
|
+
#
|
|
105
|
+
# Or define specific defaults by uncommenting line below
|
|
106
|
+
# locale_accessors [:en, :ja]
|
|
107
|
+
end
|
|
90
108
|
end
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mobility
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0.beta2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Salzberg
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain:
|
|
11
11
|
- |
|
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
|
34
34
|
gSQml7TqcC6dZRsZRwYqzD9kUwdAJoCqno2CBUKs2l0yQAjFT36lRrVJznb7uWwa
|
|
35
35
|
xpPFnsrtyaZW6Dty8TSG3qzmeGpmpIotA8x1VA==
|
|
36
36
|
-----END CERTIFICATE-----
|
|
37
|
-
date: 2020-
|
|
37
|
+
date: 2020-11-11 00:00:00.000000000 Z
|
|
38
38
|
dependencies:
|
|
39
39
|
- !ruby/object:Gem::Dependency
|
|
40
40
|
name: request_store
|
|
@@ -156,23 +156,15 @@ files:
|
|
|
156
156
|
- README.md
|
|
157
157
|
- Rakefile
|
|
158
158
|
- lib/mobility.rb
|
|
159
|
-
- lib/mobility/active_model.rb
|
|
160
|
-
- lib/mobility/active_model/backend_resetter.rb
|
|
161
|
-
- lib/mobility/active_record.rb
|
|
162
|
-
- lib/mobility/active_record/backend_resetter.rb
|
|
163
159
|
- lib/mobility/active_record/model_translation.rb
|
|
164
160
|
- lib/mobility/active_record/string_translation.rb
|
|
165
161
|
- lib/mobility/active_record/text_translation.rb
|
|
166
162
|
- lib/mobility/active_record/translation.rb
|
|
167
|
-
- lib/mobility/active_record/uniqueness_validator.rb
|
|
168
163
|
- lib/mobility/arel.rb
|
|
169
164
|
- lib/mobility/arel/nodes.rb
|
|
170
165
|
- lib/mobility/arel/nodes/pg_ops.rb
|
|
171
166
|
- lib/mobility/arel/visitor.rb
|
|
172
|
-
- lib/mobility/attributes.rb
|
|
173
167
|
- lib/mobility/backend.rb
|
|
174
|
-
- lib/mobility/backend/orm_delegator.rb
|
|
175
|
-
- lib/mobility/backend_resetter.rb
|
|
176
168
|
- lib/mobility/backends.rb
|
|
177
169
|
- lib/mobility/backends/active_record.rb
|
|
178
170
|
- lib/mobility/backends/active_record/column.rb
|
|
@@ -186,6 +178,7 @@ files:
|
|
|
186
178
|
- lib/mobility/backends/active_record/table.rb
|
|
187
179
|
- lib/mobility/backends/column.rb
|
|
188
180
|
- lib/mobility/backends/container.rb
|
|
181
|
+
- lib/mobility/backends/hash.rb
|
|
189
182
|
- lib/mobility/backends/hash_valued.rb
|
|
190
183
|
- lib/mobility/backends/hstore.rb
|
|
191
184
|
- lib/mobility/backends/json.rb
|
|
@@ -204,20 +197,23 @@ files:
|
|
|
204
197
|
- lib/mobility/backends/sequel/table.rb
|
|
205
198
|
- lib/mobility/backends/serialized.rb
|
|
206
199
|
- lib/mobility/backends/table.rb
|
|
207
|
-
- lib/mobility/
|
|
208
|
-
- lib/mobility/
|
|
209
|
-
- lib/mobility/interface.rb
|
|
210
|
-
- lib/mobility/loaded.rb
|
|
200
|
+
- lib/mobility/pluggable.rb
|
|
201
|
+
- lib/mobility/plugin.rb
|
|
211
202
|
- lib/mobility/plugins.rb
|
|
212
203
|
- lib/mobility/plugins/active_model.rb
|
|
204
|
+
- lib/mobility/plugins/active_model/cache.rb
|
|
213
205
|
- lib/mobility/plugins/active_model/dirty.rb
|
|
214
206
|
- lib/mobility/plugins/active_record.rb
|
|
215
|
-
- lib/mobility/plugins/active_record/
|
|
207
|
+
- lib/mobility/plugins/active_record/backend.rb
|
|
208
|
+
- lib/mobility/plugins/active_record/cache.rb
|
|
216
209
|
- lib/mobility/plugins/active_record/dirty.rb
|
|
217
210
|
- lib/mobility/plugins/active_record/query.rb
|
|
211
|
+
- lib/mobility/plugins/active_record/uniqueness_validation.rb
|
|
218
212
|
- lib/mobility/plugins/attribute_methods.rb
|
|
213
|
+
- lib/mobility/plugins/attributes.rb
|
|
214
|
+
- lib/mobility/plugins/backend.rb
|
|
215
|
+
- lib/mobility/plugins/backend_reader.rb
|
|
219
216
|
- lib/mobility/plugins/cache.rb
|
|
220
|
-
- lib/mobility/plugins/cache/translation_cacher.rb
|
|
221
217
|
- lib/mobility/plugins/default.rb
|
|
222
218
|
- lib/mobility/plugins/dirty.rb
|
|
223
219
|
- lib/mobility/plugins/fallbacks.rb
|
|
@@ -225,11 +221,13 @@ files:
|
|
|
225
221
|
- lib/mobility/plugins/locale_accessors.rb
|
|
226
222
|
- lib/mobility/plugins/presence.rb
|
|
227
223
|
- lib/mobility/plugins/query.rb
|
|
224
|
+
- lib/mobility/plugins/reader.rb
|
|
228
225
|
- lib/mobility/plugins/sequel.rb
|
|
226
|
+
- lib/mobility/plugins/sequel/backend.rb
|
|
227
|
+
- lib/mobility/plugins/sequel/cache.rb
|
|
229
228
|
- lib/mobility/plugins/sequel/dirty.rb
|
|
230
229
|
- lib/mobility/plugins/sequel/query.rb
|
|
231
|
-
- lib/mobility/
|
|
232
|
-
- lib/mobility/sequel/backend_resetter.rb
|
|
230
|
+
- lib/mobility/plugins/writer.rb
|
|
233
231
|
- lib/mobility/sequel/column_changes.rb
|
|
234
232
|
- lib/mobility/sequel/hash_initializer.rb
|
|
235
233
|
- lib/mobility/sequel/model_translation.rb
|
|
@@ -237,7 +235,7 @@ files:
|
|
|
237
235
|
- lib/mobility/sequel/string_translation.rb
|
|
238
236
|
- lib/mobility/sequel/text_translation.rb
|
|
239
237
|
- lib/mobility/sequel/translation.rb
|
|
240
|
-
- lib/mobility/
|
|
238
|
+
- lib/mobility/translations.rb
|
|
241
239
|
- lib/mobility/util.rb
|
|
242
240
|
- lib/mobility/version.rb
|
|
243
241
|
- lib/rails/generators/mobility/active_record_migration_compatibility.rb
|
|
@@ -257,8 +255,11 @@ files:
|
|
|
257
255
|
homepage: https://github.com/shioyama/mobility
|
|
258
256
|
licenses:
|
|
259
257
|
- MIT
|
|
260
|
-
metadata:
|
|
261
|
-
|
|
258
|
+
metadata:
|
|
259
|
+
homepage_uri: https://github.com/shioyama/mobility
|
|
260
|
+
source_code_uri: https://github.com/shioyama/mobility
|
|
261
|
+
changelog_uri: https://github.com/shioyama/mobility/blob/master/CHANGELOG.md
|
|
262
|
+
post_install_message:
|
|
262
263
|
rdoc_options: []
|
|
263
264
|
require_paths:
|
|
264
265
|
- lib
|
|
@@ -266,15 +267,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
266
267
|
requirements:
|
|
267
268
|
- - ">="
|
|
268
269
|
- !ruby/object:Gem::Version
|
|
269
|
-
version: 2.
|
|
270
|
+
version: '2.5'
|
|
270
271
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
272
|
requirements:
|
|
272
|
-
- - "
|
|
273
|
+
- - ">"
|
|
273
274
|
- !ruby/object:Gem::Version
|
|
274
|
-
version:
|
|
275
|
+
version: 1.3.1
|
|
275
276
|
requirements: []
|
|
276
|
-
rubygems_version: 3.
|
|
277
|
-
signing_key:
|
|
277
|
+
rubygems_version: 3.1.2
|
|
278
|
+
signing_key:
|
|
278
279
|
specification_version: 4
|
|
279
280
|
summary: Pluggable Ruby translation framework
|
|
280
281
|
test_files: []
|