globalize 5.3.1 → 7.0.0
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
- data/Appraisals +14 -9
- data/CHANGELOG.md +34 -0
- data/CONTRIBUTING.md +5 -7
- data/Gemfile +25 -0
- data/Gemfile.lock +102 -0
- data/README.md +43 -48
- data/Rakefile +22 -17
- data/lib/globalize/active_record/act_macro.rb +22 -22
- data/lib/globalize/active_record/adapter_dirty.rb +24 -3
- data/lib/globalize/active_record/class_methods.rb +20 -7
- data/lib/globalize/active_record/instance_methods.rb +38 -30
- data/lib/globalize/active_record/migration.rb +4 -3
- data/lib/globalize/active_record/translated_attributes_query.rb +0 -17
- data/lib/globalize/version.rb +1 -1
- data/lib/globalize.rb +18 -8
- data/lib/patches/active_record/{rails5_1 → rails6_1}/serialization.rb +2 -2
- data/lib/patches/active_record/{rails5_1 → rails6_1}/uniqueness_validator.rb +1 -1
- data/lib/patches/active_record/rails7_1/serialization.rb +28 -0
- data/lib/patches/active_record/rails7_2/serialization.rb +15 -0
- data/lib/patches/active_record/relation.rb +12 -9
- data/lib/patches/active_record/serialization.rb +6 -4
- data/lib/patches/active_record/uniqueness_validator.rb +1 -7
- data/lib/patches/active_support/inflections.rb +12 -0
- metadata +41 -39
- data/docker-compose.yml +0 -22
- data/globalize.gemspec +0 -32
- data/issue_template.rb +0 -38
- data/lib/patches/active_record/query_method.rb +0 -3
- data/lib/patches/active_record/rails4/query_method.rb +0 -35
- data/lib/patches/active_record/rails4/serialization.rb +0 -22
- data/lib/patches/active_record/rails4/uniqueness_validator.rb +0 -42
- data/lib/patches/active_record/rails5/uniqueness_validator.rb +0 -47
@@ -42,9 +42,6 @@ module Globalize
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def _reset_attribute name
|
45
|
-
original_value = record.changed_attributes[name]
|
46
|
-
record.send(:clear_attribute_changes, [name])
|
47
|
-
record.send("#{name}=", original_value)
|
48
45
|
record.send(:clear_attribute_changes, [name])
|
49
46
|
end
|
50
47
|
|
@@ -53,6 +50,30 @@ module Globalize
|
|
53
50
|
super
|
54
51
|
end
|
55
52
|
|
53
|
+
def changed_attributes(locale)
|
54
|
+
Hash[changes(locale).map { |name, change| [name, change.first] }]
|
55
|
+
end
|
56
|
+
|
57
|
+
def changed
|
58
|
+
stash.keys.flat_map { |locale| changes(locale).keys }.uniq
|
59
|
+
end
|
60
|
+
|
61
|
+
def changes(locale)
|
62
|
+
stash[locale].keys.inject({}) do |hash, name|
|
63
|
+
next hash unless dirty[name].is_a?(Hash)
|
64
|
+
next hash unless dirty[name].key?(locale)
|
65
|
+
|
66
|
+
new_value = stash[locale][name]
|
67
|
+
old_value = dirty[name][locale]
|
68
|
+
|
69
|
+
unless new_value == old_value
|
70
|
+
hash[name] = [old_value, new_value]
|
71
|
+
end
|
72
|
+
|
73
|
+
hash
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
56
77
|
end
|
57
78
|
end
|
58
79
|
end
|
@@ -3,12 +3,6 @@ module Globalize
|
|
3
3
|
module ClassMethods
|
4
4
|
delegate :translated_locales, :set_translations_table_name, :to => :translation_class
|
5
5
|
|
6
|
-
if ::ActiveRecord::VERSION::STRING < "5.0.0"
|
7
|
-
def columns_hash
|
8
|
-
super.except(*translated_attribute_names.map(&:to_s))
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
6
|
def with_locales(*locales)
|
13
7
|
all.merge translation_class.with_locales(*locales)
|
14
8
|
end
|
@@ -120,10 +114,29 @@ module Globalize
|
|
120
114
|
end
|
121
115
|
|
122
116
|
def define_translations_accessor(name)
|
123
|
-
attribute(name, ::ActiveRecord::Type::Value.new)
|
117
|
+
attribute(name, ::ActiveRecord::Type::Value.new)
|
124
118
|
define_translations_reader(name)
|
125
119
|
define_translations_writer(name)
|
126
120
|
end
|
121
|
+
|
122
|
+
def database_connection_possible?
|
123
|
+
begin
|
124
|
+
# Without a connection tentative, the `connected?` function can responds with a false negative
|
125
|
+
if Globalize.rails_7_2?
|
126
|
+
connection = ::ActiveRecord::Base.lease_connection
|
127
|
+
connection.connect!
|
128
|
+
else
|
129
|
+
::ActiveRecord::Base.connection
|
130
|
+
end
|
131
|
+
rescue
|
132
|
+
# Ignore connection fail because in docker build hasn't a database connection
|
133
|
+
nil
|
134
|
+
end
|
135
|
+
|
136
|
+
::ActiveRecord::Base.connected? &&
|
137
|
+
table_exists? &&
|
138
|
+
translation_class.table_exists?
|
139
|
+
end
|
127
140
|
end
|
128
141
|
end
|
129
142
|
end
|
@@ -17,24 +17,9 @@ module Globalize
|
|
17
17
|
with_given_locale(attributes) { super(attributes.except("locale"), *options) }
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# in the stack (before *assign_attributes*)
|
24
|
-
# See https://github.com/rails/rails/blob/master/activerecord/lib/active_record/attribute_assignment.rb#L11
|
25
|
-
def _assign_attributes(new_attributes)
|
26
|
-
attributes = new_attributes.stringify_keys
|
27
|
-
with_given_locale(attributes) { super(attributes.except("locale")) }
|
28
|
-
end
|
29
|
-
|
30
|
-
else
|
31
|
-
|
32
|
-
def assign_attributes(new_attributes, *options)
|
33
|
-
super unless new_attributes.respond_to?(:stringify_keys) && new_attributes.present?
|
34
|
-
attributes = new_attributes.stringify_keys
|
35
|
-
with_given_locale(attributes) { super(attributes.except("locale"), *options) }
|
36
|
-
end
|
37
|
-
|
20
|
+
def _assign_attributes(new_attributes)
|
21
|
+
attributes = new_attributes.stringify_keys
|
22
|
+
with_given_locale(attributes) { super(attributes.except("locale")) }
|
38
23
|
end
|
39
24
|
|
40
25
|
def write_attribute(name, value, *args, &block)
|
@@ -158,18 +143,20 @@ module Globalize
|
|
158
143
|
Globalize.fallbacks(locale)
|
159
144
|
end
|
160
145
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
146
|
+
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
147
|
+
def save(...)
|
148
|
+
result = Globalize.with_locale(translation.locale || I18n.default_locale) do
|
149
|
+
without_fallbacks do
|
150
|
+
super
|
151
|
+
end
|
152
|
+
end
|
153
|
+
if result
|
154
|
+
globalize.clear_dirty
|
165
155
|
end
|
166
|
-
end
|
167
|
-
if result
|
168
|
-
globalize.clear_dirty
|
169
|
-
end
|
170
156
|
|
171
|
-
|
172
|
-
|
157
|
+
result
|
158
|
+
end
|
159
|
+
RUBY
|
173
160
|
|
174
161
|
def column_for_attribute name
|
175
162
|
return super if translated_attribute_names.exclude?(name)
|
@@ -185,8 +172,29 @@ module Globalize
|
|
185
172
|
changed_attributes.present? || translations.any?(&:changed?)
|
186
173
|
end
|
187
174
|
|
188
|
-
|
189
|
-
|
175
|
+
def saved_changes
|
176
|
+
super.tap do |changes|
|
177
|
+
translation = translation_for(::Globalize.locale, false)
|
178
|
+
if translation
|
179
|
+
translation_changes = translation.saved_changes.select { |name| translated?(name) }
|
180
|
+
changes.merge!(translation_changes) if translation_changes.any?
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def changed_attributes
|
186
|
+
super.merge(globalize.changed_attributes(::Globalize.locale))
|
187
|
+
end
|
188
|
+
|
189
|
+
def changes
|
190
|
+
super.merge(globalize.changes(::Globalize.locale))
|
191
|
+
end
|
192
|
+
|
193
|
+
def changed
|
194
|
+
super.concat(globalize.changed).uniq
|
195
|
+
end
|
196
|
+
|
197
|
+
# need to access instance variable directly since changed_attributes is frozen
|
190
198
|
def original_changed_attributes
|
191
199
|
@changed_attributes
|
192
200
|
end
|
@@ -62,6 +62,7 @@ module Globalize
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def drop_translation_table!(options = {})
|
65
|
+
add_missing_columns if options[:create_source_columns]
|
65
66
|
move_data_to_model_table if options[:migrate_data]
|
66
67
|
drop_translations_index
|
67
68
|
drop_translation_table
|
@@ -92,7 +93,7 @@ module Globalize
|
|
92
93
|
connection.change_table(translations_table_name) do |t|
|
93
94
|
fields.each do |name, options|
|
94
95
|
if options.is_a? Hash
|
95
|
-
t.column name, options.delete(:type), options
|
96
|
+
t.column name, options.delete(:type), **options
|
96
97
|
else
|
97
98
|
t.column name, options
|
98
99
|
end
|
@@ -148,14 +149,14 @@ module Globalize
|
|
148
149
|
end
|
149
150
|
|
150
151
|
def move_data_to_model_table
|
151
|
-
add_missing_columns
|
152
|
-
|
153
152
|
# Find all of the translated attributes for all records in the model.
|
154
153
|
all_translated_attributes = model.all.collect{|m| m.attributes}
|
155
154
|
all_translated_attributes.each do |translated_record|
|
156
155
|
# Create a hash containing the translated column names and their values.
|
157
156
|
translated_attribute_names.inject(fields_to_update={}) do |f, name|
|
158
157
|
f.update({name.to_sym => translated_record[name.to_s]})
|
158
|
+
# Remove attributes that will no longer be translated
|
159
|
+
translated_attribute_names.delete(name)
|
159
160
|
end
|
160
161
|
|
161
162
|
# Now, update the actual model's record with the hash.
|
@@ -99,23 +99,6 @@ module Globalize
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
-
if ::ActiveRecord::VERSION::STRING < "5.0.0"
|
103
|
-
def where_values_hash(*args)
|
104
|
-
return super unless respond_to?(:translations_table_name)
|
105
|
-
equalities = respond_to?(:with_default_scope) ? with_default_scope.where_values : where_values
|
106
|
-
equalities = equalities.grep(Arel::Nodes::Equality).find_all { |node|
|
107
|
-
node.left.relation.name == translations_table_name
|
108
|
-
}
|
109
|
-
|
110
|
-
binds = Hash[bind_values.find_all(&:first).map { |column, v| [column.name, v] }]
|
111
|
-
|
112
|
-
super.merge(Hash[equalities.map { |where|
|
113
|
-
name = where.left.name
|
114
|
-
[name, binds.fetch(name.to_s) { right = where.right; right.is_a?(Arel::Nodes::Casted) ? right.val : right }]
|
115
|
-
}])
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
102
|
def join_translations(relation = self)
|
120
103
|
if relation.joins_values.include?(:translations)
|
121
104
|
relation
|
data/lib/globalize/version.rb
CHANGED
data/lib/globalize.rb
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
require 'request_store'
|
2
2
|
require 'active_record'
|
3
3
|
require 'patches/active_record/xml_attribute_serializer'
|
4
|
-
require 'patches/active_record/query_method'
|
5
4
|
require 'patches/active_record/relation'
|
6
5
|
require 'patches/active_record/serialization'
|
7
6
|
require 'patches/active_record/uniqueness_validator'
|
8
7
|
require 'patches/active_record/persistence'
|
8
|
+
require 'patches/active_support/inflections'
|
9
9
|
|
10
10
|
module Globalize
|
11
11
|
autoload :ActiveRecord, 'globalize/active_record'
|
12
12
|
autoload :Interpolation, 'globalize/interpolation'
|
13
13
|
|
14
|
+
ACTIVE_RECORD_7 = Gem::Version.new('7.0.0')
|
15
|
+
ACTIVE_RECORD_71 = Gem::Version.new('7.1.0')
|
16
|
+
ACTIVE_RECORD_72 = Gem::Version.new('7.2.0')
|
17
|
+
|
14
18
|
class << self
|
15
19
|
def locale
|
16
20
|
read_locale || I18n.locale
|
@@ -58,12 +62,16 @@ module Globalize
|
|
58
62
|
RequestStore.store
|
59
63
|
end
|
60
64
|
|
61
|
-
def
|
62
|
-
::ActiveRecord.version >=
|
65
|
+
def rails_7?
|
66
|
+
::ActiveRecord.version >= ACTIVE_RECORD_7
|
67
|
+
end
|
68
|
+
|
69
|
+
def rails_7_1?
|
70
|
+
::ActiveRecord.version >= ACTIVE_RECORD_71
|
63
71
|
end
|
64
72
|
|
65
|
-
def
|
66
|
-
::ActiveRecord.version >=
|
73
|
+
def rails_7_2?
|
74
|
+
::ActiveRecord.version >= ACTIVE_RECORD_72
|
67
75
|
end
|
68
76
|
|
69
77
|
protected
|
@@ -92,7 +100,9 @@ module Globalize
|
|
92
100
|
end
|
93
101
|
end
|
94
102
|
|
95
|
-
|
96
|
-
ActiveRecord::Base.globalize_serialized_attributes
|
103
|
+
ActiveSupport.on_load(:active_record) do
|
104
|
+
ActiveRecord::Base.class_attribute :globalize_serialized_attributes, instance_writer: false
|
105
|
+
ActiveRecord::Base.globalize_serialized_attributes = {}
|
97
106
|
|
98
|
-
ActiveRecord::Base.extend(Globalize::ActiveRecord::ActMacro)
|
107
|
+
ActiveRecord::Base.extend(Globalize::ActiveRecord::ActMacro)
|
108
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Globalize
|
2
2
|
module AttributeMethods
|
3
3
|
module Serialization
|
4
|
-
def serialize(attr_name, class_name_or_coder = Object)
|
5
|
-
super(attr_name, class_name_or_coder)
|
4
|
+
def serialize(attr_name, class_name_or_coder = Object, **options)
|
5
|
+
super(attr_name, class_name_or_coder, **options)
|
6
6
|
|
7
7
|
coder = if class_name_or_coder == ::JSON
|
8
8
|
::ActiveRecord::Coders::JSON
|
@@ -32,7 +32,7 @@ module Globalize
|
|
32
32
|
if relation.exists?
|
33
33
|
error_options = options.except(:case_sensitive, :scope, :conditions)
|
34
34
|
error_options[:value] = value
|
35
|
-
record.errors.add(attribute, :taken, error_options)
|
35
|
+
record.errors.add(attribute, :taken, **error_options)
|
36
36
|
end
|
37
37
|
else
|
38
38
|
super(record, attribute, value)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Globalize
|
2
|
+
module AttributeMethods
|
3
|
+
module Serialization
|
4
|
+
def serialize(attr_name, class_name_or_coder = nil, **options)
|
5
|
+
self.globalize_serialized_attributes = globalize_serialized_attributes.dup
|
6
|
+
|
7
|
+
if class_name_or_coder.nil?
|
8
|
+
self.globalize_serialized_attributes[attr_name] = options
|
9
|
+
|
10
|
+
super(attr_name, **options)
|
11
|
+
elsif class_name_or_coder.is_a?(Hash)
|
12
|
+
self.globalize_serialized_attributes[attr_name] = class_name_or_coder
|
13
|
+
|
14
|
+
# https://github.com/rails/rails/blob/7-2-stable/activerecord/lib/active_record/attribute_methods/serialization.rb#L183
|
15
|
+
super(attr_name, **class_name_or_coder)
|
16
|
+
else
|
17
|
+
self.globalize_serialized_attributes[attr_name] = [class_name_or_coder, options]
|
18
|
+
|
19
|
+
# this is only needed for ACTIVE_RECORD_71. class_name_or_coder will be removed with Rails 7.2
|
20
|
+
# https://github.com/rails/rails/blob/7-1-stable/activerecord/lib/active_record/attribute_methods/serialization.rb#L183
|
21
|
+
super(attr_name, class_name_or_coder, **options)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
ActiveRecord::AttributeMethods::Serialization::ClassMethods.send(:prepend, Globalize::AttributeMethods::Serialization)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Globalize
|
2
|
+
module AttributeMethods
|
3
|
+
module Serialization
|
4
|
+
def serialize(attr_name, **options)
|
5
|
+
self.globalize_serialized_attributes = globalize_serialized_attributes.dup
|
6
|
+
self.globalize_serialized_attributes[attr_name] = options
|
7
|
+
|
8
|
+
# https://github.com/rails/rails/blob/7-2-stable/activerecord/lib/active_record/attribute_methods/serialization.rb#L183
|
9
|
+
super(attr_name, **options)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
ActiveRecord::AttributeMethods::Serialization::ClassMethods.send(:prepend, Globalize::AttributeMethods::Serialization)
|
@@ -1,12 +1,15 @@
|
|
1
|
-
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
module Globalize
|
2
|
+
module Relation
|
3
|
+
def where_values_hash(relation_table_name = table_name)
|
4
|
+
return super unless respond_to?(:translations_table_name)
|
5
|
+
super.merge(super(translations_table_name))
|
6
|
+
end
|
7
|
+
|
8
|
+
def scope_for_create
|
9
|
+
return super unless respond_to?(:translations_table_name)
|
10
|
+
super.merge(where_values_hash(translations_table_name))
|
8
11
|
end
|
9
12
|
end
|
13
|
+
end
|
10
14
|
|
11
|
-
|
12
|
-
end
|
15
|
+
ActiveRecord::Relation.prepend Globalize::Relation
|
@@ -1,5 +1,7 @@
|
|
1
|
-
if ::ActiveRecord
|
2
|
-
require_relative '
|
1
|
+
if ::ActiveRecord.version < Gem::Version.new("7.1.0")
|
2
|
+
require_relative 'rails6_1/serialization'
|
3
|
+
elsif ::ActiveRecord.version < Gem::Version.new("7.2.0")
|
4
|
+
require_relative 'rails7_1/serialization'
|
3
5
|
else
|
4
|
-
require_relative '
|
5
|
-
end
|
6
|
+
require_relative 'rails7_2/serialization'
|
7
|
+
end
|
@@ -1,7 +1 @@
|
|
1
|
-
|
2
|
-
require_relative 'rails4/uniqueness_validator'
|
3
|
-
elsif ::ActiveRecord::VERSION::STRING < "5.1.0"
|
4
|
-
require_relative 'rails5/uniqueness_validator'
|
5
|
-
else
|
6
|
-
require_relative 'rails5_1/uniqueness_validator'
|
7
|
-
end
|
1
|
+
require_relative 'rails6_1/uniqueness_validator'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Globalize
|
2
|
+
module Inflections
|
3
|
+
def instance_or_fallback(locale)
|
4
|
+
I18n.respond_to?(:fallbacks) && I18n.fallbacks[locale].each do |k|
|
5
|
+
return @__instance__[k] if @__instance__.key?(k)
|
6
|
+
end
|
7
|
+
instance(locale)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
ActiveSupport::Inflector::Inflections.singleton_class.send :prepend, Globalize::Inflections
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globalize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Fuchs
|
@@ -11,51 +11,71 @@ authors:
|
|
11
11
|
- Tomasz Stachewicz
|
12
12
|
- Philip Arndt
|
13
13
|
- Chris Salzberg
|
14
|
-
autorequire:
|
14
|
+
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2024-12-19 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
|
+
- !ruby/object:Gem::Dependency
|
20
|
+
name: activesupport
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '7.0'
|
26
|
+
- - "<"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '8.1'
|
29
|
+
type: :runtime
|
30
|
+
prerelease: false
|
31
|
+
version_requirements: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '7.0'
|
36
|
+
- - "<"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '8.1'
|
19
39
|
- !ruby/object:Gem::Dependency
|
20
40
|
name: activerecord
|
21
41
|
requirement: !ruby/object:Gem::Requirement
|
22
42
|
requirements:
|
23
43
|
- - ">="
|
24
44
|
- !ruby/object:Gem::Version
|
25
|
-
version: '
|
45
|
+
version: '7.0'
|
26
46
|
- - "<"
|
27
47
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
48
|
+
version: '8.1'
|
29
49
|
type: :runtime
|
30
50
|
prerelease: false
|
31
51
|
version_requirements: !ruby/object:Gem::Requirement
|
32
52
|
requirements:
|
33
53
|
- - ">="
|
34
54
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
55
|
+
version: '7.0'
|
36
56
|
- - "<"
|
37
57
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
58
|
+
version: '8.1'
|
39
59
|
- !ruby/object:Gem::Dependency
|
40
60
|
name: activemodel
|
41
61
|
requirement: !ruby/object:Gem::Requirement
|
42
62
|
requirements:
|
43
63
|
- - ">="
|
44
64
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
65
|
+
version: '7.0'
|
46
66
|
- - "<"
|
47
67
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
68
|
+
version: '8.1'
|
49
69
|
type: :runtime
|
50
70
|
prerelease: false
|
51
71
|
version_requirements: !ruby/object:Gem::Requirement
|
52
72
|
requirements:
|
53
73
|
- - ">="
|
54
74
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
75
|
+
version: '7.0'
|
56
76
|
- - "<"
|
57
77
|
- !ruby/object:Gem::Version
|
58
|
-
version: '
|
78
|
+
version: '8.1'
|
59
79
|
- !ruby/object:Gem::Dependency
|
60
80
|
name: request_store
|
61
81
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,20 +202,6 @@ dependencies:
|
|
182
202
|
- - ">="
|
183
203
|
- !ruby/object:Gem::Version
|
184
204
|
version: '0'
|
185
|
-
- !ruby/object:Gem::Dependency
|
186
|
-
name: sqlite3
|
187
|
-
requirement: !ruby/object:Gem::Requirement
|
188
|
-
requirements:
|
189
|
-
- - ">="
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
version: '0'
|
192
|
-
type: :development
|
193
|
-
prerelease: false
|
194
|
-
version_requirements: !ruby/object:Gem::Requirement
|
195
|
-
requirements:
|
196
|
-
- - ">="
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
version: '0'
|
199
205
|
description: Rails I18n de-facto standard library for ActiveRecord model/data translation.
|
200
206
|
email: nobody@globalize-rails.org
|
201
207
|
executables: []
|
@@ -206,12 +212,10 @@ files:
|
|
206
212
|
- CHANGELOG.md
|
207
213
|
- CONTRIBUTING.md
|
208
214
|
- Gemfile
|
215
|
+
- Gemfile.lock
|
209
216
|
- LICENSE
|
210
217
|
- README.md
|
211
218
|
- Rakefile
|
212
|
-
- docker-compose.yml
|
213
|
-
- globalize.gemspec
|
214
|
-
- issue_template.rb
|
215
219
|
- lib/globalize.rb
|
216
220
|
- lib/globalize/active_record.rb
|
217
221
|
- lib/globalize/active_record/act_macro.rb
|
@@ -229,22 +233,20 @@ files:
|
|
229
233
|
- lib/i18n/missing_translations_log_handler.rb
|
230
234
|
- lib/i18n/missing_translations_raise_handler.rb
|
231
235
|
- lib/patches/active_record/persistence.rb
|
232
|
-
- lib/patches/active_record/
|
233
|
-
- lib/patches/active_record/
|
234
|
-
- lib/patches/active_record/
|
235
|
-
- lib/patches/active_record/
|
236
|
-
- lib/patches/active_record/rails5/uniqueness_validator.rb
|
237
|
-
- lib/patches/active_record/rails5_1/serialization.rb
|
238
|
-
- lib/patches/active_record/rails5_1/uniqueness_validator.rb
|
236
|
+
- lib/patches/active_record/rails6_1/serialization.rb
|
237
|
+
- lib/patches/active_record/rails6_1/uniqueness_validator.rb
|
238
|
+
- lib/patches/active_record/rails7_1/serialization.rb
|
239
|
+
- lib/patches/active_record/rails7_2/serialization.rb
|
239
240
|
- lib/patches/active_record/relation.rb
|
240
241
|
- lib/patches/active_record/serialization.rb
|
241
242
|
- lib/patches/active_record/uniqueness_validator.rb
|
242
243
|
- lib/patches/active_record/xml_attribute_serializer.rb
|
244
|
+
- lib/patches/active_support/inflections.rb
|
243
245
|
homepage: http://github.com/globalize/globalize
|
244
246
|
licenses:
|
245
247
|
- MIT
|
246
248
|
metadata: {}
|
247
|
-
post_install_message:
|
249
|
+
post_install_message:
|
248
250
|
rdoc_options: []
|
249
251
|
require_paths:
|
250
252
|
- lib
|
@@ -252,15 +254,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
252
254
|
requirements:
|
253
255
|
- - ">="
|
254
256
|
- !ruby/object:Gem::Version
|
255
|
-
version:
|
257
|
+
version: '3.0'
|
256
258
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
259
|
requirements:
|
258
260
|
- - ">="
|
259
261
|
- !ruby/object:Gem::Version
|
260
262
|
version: '0'
|
261
263
|
requirements: []
|
262
|
-
rubygems_version: 3.
|
263
|
-
signing_key:
|
264
|
+
rubygems_version: 3.5.22
|
265
|
+
signing_key:
|
264
266
|
specification_version: 4
|
265
267
|
summary: Rails I18n de-facto standard library for ActiveRecord model/data translation
|
266
268
|
test_files: []
|
data/docker-compose.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
version: '3.7'
|
2
|
-
services:
|
3
|
-
postgres:
|
4
|
-
image: postgres:11
|
5
|
-
volumes:
|
6
|
-
- ./tmp/postgres:/var/lib/postgresql/data
|
7
|
-
ports:
|
8
|
-
- "5432:5432"
|
9
|
-
environment:
|
10
|
-
POSTGRES_USER: "postgres"
|
11
|
-
POSTGRES_PASSWORD: ""
|
12
|
-
mysql:
|
13
|
-
image: mysql:8.0
|
14
|
-
volumes:
|
15
|
-
- ./tmp/mysql:/var/lib/mysql
|
16
|
-
ports:
|
17
|
-
- "3306:3306"
|
18
|
-
environment:
|
19
|
-
MYSQL_USER: "root"
|
20
|
-
MYSQL_PASSWORD: ""
|
21
|
-
MYSQL_ROOT_PASSWORD: ""
|
22
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
data/globalize.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path('../lib/globalize/version', __FILE__)
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = 'globalize'
|
5
|
-
s.version = Globalize::Version
|
6
|
-
s.authors = ['Sven Fuchs', 'Joshua Harvey', 'Clemens Kofler', 'John-Paul Bader', 'Tomasz Stachewicz', 'Philip Arndt', 'Chris Salzberg']
|
7
|
-
s.email = 'nobody@globalize-rails.org'
|
8
|
-
s.homepage = 'http://github.com/globalize/globalize'
|
9
|
-
s.summary = 'Rails I18n de-facto standard library for ActiveRecord model/data translation'
|
10
|
-
s.description = "#{s.summary}."
|
11
|
-
s.license = "MIT"
|
12
|
-
|
13
|
-
s.files = Dir['{lib/**/*,[A-Z]*}']
|
14
|
-
s.platform = Gem::Platform::RUBY
|
15
|
-
s.require_path = 'lib'
|
16
|
-
s.rubyforge_project = '[none]'
|
17
|
-
s.required_ruby_version = '>= 2.4.6'
|
18
|
-
|
19
|
-
s.add_dependency 'activerecord', '>= 4.2', '< 6.1'
|
20
|
-
s.add_dependency 'activemodel', '>= 4.2', '< 6.1'
|
21
|
-
s.add_dependency 'request_store', '~> 1.0'
|
22
|
-
|
23
|
-
s.add_development_dependency 'appraisal'
|
24
|
-
s.add_development_dependency 'database_cleaner'
|
25
|
-
s.add_development_dependency 'm'
|
26
|
-
s.add_development_dependency 'minitest'
|
27
|
-
s.add_development_dependency 'minitest-reporters'
|
28
|
-
s.add_development_dependency 'pry'
|
29
|
-
s.add_development_dependency 'rake'
|
30
|
-
s.add_development_dependency 'rdoc'
|
31
|
-
s.add_development_dependency 'sqlite3'
|
32
|
-
end
|