extras_de_cont 1.0.0 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45c645d6d5fc89fb998902c22056fb81e1a47fadfd1337492119ca9146f809d3
4
- data.tar.gz: 3717d8ac49c1779fc31db92f8405c79e9bdb44fa5cd07d38173c35d14c4ef49f
3
+ metadata.gz: 3adf9f273d4799d379dd3b863486098e0f74713c679abeea1c4d3bc9c19c84f3
4
+ data.tar.gz: a4f71318dfc8c9ee3a604b776bc0975b3af69d8487cdddef78c25a754193fcda
5
5
  SHA512:
6
- metadata.gz: c37d86a1c6e8a7e885226c0d0a9710129e119d4bc5b93fcd2b1b6863de7d455f557ef6ee827b53689cf01ff134ba37f1a7c15537681ca0010cca73767611754d
7
- data.tar.gz: 32b6256f9e0c00689a781ff168afb74c16688672ae0bc7f307c94c0559a19bb5198e143530926ba7eff458457ddddc4c2da065edfd4436084e0d02e1822c042f
6
+ metadata.gz: e6b6afc9476cdf5dfb67f1dbb6e7cf8404da6757329cc3435a9bb42d0f064a4fa0a7df98a30003ed4fd821724551933076a88a75dd156e4c2818989a73aa0487
7
+ data.tar.gz: adb65db1676e5181ae680a45ab1c0c0b56ed6a3d8622b591fe5fa5cba4d670ed00e990318d72919664194e6c5d83630882561294cf1bfa65b42b2c77a92875a7
@@ -2,17 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "extras_de_cont"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.2"
6
6
  s.licenses = ["GPLv3"]
7
7
  s.summary = "A simple library which helps you extract transactions from a PDF bank statement."
8
8
  s.description = <<~TEXT
9
- "A simple library which helps you extract transactions from a PDF bank statement.
10
- Fine tuned for Romanian bank statements."
9
+ A simple library which helps you extract transactions from a PDF bank statement.
10
+ Fine tuned for Romanian bank statements.
11
+
12
+ Repository: https://github.com/dnutiu/extras-de-cont
11
13
  TEXT
12
14
  s.authors = ["Denis Nutiu"]
13
15
  s.email = "dnutiu@nuculabs.dev"
14
16
  s.homepage = "https://nuculabs.dev"
15
- s.metadata = {"source_code_uri" => "https://gitlab.nuculabs.dev/dnutiu/extras-de-cont"}
17
+ s.metadata = { "source_code_uri" => "https://gitlab.nuculabs.dev/dnutiu/extras-de-cont",
18
+ "rubygems_mfa_required" => "true" }
16
19
  s.required_ruby_version = ">= 3.0.0"
17
20
 
18
21
  # Files to include in the gem
@@ -2,6 +2,7 @@
2
2
 
3
3
  module ExtrasDeCont
4
4
  module Rules
5
+ # The base class for implementing bank specific transaction parsing rules.
5
6
  class Base
6
7
  def parse(_text)
7
8
  raise NotImplementedError, "#{self.class} must implement #parse"
@@ -5,6 +5,7 @@ require "extras_de_cont/transaction"
5
5
 
6
6
  module ExtrasDeCont
7
7
  module Rules
8
+ # Rules for parsing Revolut bank statements.
8
9
  class Revolut < Rules::Base
9
10
  SECTION_HEADERS = [
10
11
  "Pending from ",
@@ -147,12 +148,10 @@ module ExtrasDeCont
147
148
  return if amount_matches.empty?
148
149
 
149
150
  transaction_match = if table.fetch(:has_balance)
150
- if amount_matches.length > 1
151
- amount_matches[-2]
152
- end
153
- else
154
- amount_matches[-1]
155
- end
151
+ amount_matches[-2] if amount_matches.length > 1
152
+ else
153
+ amount_matches[-1]
154
+ end
156
155
  return if transaction_match.nil?
157
156
 
158
157
  description = row[date_match.end(0)...transaction_match.begin(0)].to_s.strip
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extras_de_cont
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Nutiu
@@ -24,8 +24,10 @@ dependencies:
24
24
  - !ruby/object:Gem::Version
25
25
  version: '2.15'
26
26
  description: |
27
- "A simple library which helps you extract transactions from a PDF bank statement.
28
- Fine tuned for Romanian bank statements."
27
+ A simple library which helps you extract transactions from a PDF bank statement.
28
+ Fine tuned for Romanian bank statements.
29
+
30
+ Repository: https://github.com/dnutiu/extras-de-cont
29
31
  email: dnutiu@nuculabs.dev
30
32
  executables: []
31
33
  extensions: []
@@ -45,6 +47,7 @@ licenses:
45
47
  - GPLv3
46
48
  metadata:
47
49
  source_code_uri: https://gitlab.nuculabs.dev/dnutiu/extras-de-cont
50
+ rubygems_mfa_required: 'true'
48
51
  rdoc_options: []
49
52
  require_paths:
50
53
  - lib