dcas-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,71 @@
1
+ ---
2
+ -
3
+ - '00111532'
4
+ - 'Kipp Owen'
5
+ - '18.88'
6
+ - 'VISA'
7
+ - '4508288028044788'
8
+ - '12/2010'
9
+ -
10
+ - '00111382'
11
+ - 'Brooke Racquet'
12
+ - '18.88'
13
+ - 'VISA'
14
+ - '4979170284809229'
15
+ - '12/2011'
16
+ -
17
+ - '00111018'
18
+ - 'Pat Sylvester'
19
+ - '18.88'
20
+ - 'MCRD'
21
+ - '5280827180294022'
22
+ - '12/2012'
23
+ -
24
+ - '00111992'
25
+ - 'Vicki Tolliki'
26
+ - '18.88'
27
+ - 'MCRD'
28
+ - '5173179138280429'
29
+ - '12/2011'
30
+ -
31
+ - '00111247'
32
+ - 'Cheryl Barger'
33
+ - '18.88'
34
+ - 'VISA'
35
+ - '4247972792081828'
36
+ - '12/2010'
37
+ -
38
+ - '00111028'
39
+ - 'Melissa Fletcher'
40
+ - '18.88'
41
+ - 'MCRD'
42
+ - '5428208180420824'
43
+ - '12/2011'
44
+ -
45
+ - '00111384'
46
+ - 'Mack Payne'
47
+ - '18.88'
48
+ - 'MCRD'
49
+ - '5425682492949922'
50
+ - '12/2012'
51
+ -
52
+ - '00111742'
53
+ - 'Melissa Latcher'
54
+ - '18.88'
55
+ - 'MCRD'
56
+ - '5208372629781292'
57
+ - '12/2011'
58
+ -
59
+ - '00111402'
60
+ - 'Caroline Sieben'
61
+ - '18.88'
62
+ - 'MCRD'
63
+ - '5181381081538389'
64
+ - '12/2012'
65
+ -
66
+ - '00111208'
67
+ - 'Charlotte Sue Hiran'
68
+ - '18.88'
69
+ - 'MCRD'
70
+ - '5274727290818284'
71
+ - '12/2011'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,48 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+ require 'net/ftps_implicit'
3
+
4
+ describe Net::FTPS::Implicit do
5
+ before :all do
6
+ @client1 = Fixtures[:Clients][0]
7
+ @client2 = Fixtures[:Clients][1]
8
+ end
9
+
10
+ it "should login and logout 10 times in sequence without problems" do
11
+ 20.times do
12
+ lambda {
13
+ ftp = Net::FTPS::Implicit.new(DCAS::BUCKET_HOST, @client1.username, @client1.password, nil, OpenSSL::SSL::VERIFY_NONE)
14
+ ftp.abort
15
+ ftp.quit
16
+ ftp.close
17
+ ftp.should be_closed
18
+ }.should_not raise_error
19
+ end
20
+ end
21
+
22
+ it "should be able to complete a pretty comprehensive sequence in many accounts in parallel, without problems" do
23
+ lambda {
24
+ 5.times do
25
+ clients = Fixtures[:Clients].collect {|c| Net::FTPS::Implicit.new(DCAS::BUCKET_HOST, c.username, c.password, nil, OpenSSL::SSL::VERIFY_NONE) }
26
+ clients.each do |c|
27
+ c.mkdir(DCAS::STAGING_BUCKET) unless c.nlst.include?(DCAS::STAGING_BUCKET)
28
+ c.chdir(DCAS::STAGING_BUCKET)
29
+ end
30
+ 10.times do |i|
31
+ clients.each do |c|
32
+ c.put("spec/fixtures/test_upload#{i}.txt", "test_upload#{i}.txt")
33
+ end
34
+ end
35
+ 10.times do |i|
36
+ clients.each do |c|
37
+ c.delete("test_upload#{i}.txt")
38
+ end
39
+ end
40
+ clients.each do |c|
41
+ c.abort
42
+ c.quit
43
+ c.close
44
+ end
45
+ end
46
+ }.should_not raise_error
47
+ end
48
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'dcas'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
10
+
11
+ Fixtures = {
12
+ :Clients => YAML.load_file('spec/fixtures/clients.yml').collect {|c| DCAS::Client.new(c) },
13
+ :TestPayments => {
14
+ :Ach => YAML.load_file('spec/fixtures/ach_payments.yml'),
15
+ :CreditCard => YAML.load_file('spec/fixtures/credit_card_payments.yml')
16
+ },
17
+ :PaymentFiles => Dir.glob("spec/fixtures/*.csv")
18
+ }
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dcas-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - BehindLogic
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-01-15 00:00:00 -05:00
13
+ default_executable:
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
+ - !ruby/object:Gem::Dependency
26
+ name: fastercsv
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: Ruby codebase for creating payment batch files for DCAS, uploading them, and receiving response files from DCAS.
36
+ email: gems@behindlogic.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - LICENSE
43
+ - README.rdoc
44
+ files:
45
+ - .document
46
+ - .gitignore
47
+ - API.rdoc
48
+ - HISTORY.rdoc
49
+ - LICENSE
50
+ - README.rdoc
51
+ - Rakefile
52
+ - VERSION
53
+ - dcas-ruby.gemspec
54
+ - lib/dcas.rb
55
+ - lib/dcas/ach_response.rb
56
+ - lib/dcas/ach_return.rb
57
+ - lib/dcas/payment.rb
58
+ - lib/dcas/response.rb
59
+ - lib/net/ftps_implicit.rb
60
+ - spec/dcas/response_spec.rb
61
+ - spec/dcas_spec.rb
62
+ - spec/fixtures/ach_first_response.csv.sample
63
+ - spec/fixtures/ach_payments.csv
64
+ - spec/fixtures/ach_payments.yml
65
+ - spec/fixtures/ach_second_response.csv.sample
66
+ - spec/fixtures/cc_response.csv.sample
67
+ - spec/fixtures/clients.yml.sample
68
+ - spec/fixtures/credit_card_payments.csv
69
+ - spec/fixtures/credit_card_payments.yml
70
+ - spec/fixtures/test_upload0.txt
71
+ - spec/fixtures/test_upload1.txt
72
+ - spec/fixtures/test_upload2.txt
73
+ - spec/fixtures/test_upload3.txt
74
+ - spec/fixtures/test_upload4.txt
75
+ - spec/fixtures/test_upload5.txt
76
+ - spec/fixtures/test_upload6.txt
77
+ - spec/fixtures/test_upload7.txt
78
+ - spec/fixtures/test_upload8.txt
79
+ - spec/fixtures/test_upload9.txt
80
+ - spec/ftps_implicit_spec.rb
81
+ - spec/spec.opts
82
+ - spec/spec_helper.rb
83
+ has_rdoc: true
84
+ homepage: http://github.com/dcparker/dcas-ruby
85
+ licenses: []
86
+
87
+ post_install_message:
88
+ rdoc_options:
89
+ - --charset=UTF-8
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: "0"
97
+ version:
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: "0"
103
+ version:
104
+ requirements: []
105
+
106
+ rubyforge_project:
107
+ rubygems_version: 1.3.5
108
+ signing_key:
109
+ specification_version: 3
110
+ summary: Ruby codebase for managing payments with DCAS.
111
+ test_files:
112
+ - spec/dcas/response_spec.rb
113
+ - spec/dcas_spec.rb
114
+ - spec/ftps_implicit_spec.rb
115
+ - spec/spec_helper.rb