global_collect 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  /pkg
2
2
  /doc
3
3
  /rdoc
4
+ .DS_Store
data/HISTORY CHANGED
@@ -1,3 +1,7 @@
1
+ v0.2.3 (2010-06-28)
2
+ ===================
3
+ * Patch fix to correctly judge field value length for AN fields.
4
+
1
5
  v0.2.2 (2010-06-14)
2
6
  ===================
3
7
  * Patch fix to make dependency on httparty point to v0.5.2 exactly, since v0.6.0 changed HTTParty::Response#delegate to #parsed_response.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -2,8 +2,7 @@ require 'rubygems'
2
2
  require File.join(File.dirname(__FILE__), '..', "lib", "global_collect")
3
3
  require 'pp'
4
4
 
5
- path = "/Users/tkarnezos/Desktop/GC/ftp_backup/FS53930155TOPSPINMEDIA.asc"
5
+ path = "something.asc"
6
6
  report = GlobalCollect::LogParsing::FinancialStatement::ReportFile.new(path)
7
7
  report.parse
8
- require 'ap'
9
- ap report.data
8
+ pp report.data
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{global_collect}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Timon Karnezos"]
12
- s.date = %q{2010-06-14}
12
+ s.date = %q{2010-06-28}
13
13
  s.description = %q{Gives minimally intrusive access to Global Collect's payment processing API.
14
14
  Currently implements a very small segment of the full API but is built with
15
15
  extensibility in mind.
@@ -37,7 +37,7 @@ module GlobalCollect
37
37
  # §5.3.1 (IPADDRESS), §5.28.1 (CITY) suggest that spaces and punctuation
38
38
  # are acceptable as well. This leaves us just checking max size.
39
39
  when "AN"
40
- return (value.size <= @size)
40
+ return !!(value =~ /^.{0,#{@size}}$/)
41
41
  # §5.28.1 (AMOUNT) seems to allow for size <= the specifier.
42
42
  when "N"
43
43
  return !!(value =~ /^\d{1,#{@size}}$/)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Timon Karnezos
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-14 00:00:00 -07:00
17
+ date: 2010-06-28 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency