globalize 7.1.2 → 7.1.3

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: '08d909471578cec5c599f18faa1b62f079184a03c8c43d3b0a301a28fe7c2a7e'
4
- data.tar.gz: 0edf7d3fd98c04e567afc9e561fd75a956bb05ed360c123a94954317837bb87f
3
+ metadata.gz: 68962b68a72c426ce84be388b97c2bda01f5096b6621f4f38d647e0f2cad72b7
4
+ data.tar.gz: 90261df2a56535a9e0ca48134f1d9bdfa8757148f158b3b927660809b9aebf36
5
5
  SHA512:
6
- metadata.gz: c9be4caffe64bb10858fc472c761348714cc234a7218a03af4877afe5c70e562c7b3c541432dbbd62c93db0161796c968ff360751ef66118d262055b73236c58
7
- data.tar.gz: b12a6e83badfe3e5195079713824e676ba8d8ff736e7c237fb983f9ff89375a3dcd0ad009efed169c96cb0ad9d106dcb2cd6eb3544489c069e31dd5c2d87b0d2
6
+ metadata.gz: 74b7aa45ce7c474abe6a6ec4c3db1511f91ba83451630ce01f017cdf53db2a7b81be1290281530b9545d15d60c0bf4c8ca8057fb7546d58d39636e76add2c685
7
+ data.tar.gz: '09fa4ba6406d6f1886f18c3f2867b6c9f1a0ffa1d699cd901994408d849b16c99200cf8e74286ce751645cbf6d652dd9066b546189d72191336028b91c527b4d'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Globalize Changelog
2
2
 
3
+ ## 7.1.3 (2026-05-25)
4
+
5
+ * Prevent creation of empty current translation [#832](https://github.com/globalize/globalize/pull/832) by [Arkadiy Zabazhanov](https://github.com/pyromaniac)
6
+
3
7
  ## 7.1.2 (2026-05-18)
4
8
 
5
9
  * Coerce locale to symbol in `Attributes#contains?` [#844](https://github.com/globalize/globalize/pull/844) by [Arkadiy Zabazhanov](https://github.com/pyromaniac)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- globalize (7.1.2)
4
+ globalize (7.1.3)
5
5
  activemodel (>= 7.0, < 8.2)
6
6
  activerecord (>= 7.0, < 8.2)
7
7
  activesupport (>= 7.0, < 8.2)
@@ -126,7 +126,7 @@ CHECKSUMS
126
126
  date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
127
127
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
128
128
  erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
129
- globalize (7.1.2)
129
+ globalize (7.1.3)
130
130
  i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
131
131
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
132
132
  json (2.19.5) sha256=218a18553e4801d579ca7e0f5bc72bafd776d7397238a1fb4e74db5b0a812c59
@@ -143,20 +143,13 @@ module Globalize
143
143
  Globalize.fallbacks(locale)
144
144
  end
145
145
 
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
155
- end
146
+ def save(...)
147
+ globalize_clear_dirty { super }
148
+ end
156
149
 
157
- result
158
- end
159
- RUBY
150
+ def save!(...)
151
+ globalize_clear_dirty { super }
152
+ end
160
153
 
161
154
  def column_for_attribute name
162
155
  return super if translated_attribute_names.exclude?(name)
@@ -246,6 +239,12 @@ module Globalize
246
239
 
247
240
  globalize.fetch(options[:locale] || Globalize.locale, name)
248
241
  end
242
+
243
+ def globalize_clear_dirty
244
+ result = without_fallbacks { yield }
245
+ globalize.clear_dirty if result
246
+ result
247
+ end
249
248
  end
250
249
  end
251
250
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Globalize
4
- Version = "7.1.2"
4
+ Version = "7.1.3"
5
5
  end
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: 7.1.2
4
+ version: 7.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs