dcas-ruby 0.2.0 → 0.3.0
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.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/dcas-ruby.gemspec +2 -5
- data/lib/dcas.rb +5 -3
- metadata +2 -12
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.email = "gems@behindlogic.com"
|
11
11
|
gem.homepage = "http://github.com/dcparker/dcas-ruby"
|
12
12
|
gem.authors = ["BehindLogic"]
|
13
|
-
gem.add_development_dependency "rspec", ">= 1.2.
|
13
|
+
# gem.add_development_dependency "rspec", ">= 1.2.8"
|
14
14
|
gem.add_dependency "fastercsv"
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
16
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/dcas-ruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dcas-ruby}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["BehindLogic"]
|
12
|
-
s.date = %q{2010-01-
|
12
|
+
s.date = %q{2010-01-21}
|
13
13
|
s.description = %q{Ruby codebase for creating payment batch files for DCAS, uploading them, and receiving response files from DCAS.}
|
14
14
|
s.email = %q{gems@behindlogic.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -73,14 +73,11 @@ Gem::Specification.new do |s|
|
|
73
73
|
s.specification_version = 3
|
74
74
|
|
75
75
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
76
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
77
76
|
s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
|
78
77
|
else
|
79
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
80
78
|
s.add_dependency(%q<fastercsv>, [">= 0"])
|
81
79
|
end
|
82
80
|
else
|
83
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
84
81
|
s.add_dependency(%q<fastercsv>, [">= 0"])
|
85
82
|
end
|
86
83
|
end
|
data/lib/dcas.rb
CHANGED
@@ -3,7 +3,7 @@ require 'ftools'
|
|
3
3
|
module DCAS
|
4
4
|
TESTING = false
|
5
5
|
BUCKET_HOST = 'ftp.ezpaycenters.net'
|
6
|
-
|
6
|
+
DEFAULT_OUTGOING_BUCKET = 'outgoing'
|
7
7
|
INCOMING_BUCKET = 'incoming'
|
8
8
|
STAGING_BUCKET = 'staging'
|
9
9
|
DEFAULT_CACHE_LOCATION = 'EFT'
|
@@ -24,10 +24,12 @@ module DCAS
|
|
24
24
|
@company_username = options[:company_username].to_s
|
25
25
|
@company_password = options[:company_password].to_s
|
26
26
|
@cache_location = options[:cache_location].to_s || DEFAULT_CACHE_LOCATION
|
27
|
+
@outgoing_bucket = DEFAULT_OUTGOING_BUCKET
|
28
|
+
@testing = TESTING
|
27
29
|
end
|
28
30
|
|
29
31
|
attr_reader :username, :password, :company_alias, :company_username, :company_password
|
30
|
-
attr_accessor :cache_location
|
32
|
+
attr_accessor :cache_location, :outgoing_bucket, :testing
|
31
33
|
|
32
34
|
# :nodoc:
|
33
35
|
def batches
|
@@ -63,7 +65,7 @@ module DCAS
|
|
63
65
|
ftp.put(filename, shortname)
|
64
66
|
# 4) If we're still connected, check the file size of the file, then move it out of STAGING and mark file as completed.
|
65
67
|
if ftp.nlst.include?(shortname) && ftp.size(shortname) == File.size(filename)
|
66
|
-
ftp.rename(shortname, "../#{
|
68
|
+
ftp.rename(shortname, "../#{outgoing_bucket}/#{shortname}") unless testing || outgoing_bucket == DCAS::STAGING_BUCKET
|
67
69
|
lock_object.submit_finished!(shortname) if lock_object
|
68
70
|
else
|
69
71
|
if lock_object
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dcas-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BehindLogic
|
@@ -9,19 +9,9 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-21 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: rspec
|
17
|
-
type: :development
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.2.9
|
24
|
-
version:
|
25
15
|
- !ruby/object:Gem::Dependency
|
26
16
|
name: fastercsv
|
27
17
|
type: :runtime
|