fast_gettext 3.1.0 → 4.1.0

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: bafc7c8a404376de4731fee7974898616e9218096b75d667f87d4d1ebf435d76
4
- data.tar.gz: e7b3992809e416b30d80305b80fd1aa9092954463e6a9fee58f44f844c8d540a
3
+ metadata.gz: 4acb7c755790ac702f8f472e8fd137ea5f5941d7a84d558ae6c7b6895c28ee1d
4
+ data.tar.gz: 1f79c48bb9b42ca9ea1751603518e495566c2f324bacfecec63c7042e1b43033
5
5
  SHA512:
6
- metadata.gz: feb42678bbee41fe12f2ea6d4e55a9ad1af4afbb4edb4cb1f5736ad275101938a717b168726f40f08695a7cc7e9678fdc8dc3d95c1ad2a533c94dbd57af38329
7
- data.tar.gz: af0a583a57e498952d88b7346a31e8dba50cb6a1c621fd7e9e09bc53367c0ec470195d56118108cfce0c0ae460a1bd3b503dd59f9a8b88a6110eb402e8c2c5b0
6
+ metadata.gz: 2d101d14e01c57b78d1d1f2d4b1850b74b4c7e274e76beecee7c7e6b5bc517bab2a902dae7c59973c2cd9714a1d206c753bb8bd4d87a5588d6f816406db2ac1f
7
+ data.tar.gz: b1ae7b2d44cd33537bcd57f2453aa972aa72c60afac4f2cd124c69b6f00ce675d29669506508d170ab0a9ac8558cf40173311798bd30b8485c169745dc998d29
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 4.1.0 -- drop EOL rubies + add racc dependency
2
+ 4.0.0 -- Remove String#% hack that would make it not blow up when using invalid keys, can temporarily restore with `FastGettext.allow_invalid_keys!`
1
3
  3.1.0 -- Work with frozen strings
2
4
  3.0.0 -- Drop ruby 2.x support
3
5
  2.4.0 -- Depend on prime gem
@@ -58,19 +58,3 @@ rescue ArgumentError
58
58
  end
59
59
  end
60
60
  end
61
-
62
- # 1.9.1 if you misspell a %{key} your whole page would blow up, no thanks...
63
- begin
64
- ("%{b}" % {:a=>'b'})
65
- rescue KeyError
66
- class String
67
- alias :_fast_gettext_old_format_m :%
68
- def %(*args)
69
- begin
70
- _fast_gettext_old_format_m(*args)
71
- rescue KeyError
72
- self
73
- end
74
- end
75
- end
76
- end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastGettext
4
- VERSION = Version = '3.1.0' # rubocop:disable Naming/ConstantName
4
+ VERSION = Version = '4.1.0' # rubocop:disable Naming/ConstantName
5
5
  end
data/lib/fast_gettext.rb CHANGED
@@ -28,6 +28,22 @@ module FastGettext
28
28
  translation_repositories[name] = TranslationRepository.build(name, options)
29
29
  end
30
30
 
31
+ # deprecated, just a crutch to migrate to new api
32
+ def self.allow_invalid_keys!
33
+ eval(<<~CODE)
34
+ class ::String
35
+ alias :_fast_gettext_old_format_m :%
36
+ def %(*args)
37
+ begin
38
+ _fast_gettext_old_format_m(*args)
39
+ rescue KeyError
40
+ self
41
+ end
42
+ end
43
+ end
44
+ CODE
45
+ end
46
+
31
47
  # some repositories know where to store their locales
32
48
  def self.locale_path
33
49
  translation_repositories[text_domain].instance_variable_get(:@options)[:path]
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_gettext
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
10
+ date: 2025-01-06 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: prime
@@ -24,6 +23,20 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: racc
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: rake
29
42
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +57,14 @@ dependencies:
44
57
  requirements:
45
58
  - - "~>"
46
59
  - !ruby/object:Gem::Version
47
- version: '1.4'
60
+ version: '2.1'
48
61
  type: :development
49
62
  prerelease: false
50
63
  version_requirements: !ruby/object:Gem::Requirement
51
64
  requirements:
52
65
  - - "~>"
53
66
  - !ruby/object:Gem::Version
54
- version: '1.4'
67
+ version: '2.1'
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: rspec
57
70
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +177,6 @@ dependencies:
164
177
  - - ">="
165
178
  - !ruby/object:Gem::Version
166
179
  version: '0'
167
- description:
168
180
  email: michael@grosser.it
169
181
  executables: []
170
182
  extensions: []
@@ -202,7 +214,6 @@ licenses:
202
214
  - MIT
203
215
  - Ruby
204
216
  metadata: {}
205
- post_install_message:
206
217
  rdoc_options: []
207
218
  require_paths:
208
219
  - lib
@@ -210,15 +221,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
221
  requirements:
211
222
  - - ">="
212
223
  - !ruby/object:Gem::Version
213
- version: 3.0.0
224
+ version: 3.2.0
214
225
  required_rubygems_version: !ruby/object:Gem::Requirement
215
226
  requirements:
216
227
  - - ">="
217
228
  - !ruby/object:Gem::Version
218
229
  version: '0'
219
230
  requirements: []
220
- rubygems_version: 3.4.10
221
- signing_key:
231
+ rubygems_version: 3.6.2
222
232
  specification_version: 4
223
233
  summary: A simple, fast, memory-efficient and threadsafe implementation of GetText
224
234
  test_files: []