da_funk 3.8.0 → 3.8.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: 33d6e374ebba38edfb83b1e024d15ffb3bb83398
4
- data.tar.gz: 2ce938d609c4ff4413ed6e043659af99195a70e2
3
+ metadata.gz: dc5426de8fc56344b9331c69660f519ff22b16e1
4
+ data.tar.gz: d526956fd9fa1245f3423b41b5353a94fa35b627
5
5
  SHA512:
6
- metadata.gz: 831a04e935e0f7bdc606256128664f7730689fe4cd4a32433717433f56261a66b525f7d4b197a2d1f74b15ce8ad44fe9702bf422a8683ffa73ff44e6e397553e
7
- data.tar.gz: eba0516c0d1a09532a3b174ad81216ace47dc18395fd8ce83f9bd6a849bd76a8d684598a7e44254252451c3368dd45cc9238b71c71624cbdaba2e732d5c7b359
6
+ metadata.gz: fb753199d3f3984771803fb9da5d1e30a0beffc4fd0f94791556554828d8b215aa7dac2a3949da1b5cf6e0b4a8191d8212d6790c62576009a8915ce92e9550c2
7
+ data.tar.gz: a07f8a6837c8710452c9bbbbe75fbca66068ed3136de03e5698adeb6ae585a65097eeaed3c18ba60fa4c24a12dd2acba223098aa8849a1878c93a467aa5c22a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (3.8.0)
4
+ da_funk (3.8.1)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
@@ -18,9 +18,9 @@ GEM
18
18
  cloudwalk (1.14.3)
19
19
  bundler
20
20
  rake
21
- cloudwalk_handshake (1.3.0)
21
+ cloudwalk_handshake (1.4.1)
22
22
  funky-simplehttp (~> 0.6)
23
- funky-emv (0.25.0)
23
+ funky-emv (0.26.0)
24
24
  funky-tlv (~> 0.2)
25
25
  funky-simplehttp (0.6.0)
26
26
  funky-tlv (0.2.3)
@@ -29,7 +29,7 @@ GEM
29
29
  parallel (1.17.0)
30
30
  parser (2.6.3.0)
31
31
  ast (~> 2.4.0)
32
- posxml_parser (2.18.0)
32
+ posxml_parser (2.19.0)
33
33
  funky-emv (~> 0.3)
34
34
  rainbow (3.0.0)
35
35
  rake (12.3.2)
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # DaFunk
2
2
 
3
+ ### 3.8.1 - 2019-06-13
4
+
5
+ - Fix ISO8583 binary bitmap generation to CRUBY.
6
+
3
7
  ### 3.8.0 - 2019-06-06
4
8
 
5
9
  - Do not send host/port information to CwHttpSocket, let it deal with host and port config from config.dat and/or params.dat;
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="3.8.0"
2
+ VERSION="3.8.1"
3
3
  end
4
4
 
@@ -59,21 +59,25 @@ module ISO8583
59
59
 
60
60
  # Generate the bytes representing this bitmap.
61
61
  def to_bytes
62
- # Convert binary to hex, by slicing the binary in 4 bytes chuncks
63
- bitmap_hex = ""
64
- str = ""
65
- self.to_s.chars.reverse.each_with_index do |ch, i|
66
- str << ch
67
- next if i == 0
68
- if (i+1) % 4 == 0
62
+ if RUBY_ENGINE == 'mruby'
63
+ # Convert binary to hex, by slicing the binary in 4 bytes chuncks
64
+ bitmap_hex = ""
65
+ str = ""
66
+ self.to_s.chars.reverse.each_with_index do |ch, i|
67
+ str << ch
68
+ next if i == 0
69
+ if (i+1) % 4 == 0
70
+ bitmap_hex << str.reverse.to_i(2).to_s(16)
71
+ str = ""
72
+ end
73
+ end
74
+ unless str.empty?
69
75
  bitmap_hex << str.reverse.to_i(2).to_s(16)
70
- str = ""
71
76
  end
77
+ bitmap_hex.reverse.upcase
78
+ else
79
+ [to_s].pack("B*")
72
80
  end
73
- unless str.empty?
74
- bitmap_hex << str.reverse.to_i(2).to_s(16)
75
- end
76
- bitmap_hex.reverse.upcase
77
81
  end
78
82
  alias_method :to_b, :to_bytes
79
83
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da_funk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2019-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake