cmxl 1.4.3 → 1.4.4

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
  SHA256:
3
- metadata.gz: 0bd9ef8a843f9bf1a20ec1d857fea91c7d6f7367564c3e1ad70dcfac1d147296
4
- data.tar.gz: b39969a388a04aafa2f6a0bde21bb6756b82b32ac9ce95e2133f300e2b7b0e21
3
+ metadata.gz: 659574bcb0b01c7d048c9f64da650f5d6680e489eecd875c13619e6ec310e33d
4
+ data.tar.gz: 43e91209aa8598ab9c20f72e0fddabcaf9c0d8fcf0023d6edb896959f2956db9
5
5
  SHA512:
6
- metadata.gz: fe2990f15a8d062523319ec03c177576df2d65c976a62966eca5b819c5bdee41d4426a04b8d12ac05bf86b741e9532234e49cf1944e417496a2ccd0fa5725057
7
- data.tar.gz: b48de56367942523dd1306d24b8abe8659c10a2d0d67cd7ac52ea7ee5b3f445191b7ad7e119682f5827cb4100fdb5dd5474b491e82ab1de646300d0a2e1367bb
6
+ metadata.gz: 2c44dc0c4458ef320dc2e40406e1a98037fae46c8542d5dfb827f4fedae889f237d2f4b9dcefbd1166eaa0c0dd1a63a840a6d31b95e9e68063a854338c3ca081
7
+ data.tar.gz: 6f24a6efabd3e4d0a0bcf8a8ad8038cbc595a85ce1c76164bf130a79408990dcd51879004675bb65e17a77edb30475229cd0e39421ba2a3f74dd1230d5925585
@@ -0,0 +1,101 @@
1
+ version: v1.0
2
+ name: Test
3
+ agent:
4
+ machine:
5
+ type: e1-standard-2
6
+ os_image: ubuntu1804
7
+ blocks:
8
+ - name: Setup
9
+ task:
10
+ jobs:
11
+ - name: Checkout
12
+ commands:
13
+ - checkout
14
+ - ls
15
+ - rm -f .rbenv-version .ruby-version
16
+
17
+ - name: Tests
18
+ task:
19
+ env_vars:
20
+ - name: CC_TEST_REPORTER_ID
21
+ value: 149f0d20e17ace00c44be432a4194bc441ba805da89a7708fca0f4a2c3f2aed7
22
+ jobs:
23
+ - name: "2.0.0-p648"
24
+ commands:
25
+ - checkout
26
+ - sem-version ruby 2.0.0-p648
27
+ - cache restore
28
+ - bundle install
29
+ - cache store
30
+ - bundle exec rspec
31
+ - name: "2.1.10"
32
+ commands:
33
+ - checkout
34
+ - sem-version ruby 2.1.10
35
+ - cache restore
36
+ - bundle install
37
+ - cache store
38
+ - bundle exec rspec
39
+ - name: "2.2.10"
40
+ commands:
41
+ - checkout
42
+ - sem-version ruby 2.2.10
43
+ - cache restore
44
+ - bundle install
45
+ - cache store
46
+ - bundle exec rspec
47
+ - name: "2.3"
48
+ commands:
49
+ - checkout
50
+ - sem-version ruby 2.3
51
+ - cache restore
52
+ - bundle install
53
+ - cache store
54
+ - bundle exec rspec
55
+ - name: "2.4"
56
+ commands:
57
+ - checkout
58
+ - sem-version ruby 2.4
59
+ - cache restore
60
+ - bundle install
61
+ - cache store
62
+ - bundle exec rspec
63
+ - name: "2.5"
64
+ commands:
65
+ - checkout
66
+ - sem-version ruby 2.5
67
+ - cache restore
68
+ - bundle install
69
+ - cache store
70
+ - bundle exec rspec
71
+ - name: "2.6 including Code Climate"
72
+ commands:
73
+ - checkout
74
+ - sem-version ruby 2.6
75
+ - cache restore
76
+ - bundle install
77
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
78
+ - chmod +x ./cc-test-reporter
79
+ - cache store
80
+ - ./cc-test-reporter before-build
81
+ - bundle exec rspec
82
+ - ./cc-test-reporter after-build
83
+
84
+ - name: "jruby-9.1.17.0"
85
+ commands:
86
+ - checkout
87
+ - sem-version ruby jruby-9.1.17.0
88
+ - cache restore
89
+ - gem install bundler
90
+ - bundle install
91
+ - cache store
92
+ - bundle exec rspec
93
+ - name: "jruby-9.2.0.0"
94
+ commands:
95
+ - checkout
96
+ - sem-version ruby jruby-9.2.0.0
97
+ - cache restore
98
+ - gem install bundler
99
+ - bundle install
100
+ - cache store
101
+ - bundle exec rspec
@@ -1,3 +1,7 @@
1
+ # 1.4.4
2
+
3
+ - `[ENHANCEMENT]` adds transaction id parsing to statement details
4
+
1
5
  # 1.4.3
