grizzly_ber 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/grizzly_ber.rb +4 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ec1fd34faecf7dd6c3c09cb10145b7b0165edf6
4
- data.tar.gz: bdaedfa1c213795a1a8b528d3c044326033a8b82
3
+ metadata.gz: 197fe67463fcd1af134d84732341c8435b612cd4
4
+ data.tar.gz: fceb778efeb1487b9c8f78354ac9929f7eddc778
5
5
  SHA512:
6
- metadata.gz: c8593967c84fa29733e645d951a80b646776fa44d406f036992f8fd31244bf8b82ac21f19495c0cf68b78602328085296dd6acf3b32a41748cee4787a11fafec
7
- data.tar.gz: a27b55efeebbf87911b763d6be01c491e8096ba42dabef0ed62935c864b9c89dc0e902c7553f3cc144427699d69b7b5172e6c24d6bcdd24af13e87ef69fc0ba0
6
+ metadata.gz: b757d1f3b8ca70deb671d9ff044b50efd758aca1b75e1acebf8b1cc6a4cdaf878a0cd7f4dbde5afd201f31ad00076a5df0e28d694a193307f836eeffed75800c
7
+ data.tar.gz: 6baacf28e6b0c6e38eecd285073d5e12d20561a5a82311131e943c8bb7159b36d67d9daf8ab77c74dcf30a0722bb8f6e2f9ba736d357db7ed7ccaf6b66c21a8c
data/lib/grizzly_ber.rb CHANGED
@@ -190,7 +190,10 @@ class GrizzlyBer
190
190
  output += element.value.to_s(indent_size: indent_size+1)
191
191
  else
192
192
  output += "#{indent} Value: #{element.value.pack("C*").unpack("H*").first}"
193
- output += ", \"#{element.value.pack("C*")}\"" if info[:format] == :string
193
+ if info[:format] == :string
194
+ string_value = ", \"#{element.value.pack("C*")}\""
195
+ output += string_value if string_value.encoding == output.encoding #output is expected to be Encoding::UTF_8 but that default mustn't be forced here.
196
+ end
194
197
  output += "\n"
195
198
  end
196
199
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grizzly_ber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Balsdon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: CODEC for EMV TLV-BER encoded strings.
14
14
  email: ryan.balsdon@shopify.com
@@ -28,17 +28,17 @@ require_paths:
28
28
  - lib
29
29
  required_ruby_version: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  required_rubygems_version: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ">="
36
+ - - '>='
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
40
  rubyforge_project:
41
- rubygems_version: 2.2.2
41
+ rubygems_version: 2.0.14
42
42
  signing_key:
43
43
  specification_version: 4
44
44
  summary: Fiercest TLV-BER parser