thirteen_f 0.2.9 → 0.3.0
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 +4 -4
- data/lib/thirteen_f/position.rb +5 -10
- data/lib/thirteen_f/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e093431c9735d54ad5dfcfcf9f7a6a0b05dfbb91e3a3ef7ea3b52967907de11
|
|
4
|
+
data.tar.gz: d0abf210d710d1bf5876291d6d976ce388cf68597a2729020d602de9db96b8ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed391b2b422b3254814334d29b83af10f5e47cbe0f4ca73726cdb5fad2987a571cd32f19f8ea8360515867fcd8f33f55fb8437a4346119c3ec7182d5dbf0d996
|
|
7
|
+
data.tar.gz: be535e2cc291eb3fe56ccaeb9c987f8925f19b34572b5206614b441876351544d7398abfe5784d009f79f71462ba501e52c7d5b004b8843043a8122c61aa8852
|
data/lib/thirteen_f/position.rb
CHANGED
|
@@ -10,20 +10,15 @@ class ThirteenF
|
|
|
10
10
|
|
|
11
11
|
def self.from_xml_filing(filing)
|
|
12
12
|
return nil unless filing.table_xml_url
|
|
13
|
-
|
|
14
|
-
xml_doc = Nokogiri::XML response.to_s
|
|
15
|
-
xml_doc.search('infoTable').map do |info_table|
|
|
16
|
-
position = new filing: filing
|
|
17
|
-
position.attributes_from_info_table(info_table)
|
|
18
|
-
position
|
|
19
|
-
end
|
|
13
|
+
from_xml_url(filing.table_xml_url, filing: filing)
|
|
20
14
|
end
|
|
21
15
|
|
|
22
|
-
def self.from_xml_url(table_xml_url)
|
|
16
|
+
def self.from_xml_url(table_xml_url, filing: nil)
|
|
23
17
|
response = HTTP.get table_xml_url
|
|
24
18
|
xml_doc = Nokogiri::XML response.to_s
|
|
25
|
-
xml_doc.
|
|
26
|
-
|
|
19
|
+
xml_doc.remove_namespaces!
|
|
20
|
+
xml_doc.search("//infoTable").map do |info_table|
|
|
21
|
+
position = new filing: filing
|
|
27
22
|
position.attributes_from_info_table(info_table)
|
|
28
23
|
position
|
|
29
24
|
end
|
data/lib/thirteen_f/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thirteen_f
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- fordfischer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|