ostruct-sanitizer 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 73b62ce9ad20aad02e6d4b8c844920156e38abef
4
- data.tar.gz: ea109f7926cbaa9075ef332299a36a3321b2c2d9
3
+ metadata.gz: c2195eea12fb39af3afff6c4b6fe806ec04bca30
4
+ data.tar.gz: 76c44ec8ff0b923e93adbc976a59a6683ff3892a
5
5
  SHA512:
6
- metadata.gz: f594d6d4e082d7737c536770102b5b818c2828a59cd23050535c8a3bf7848c47c64f7f014615af7c5dda0f9fcafa066d3a549933d0b016a9e5e91871b5148cd8
7
- data.tar.gz: 07ecf9f6b57b7df70d9041fe9011a441bdd65267c754d15bd9184296d13e91bce3801846cc681504d093b88d104c745d162b3822b1eb9e1764055a330ce816a9
6
+ metadata.gz: c66bb4d5415a969ee8e986c34b9363ef1971fa1e5de273617069dd69fc10384ba78567a56301bdd392fa8311404c24c8079840372174e9699dc30bad85589b67
7
+ data.tar.gz: 76b3e51b2ede7292b4e065c4125c0c2ff990650445297d705690071e19c4e59b89ee82db8748fd1119bf43fbd493305cec83b6beac90c6c5bdb1828897e28e37
@@ -89,6 +89,7 @@ module OStruct
89
89
  # @param [Boolean] strip_whitespaces whether or not to strip whitespaces
90
90
  #
91
91
  def truncate(*fields, length:, strip_whitespaces: true)
92
+ strip(*fields) if strip_whitespaces
92
93
  sanitize(*fields) { |value| value[0...length] }
93
94
  strip(*fields) if strip_whitespaces
94
95
  end
@@ -1,5 +1,5 @@
1
1
  module OStruct
2
2
  module Sanitizer
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ostruct-sanitizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Borges