serial_translator 2.0.4 → 2.0.5

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: 16540a0794dd2e5b30066bd6db4a42a7db4976d91f9cd82753bd5b210aa6a565
4
- data.tar.gz: 1299a9f6bfbc957cf8795cbe2d5d0ce4130b1822005c60a41d5933d2d1941eca
3
+ metadata.gz: 628d64c11c47785533679b57ed7807d6d9bccc72e56a35c3979ac50bdefa20c8
4
+ data.tar.gz: df866ff6fb5145a468784e6221c3d6186aefab25e89178f28a3fe83d86444f67
5
5
  SHA512:
6
- metadata.gz: 1d18b78243cf079e150907d76fa004b92992fd1e9dc99a7cfda20f3946176a8a119b128562ba09334af0088a4ae8e66d1f7091c745705671fdf618d25608c923
7
- data.tar.gz: e85688152b1ca0a2b980684e845f41953ac4551c9a97558bfdad95dd166dea6931259586ea0162fa0b87b02bdfa89ab382d00ea577e305099b7fbee1ce3ebeef
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'`)
@@ -1,3 +1,3 @@
1
1
  module SerialTranslator
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5".freeze
3
3
  end
@@ -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 value.present?
54
- translations[current_translation_locale] = value
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
@@ -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 = "http://www.betterplace.org"
13
- spec.license = "WTFPL"
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
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-25 00:00:00.000000000 Z
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: http://www.betterplace.org
183
+ homepage: https://github.com/betterplace/serial_translator
184
184
  licenses:
185
- - WTFPL
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