da_funk 3.10.2 → 3.10.3

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
  SHA1:
3
- metadata.gz: 9d5972c6ee1666b2a4dc37c5e7234383895f561f
4
- data.tar.gz: 85a7cc3c51d8859398d90c1f522faf1ca1050548
3
+ metadata.gz: 74288cedcc9a7445acda45330150b35860f67697
4
+ data.tar.gz: 8e4124b00f303f5d7ce6d087d5cfeb3d3c7c4e61
5
5
  SHA512:
6
- metadata.gz: 05a15407109fd3ae966713efe6f982c7095f7757f54785b264645e7fb4ebf7d0b2d6b279d7278a75e8c7508d607d0619908c20b8d3c1eed642352b52ff33248c
7
- data.tar.gz: 764ef265169f56f0c25ea9825b24efdc939e56bc6624a16a656ba1242d1a58b5534bdf0a3ad788566bb74a37f9cdf7e94de049d815d471ff01046f72f2efb4da
6
+ metadata.gz: e2cf210b863c986842a00bf726ee768f45ebb655cb7cd12e3e567dfd684fbead8db0c5a44eed8f2ad022bd2bb2a5cbe684e1dc75b917f591023501af7424ce56
7
+ data.tar.gz: b282bebf06e8d9702014b71de91a9ec644c658491a2e5cae9f4070cae5874eab02b3adb1526ede5f5a889a620af783560b83b21d702986f98d85d47f667f44ef
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (3.10.2)
4
+ da_funk (3.10.3)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # DaFunk
2
2
 
3
+ ### 3.10.3 - 2019-07-26
4
+
5
+ - Check if ContextLog exists on ISO8583 field.rb;
6
+ - Refactoring ISO8583 Null_Codec decoder to avoid encoding error.
7
+
3
8
  ### 3.10.2 - 2019-07-09
4
9
 
5
10
  - Fix main application detection on app update;
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="3.10.2"
2
+ VERSION="3.10.3"
3
3
  end
4
4
 
data/lib/iso8583/codec.rb CHANGED
@@ -13,7 +13,7 @@ module ISO8583
13
13
  # your own Codec sooner or later. The codecs used by Field instances are
14
14
  # typically instances of Codec, it may or may not be usefull to subclass
15
15
  # Codec.
16
- #
16
+ #
17
17
  # Say, for example, a text field needs to be encoded in EBCDIC in the
18
18
  # message, this is how a corresponding codec would be constructed:
19
19
  #
@@ -42,29 +42,29 @@ module ISO8583
42
42
  # See also: Field, link:files/lib/fields_rb.html
43
43
  #
44
44
  # The following codecs are already implemented:
45
- # [+ASCII_Number+] encodes either a Number or String representation of
46
- # a number to the ASCII represenation of the number,
45
+ # [+ASCII_Number+] encodes either a Number or String representation of
46
+ # a number to the ASCII represenation of the number,
47
47
  # decodes ASCII numerals to a number
48
48
  # [+A_Codec+] passes through ASCII string checking they conform to [A-Za-z]
49
- # during encoding, no validity check during decoding.
49
+ # during encoding, no validity check during decoding.
50
50
  # [+AN_Codec+] passes through ASCII string checking they conform to [A-Za-z0-9]
51
- # during encoding, no validity check during decoding.
52
- # [+ANP_Codec+] passes through ASCII string checking they conform to [A-Za-z0-9 ]
53
- # during encoding, no validity check during decoding.
51
+ # during encoding, no validity check during decoding.
52
+ # [+ANP_Codec+] passes through ASCII string checking they conform to [A-Za-z0-9 ]
53
+ # during encoding, no validity check during decoding.
54
54
  # [+ANS_Codec+] passes through ASCII string checking they conform to [\x20-\x7E]
55
55
  # during encoding, no validity check during decoding.
56
56
  # [+Null_Codec+] passes anything along untouched.
57
57
  # [<tt>Track2</tt>] rudimentary check that string conforms to Track2
58
- # [+MMDDhhmmssCodec+] encodes Time, Datetime or String to the described date format, checking
59
- # that it is a valid date. Decodes to a DateTime instance, decoding and
58
+ # [+MMDDhhmmssCodec+] encodes Time, Datetime or String to the described date format, checking
59
+ # that it is a valid date. Decodes to a DateTime instance, decoding and
60
60
  # encoding perform validity checks!
61
- # [+MMDDCodec+] encodes Time, Datetime or String to the described date format, checking
62
- # that it is a valid date. Decodes to a DateTime instance, decoding and
61
+ # [+MMDDCodec+] encodes Time, Datetime or String to the described date format, checking
62
+ # that it is a valid date. Decodes to a DateTime instance, decoding and
63
63
  # encoding perform validity checks!