2
6
 
3
7
  - `[BUGFIX]` parse field identifier only at the beginning of lines
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "codeclimate-test-reporter", group: :test, require: nil
4
3
  # Specify your gem's dependencies in cmxl.gemspec
5
4
  gemspec
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- [![Build Status](https://travis-ci.org/railslove/cmxl.svg?branch=master)](https://travis-ci.org/railslove/cmxl)
1
+ [![Build Status](https://railslove.semaphoreci.com/badges/cmxl/branches/master.svg?style=shields)](https://railslove.semaphoreci.com/branches/96e7bf8e-be69-4f01-878c-be3dac0e6e8d)
2
+ [![Code Climate](https://codeclimate.com/github/railslove/cmxl/badges/gpa.svg)](https://codeclimate.com/github/railslove/cmxl)
3
+ [![Test Coverage](https://codeclimate.com/github/railslove/cmxl/badges/coverage.svg)](https://codeclimate.com/github/railslove/cmxl)
4
+ [![Gem Version](https://badge.fury.io/rb/cmxl.svg)](http://badge.fury.io/rb/cmxl)
2
5
 
3
6
  # Cmxl - your friendly ruby MT940 parser
4
7
 
@@ -61,7 +64,7 @@ statements.each do |s|
61
64
  puts s.generation_date
62
65
  puts s.opening_balance.amount
63
66
  puts s.closing_balance.amount
64
- puts s.sha # SHA of the statement source - could be used as an unique identifier
67
+ puts s.sha # SHA of the statement source - could be used as an identifier (see: https://github.com/railslove/cmxl/blob/master/lib/cmxl/statement.rb#L49-L55)
65
68
 
66
69
  s.transactions.each do |t|
67
70
  puts t.information
@@ -184,13 +187,6 @@ other parsers:
184
187
  - [betterplace/mt940_parser](https://github.com/betterplace/mt940_parser)
185
188
  - [gmitrev/mt940parser](https://github.com/gmitrev/mt940parser)
186
189
 
187
- ## Stats
188
-
189
- [![Build Status](https://travis-ci.org/railslove/cmxl.svg)](https://travis-ci.org/railslove/cmxl)
190
- [![Code Climate](https://codeclimate.com/github/railslove/cmxl/badges/gpa.svg)](https://codeclimate.com/github/railslove/cmxl)
191
- [![Test Coverage](https://codeclimate.com/github/railslove/cmxl/badges/coverage.svg)](https://codeclimate.com/github/railslove/cmxl)
192
- [![Gem Version](https://badge.fury.io/rb/cmxl.svg)](http://badge.fury.io/rb/cmxl)
193
-
194
190
  ---
195
191
 
196
192
  2014 - built with love by [Railslove](http://railslove.com) and released under the MIT-Licence. We have built quite a number of FinTech products. If you need support we are happy to help. Please contact us at team@railslove.com.
@@ -38,6 +38,10 @@ module Cmxl
38
38
  end
39
39
  end
40
40
 
41
+ def transaction_id
42
+ sub_fields['10']
43
+ end
44
+
41
45
  def bic
42
46
  sub_fields['30']
43
47
  end
@@ -60,6 +64,7 @@ module Cmxl
60
64
  'description' => description,
61
65
  'sub_fields' => sub_fields,
62
66
  'transaction_code' => transaction_code,
67
+ 'transaction_id' => transaction_id,
63
68
  'details' => details
64
69
  }
65
70
  end
@@ -126,6 +126,10 @@ module Cmxl
126
126
  details.sub_fields if details
127
127
  end
128
128
 
129
+ def transaction_id
130
+ details.transaction_id if details
131
+ end
132
+
129
133
  def to_h
130
134
  {
131
135
  'sha' => sha,
@@ -1,3 +1,3 @@
1
1
  module Cmxl
2
- VERSION = '1.4.3'.freeze
2
+ VERSION = '1.4.4'.freeze
3
3
  end
@@ -70,6 +70,7 @@ describe Cmxl::Fields::StatementDetails do
70
70
  '99' => ''
71
71
  },
72
72
  'transaction_code' => '171',
73
+ 'transaction_id' => '281',
73
74
  'details' => '?00SEPA LASTSCHRIFT KUNDE?10281?20KREF+EREF+TRX-0A4A47C3-F846-4729?21-8A1B-5DF620F?22MREF+CAC97D2144174318AC18D9?23BF815BD4FB?24CRED+DE98ZZZ09999999999?25SVWZ+FOO TRX-0A4A47C3-F84?266-4729-8A1B-5DF620F?30HYVEDEMMXXX?31HUkkbbbsssskcccccccccccccccx?32Peter Pan?99?34171'
74
75
  )
75
76
  }
@@ -13,6 +13,7 @@ describe Cmxl do
13
13
  it { expect(subject.entry_date).to eql(Date.new(2014, 9, 2)) }
14
14
  it { expect(subject.amount).to eql(1.62) }
15
15
  it { expect(subject.amount_in_cents).to eql(162) }
16
+ it { expect(subject.transaction_id).to eql('281') }
16
17
  it {
17
18
  expect(subject.to_h).to eql(
18
19
  'date' => Date.new(2014, 9, 1),
@@ -58,6 +59,7 @@ describe Cmxl do
58
59
  '34' => '171'
59
60
  },
60
61
  'transaction_code' => '171',
62
+ 'transaction_id' => '281',
61
63
  'details' => '?00SEPA LASTSCHRIFT KUNDE?10281?20KREF+EREF+TRX-0A4A47C3-F846-4729?21-8A1B-5DF620F?22:FOO:MREF+CAC97D2144174318A?23BF815BD4FB?24CRED+DE98ZZZ09999999999?25SVWZ+FOO TRX-0A4A47C3-F84?266-4729-8A1B-5DF620F?30HYVEDEMMXXX?31HUkkbbbsssskcccccccccccccccx?32Peter Pan?99?34171'
62
64
  )
63
65
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmxl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bumann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,7 @@ extra_rdoc_files: []
104
104
  files:
105
105
  - ".gitignore"
106
106
  - ".rspec"
107
- - ".travis.yml"
107
+ - ".semaphore/semaphore.yml"
108
108
  - CHANGELOG.mdown
109
109
  - Gemfile
110
110
  - LICENSE.txt
@@ -1,18 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.8
5
- - 2.3.4
6
- - 2.4.3
7
- - 2.5.0
8
- - jruby-9.1.10.0
9
- before_install: if [[ `ruby -v` =~ 2.2.8 ]];
10
- then gem update --system 2.7.8;
11
- else gem update --system;
12
- fi
13
-
14
- after_success:
15
- - bundle exec codeclimate-test-reporter
16
- addons:
17
- code_climate:
18
- repo_token: 149f0d20e17ace00c44be432a4194bc441ba805da89a7708fca0f4a2c3f2aed7