aranha-parsers 0.4.0 → 0.5.0

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: 0dadc530b038db01e0c406f7b6a63e41a110368248cc161bcf0b3a1868c6d6a5
4
- data.tar.gz: 7f37a14996bca222758745f0f8ce458b6b9501546f010d013387bd81eebc291f
3
+ metadata.gz: 990eaaf39db15ed3c74d22039dd4c10ef005a5f46d8e6325087a7517f9795ae9
4
+ data.tar.gz: 895b5ab2673ff4663576e6a41bfaba3fe96d324df59617e8cfc4f9f116929af2
5
5
  SHA512:
6
- metadata.gz: cbd70b4d4e8bba0613a20532fd32718dc6b45b59ef1d53ce8b779373e9dd9d6b095a14d08bbdc3fb11194df5018e46ff0b661099a00c35aa6bc146e84526d834
7
- data.tar.gz: d31695d31dbb56f1a2aba09b2b2dc81e28cf1c258a9e9c46334e5c6c0e4df55f0bc61cebd6c695ed5a34753bdb1d3d93786d4ffade6e1e6d841a865e48911885
6
+ metadata.gz: 1387956a1035e8984ec724ddff13933b567ca1a8155eec4b7d61c52374d0d9ec398966e146bb46356d57b68cab5926e4ce7a610aed52dac77f5a87eeba5b0d55
7
+ data.tar.gz: 34f475e75e54677aad15a5650f112acf72a16e50dc4729e8226705181c82d4dc813cc8dbf79493d0a184f4039d947a943cc91bd62e830f797153021194809594
@@ -1,11 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/require_sub'
4
+
3
5
  module Aranha
4
6
  module Parsers
5
- require 'aranha/parsers/base'
6
- require 'aranha/parsers/html'
7
- require 'aranha/parsers/invalid_state_exception'
8
- require 'aranha/parsers/source_address'
9
- require 'aranha/parsers/version'
7
+ ::EacRubyUtils.require_sub __FILE__
10
8
  end
11
9
  end
@@ -1,12 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/require_sub'
4
+
3
5
  module Aranha
4
6
  module Parsers
5
7
  module Html
6
- require 'aranha/parsers/html/base'
7
- require 'aranha/parsers/html/item'
8
- require 'aranha/parsers/html/item_list'
9
- require 'aranha/parsers/html/node'
8
+ ::EacRubyUtils.require_sub __FILE__
10
9
  end
11
10
  end
12
11
  end
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/require_sub'
4
+
3
5
  module Aranha
4
6
  module Parsers
5
7
  module Html
6
8
  module Node
7
- require 'aranha/parsers/html/node/base'
8
- require 'aranha/parsers/html/node/default'
9
+ ::EacRubyUtils.require_sub __FILE__
9
10
  end
10
11
  end
11
12
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+
5
+ module Aranha
6
+ module Parsers
7
+ module Patches
8
+ ::EacRubyUtils.require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ofx-parser'
4
+
5
+ module Aranha
6
+ module Parsers
7
+ module Patches
8
+ module OfxParser
9
+ module OfxParser
10
+ def self.included(base)
11
+ base.class_eval do
12
+ class << self
13
+ prepend ClassMethods
14
+ end
15
+ end
16
+ end
17
+
18
+ module ClassMethods
19
+ def build_transaction(transaction)
20
+ r = super
21
+ r.currate = (transaction / 'CURRENCY/CURRATE').inner_text
22
+ r
23
+ end
24
+ end
25
+ end
26
+
27
+ module Transaction
28
+ attr_accessor :currate, :cursym
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ require 'eac_ruby_utils/patch'
36
+
37
+ ::EacRubyUtils.patch(::OfxParser::OfxParser, ::Aranha::Parsers::Patches::OfxParser::OfxParser)
38
+ ::EacRubyUtils.patch(::OfxParser::Transaction, ::Aranha::Parsers::Patches::OfxParser::Transaction)
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'yaml'
4
3
  require 'active_support/core_ext/module/delegation'
5
- require 'aranha/parsers/source_address/hash_http_get'
6
- require 'aranha/parsers/source_address/hash_http_post'
7
- require 'aranha/parsers/source_address/http_get'
8
- require 'aranha/parsers/source_address/file'
4
+ require 'eac_ruby_utils/require_sub'
5
+ require 'yaml'
9
6
 
10
7
  module Aranha
11
8
  module Parsers
12
9
  class SourceAddress
10
+ ::EacRubyUtils.require_sub __FILE__
11
+
13
12
  class << self
14
13
  SUBS = [
15
14
  ::Aranha::Parsers::SourceAddress::HashHttpGet,
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'active_support/core_ext/object'
4
4
  require 'active_support/core_ext/string'
5
- require 'yaml'
6
5
 
7
6
  module Aranha
8
7
  module Parsers
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranha-parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-21 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -52,6 +52,26 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.9.10
55
+ - !ruby/object:Gem::Dependency
56
+ name: eac_ruby_utils
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.33'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.33.1
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.33'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.33.1
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: httpclient
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -72,6 +92,20 @@ dependencies:
72
92
  - - ">="
73
93
  - !ruby/object:Gem::Version
74
94
  version: 2.8.3
95
+ - !ruby/object:Gem::Dependency
96
+ name: ofx-parser
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: 1.1.0
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: 1.1.0
75
109
  - !ruby/object:Gem::Dependency
76
110
  name: eac_ruby_gem_support
77
111
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +137,8 @@ files:
103
137
  - lib/aranha/parsers/html/node/base.rb
104
138
  - lib/aranha/parsers/html/node/default.rb
105
139
  - lib/aranha/parsers/invalid_state_exception.rb
140
+ - lib/aranha/parsers/patches.rb
141
+ - lib/aranha/parsers/patches/ofx_parser.rb
106
142
  - lib/aranha/parsers/source_address.rb
107
143
  - lib/aranha/parsers/source_address/file.rb
108
144
  - lib/aranha/parsers/source_address/hash_http_get.rb