64
- # [+YYMMDDhhmmssCodec+] encodes Time, Datetime or String to the described date format, checking
65
- # that it is a valid date. Decodes to a DateTime instance, decoding and
64
+ # [+YYMMDDhhmmssCodec+] encodes Time, Datetime or String to the described date format, checking
65
+ # that it is a valid date. Decodes to a DateTime instance, decoding and
66
66
  # encoding perform validity checks!
67
- # [+YYMMCodec+] encodes Time, Datetime or String to the described date format (exp date),
67
+ # [+YYMMCodec+] encodes Time, Datetime or String to the described date format (exp date),
68
68
  # checking that it is a valid date. Decodes to a DateTime instance, decoding
69
69
  # and encoding perform validity checks!
70
70
  #
@@ -147,8 +147,8 @@ module ISO8583
147
147
  str
148
148
  }
149
149
  Null_Codec.decoder = lambda {|str|
150
- str.gsub(/\000*$/, '')
151
- }
150
+ str
151
+ }
152
152
 
153
153
  Track2 = Codec.new
154
154
  Track2.encoder = lambda{|track2|
data/lib/iso8583/field.rb CHANGED
@@ -39,7 +39,7 @@ module ISO8583
39
39
  begin
40
40
  real_value = codec.decode(raw_value)
41
41
  rescue => e
42
- ContextLog.exception e, e.backtrace
42
+ ContextLog.exception e, e.backtrace if Object.defined?(:ContextLog)
43
43
  raise ISO8583ParseException.new(e.message+" (#{name})")
44
44
  end
45
45
 
@@ -47,16 +47,16 @@ module ISO8583
47
47
  end
48
48
 
49
49
 
50
- # Encoding needs to consider length representation, the actual encoding (such as charset or BCD)
51
- # and padding.
52
- # The order may be important! This impl calls codec.encode and then pads, in case you need the other
50
+ # Encoding needs to consider length representation, the actual encoding (such as charset or BCD)
51
+ # and padding.
52
+ # The order may be important! This impl calls codec.encode and then pads, in case you need the other
53
53
  # special treatment, you may need to override this method alltogether.
54
54
  # In other cases, the padding has to be implemented by the codec, such as BCD with an odd number of nibbles.
55
55
  def encode(value)
56
56
  begin
57
- encoded_value = codec.encode(value)
57
+ encoded_value = codec.encode(value)
58
58
  rescue ISO8583Exception => e
59
- ContextLog.exception(e, e.backtrace, "#{e.message} (#{name})")
59
+ ContextLog.exception(e, e.backtrace, "#{e.message} (#{name})") if Object.defined?(:ContextLog)
60
60
  raise ISO8583Exception.new(e.message+" (#{name})")
61
61
  end
62
62
 
@@ -10,7 +10,7 @@ module ISO8583
10
10
  # This file contains a number of preinstantiated Field definitions. You
11
11
  # will probably need to create own fields in your implementation, please
12
12
  # see Field and Codec for further discussion on how to do this.
13
- # The fields currently available are those necessary to implement the
13
+ # The fields currently available are those necessary to implement the
14
14
  # Berlin Groups Authorization Spec.
15
15
  #
16
16
  # The following fields are available:
@@ -20,7 +20,7 @@ module ISO8583
20
20
  # [+LL_BCD+] special form to de/encode variable length indicators, two BCD digits
21
21
  # [+LLVAR_N+] two byte variable length ASCII numeral, payload ASCII numerals
22
22
  # [+LLLVAR_N+] three byte variable length ASCII numeral, payload ASCII numerals
23
- # [+LLVAR_Z+] two byte variable length ASCII numeral, payload Track2 data
23
+ # [+LLVAR_Z+] two byte variable length ASCII numeral, payload Track2 data
24
24
  # [+LLVAR_AN+] two byte variable length ASCII numeral, payload ASCII
25
25
  # [+LLVAR_ANS+] two byte variable length ASCII numeral, payload ASCII+special
26
26
  # [+LLLVAR_AN+] three byte variable length ASCII numeral, payload ASCII
@@ -40,7 +40,7 @@ module ISO8583
40
40
  # [+Hhmmss+] Date, formatted in ASCII hhmmss
41
41
 
42
42
 
43
- # Special form to de/encode variable length indicators, two bytes ASCII numerals
43
+ # Special form to de/encode variable length indicators, two bytes ASCII numerals
44
44
  LL = Field.new
45
45
  LL.name = "LL"
46
46
  LL.length = 2
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.10.2
4
+ version: 3.10.3
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-07-09 00:00:00.000000000 Z
11
+ date: 2019-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake