serial_translator 2.0.4 → 2.0.5
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/README.md +3 -0
- data/lib/serial_translator/version.rb +1 -1
- data/lib/serial_translator.rb +3 -3
- data/serial_translator.gemspec +7 -3
- metadata +9 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 628d64c11c47785533679b57ed7807d6d9bccc72e56a35c3979ac50bdefa20c8
|
|
4
|
+
data.tar.gz: df866ff6fb5145a468784e6221c3d6186aefab25e89178f28a3fe83d86444f67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6054c000608682481682402def8916bd6f7e834bb86b3807c9ce14f42b3dccd4f736a3af97c2cf936dd53805e20786578ab13fe8808199ffeea5b91c8aeef3b4
|
|
7
|
+
data.tar.gz: e19e4ccf3afc01eafd6cb54d613f79667145b656b1a2de7fad4761434bf6fa30feb275d9d5ea05637d66a12f459ae66ff446681ea5dbc9d3ab5080e4598590f4
|
data/README.md
CHANGED
|
@@ -64,6 +64,9 @@ end
|
|
|
64
64
|
|
|
65
65
|
## Contributing
|
|
66
66
|
|
|
67
|
+
`SerialTranslator` is released under the [Apache License 2.0](LICENSE.txt) and
|
|
68
|
+
Copyright 2013...2021 [gut.org gAG](https://gut.org).
|
|
69
|
+
|
|
67
70
|
1. Fork it
|
|
68
71
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
69
72
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
data/lib/serial_translator.rb
CHANGED
|
@@ -48,10 +48,10 @@ module SerialTranslator
|
|
|
48
48
|
__send__(:"#{attr_name}_translations_will_change!")
|
|
49
49
|
translations = translations_for(attr_name)
|
|
50
50
|
|
|
51
|
-
value&.scrub
|
|
51
|
+
scrubbed_value = value&.scrub('')
|
|
52
52
|
|
|
53
|
-
if
|
|
54
|
-
translations[current_translation_locale] =
|
|
53
|
+
if scrubbed_value.present?
|
|
54
|
+
translations[current_translation_locale] = scrubbed_value
|
|
55
55
|
else
|
|
56
56
|
translations.delete(current_translation_locale)
|
|
57
57
|
end
|
data/serial_translator.gemspec
CHANGED
|
@@ -8,9 +8,13 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ["betterplace development team"]
|
|
9
9
|
spec.email = ["developers@betterplace.org"]
|
|
10
10
|
spec.description = %q{Translate attribute values without additional models}
|
|
11
|
-
spec.summary = %q{Translate attribute values without additional models}
|
|
12
|
-
spec.homepage = "
|
|
13
|
-
spec.license = "
|
|
11
|
+
spec.summary = %q{Translate ActiveRecord attribute values without additional models but with ease}
|
|
12
|
+
spec.homepage = "https://github.com/betterplace/serial_translator"
|
|
13
|
+
spec.license = "Apache-2.0"
|
|
14
|
+
spec.metadata = {
|
|
15
|
+
"source_code_uri" => "https://github.com/betterplace/serial_translator",
|
|
16
|
+
"funding_uri" => "https://www.betterplace.org/de/projects/7046"
|
|
17
|
+
}
|
|
14
18
|
|
|
15
19
|
spec.files = `git ls-files`.split($/)
|
|
16
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: serial_translator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- betterplace development team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-10-
|
|
11
|
+
date: 2021-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -180,10 +180,12 @@ files:
|
|
|
180
180
|
- spec/lib/serial_translator_spec.rb
|
|
181
181
|
- spec/spec_helper.rb
|
|
182
182
|
- spec/support/fake_env.rb
|
|
183
|
-
homepage:
|
|
183
|
+
homepage: https://github.com/betterplace/serial_translator
|
|
184
184
|
licenses:
|
|
185
|
-
-
|
|
186
|
-
metadata:
|
|
185
|
+
- Apache-2.0
|
|
186
|
+
metadata:
|
|
187
|
+
source_code_uri: https://github.com/betterplace/serial_translator
|
|
188
|
+
funding_uri: https://www.betterplace.org/de/projects/7046
|
|
187
189
|
post_install_message:
|
|
188
190
|
rdoc_options: []
|
|
189
191
|
require_paths:
|
|
@@ -202,7 +204,8 @@ requirements: []
|
|
|
202
204
|
rubygems_version: 3.2.29
|
|
203
205
|
signing_key:
|
|
204
206
|
specification_version: 4
|
|
205
|
-
summary: Translate attribute values without additional models
|
|
207
|
+
summary: Translate ActiveRecord attribute values without additional models but with
|
|
208
|
+
ease
|
|
206
209
|
test_files:
|
|
207
210
|
- spec/lib/serial_translator/serial_translator_length_validator_spec.rb
|
|
208
211
|
- spec/lib/serial_translator/serial_translator_presence_validator_spec.rb
|