payoneer_csv 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Payoneer::Csv
|
2
2
|
|
3
|
-
|
3
|
+
Simple tool for converting payoneer pdf report to csv file.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
|
-
gem '
|
9
|
+
gem 'payoneer_csv'
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
@@ -14,11 +14,23 @@ And then execute:
|
|
14
14
|
|
15
15
|
Or install it yourself as:
|
16
16
|
|
17
|
-
$ gem install
|
17
|
+
$ gem install payoneer_csv
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
`payoneer_csv [path to pdf report]`
|
22
|
+
|
23
|
+
Example:
|
24
|
+
|
25
|
+
|
26
|
+
```
|
27
|
+
$ payoneer_csv Transcations.pdf
|
28
|
+
Transaction Date,Description,Amount,Currency
|
29
|
+
10/26/2012 8:15:31 PM,Delikatesy Alma,-7.83,USD
|
30
|
+
10/26/2012 12:25:14 AM,DEEZER,-4.87,USD
|
31
|
+
10/23/2012 6:28:09 AM,SJO Empik,-23.17,USD
|
32
|
+
...
|
33
|
+
```
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
data/lib/payoneer_csv/version.rb
CHANGED
@@ -41,12 +41,12 @@ describe PayoneerCsv::PdfReader do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
context 'on valid row (with positive amount)' do
|
44
|
-
let(:row) { '10/19/2012 11:38:12 PM PSS SKLEP NR 54
|
44
|
+
let(:row) { '10/19/2012 11:38:12 PM PSS SKLEP NR 54 2,117.36 USD' }
|
45
45
|
|
46
46
|
it { should_not be_nil }
|
47
47
|
its([:created_at]) { should == '10/19/2012 11:38:12 PM' }
|
48
|
-
its([:description]) { should == 'PSS SKLEP NR 54
|
49
|
-
its([:amount]) { should == '
|
48
|
+
its([:description]) { should == 'PSS SKLEP NR 54 ' }
|
49
|
+
its([:amount]) { should == '2,117.36' }
|
50
50
|
end
|
51
51
|
|
52
52
|
context 'on invalid row' do
|
@@ -4,7 +4,7 @@ describe PayoneerCsv::Transaction do
|
|
4
4
|
let(:attributes) {
|
5
5
|
{
|
6
6
|
description: 'Sample transaction',
|
7
|
-
amount: '123.99',
|
7
|
+
amount: '2,123.99',
|
8
8
|
created_at: '10/19/2012 11:38:12 PM'
|
9
9
|
}
|
10
10
|
}
|
@@ -13,7 +13,7 @@ describe PayoneerCsv::Transaction do
|
|
13
13
|
subject { transaction }
|
14
14
|
|
15
15
|
its(:description) { should == attributes[:description] }
|
16
|
-
its(:amount) { should ==
|
16
|
+
its(:amount) { should == 2_123.99 }
|
17
17
|
its(:created_at) { should == attributes[:created_at] }
|
18
18
|
|
19
19
|
end
|