identity-mind 0.2.0 → 0.2.1

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: 36107bda05bc43b5019cb38c4d0bcdd055ad484c603cdf445ed02d9d2d04ed8c
4
- data.tar.gz: abc2f2d06e02828941e8a2db8c60fef8369b153f01ea7b6e5f739d1094d063c1
3
+ metadata.gz: ab894a81e39a568bcba5651b8a73b7fd67d7835711e3d632ce834d8405668dc9
4
+ data.tar.gz: 40f883749a81be686b27bfd4f09415283bdf20621d30d7071c0a3a3ab4b5dab2
5
5
  SHA512:
6
- metadata.gz: 85ba208261f31efc1d83ebd1feb51ab3a7799f7821042c2c771f94f3dc768d0d4e27bdff2976a556a717ae08a14bef424ffb97d657fa13ed44e1868fd4436f08
7
- data.tar.gz: 70eb05a4f23f43af056fa36168d4117ba17219c06b302b641b6dca739d9aaecb3259ec6c5c0ebbccd5e8b8b347733f345aa031da5c8e096ba585fd036acc6998
6
+ metadata.gz: bf775c565b136fd3493804baa9e44fbf900166a74cc133c639f4cc615736fa6d01175fef26c0fcd0dc41ecad85282b0aa28e84ac2e9648f374eeb982b3031f3f
7
+ data.tar.gz: 1e836aed333d398ee0e61e09ec0808e1f78bdca3f0d20da90e79856d81454a4cef120469b026ee50e0107d2cd23ded0875db246e65ddb9f8dcd4bdbc47ce0cae
@@ -1,3 +1,6 @@
1
+ # 0.2.1
2
+ - Cut param value by bytesize
3
+
1
4
  # 0.2.0
2
5
  - Introduce Params class with trimmed values
3
6
 
@@ -49,7 +49,13 @@ module IdentityMind
49
49
  value = value.to_s if value.is_a?(Symbol)
50
50
  return value unless value.is_a?(String)
51
51
 
52
- value[0, IdentityMind.configuration.param_length_limit]
52
+ result = value[0, IdentityMind.configuration.param_length_limit]
53
+
54
+ while result.bytesize > IdentityMind.configuration.param_length_limit
55
+ result = result[0...-1]
56
+ end
57
+
58
+ result
53
59
  end
54
60
  end
55
61
  end
@@ -1,3 +1,3 @@
1
1
  module IdentityMind
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: identity-mind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wojciech Widenka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler