thirteen_f 0.5.8 → 0.5.9

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: c9773a685a61e1713a417d4aef59fb58b211cfe7fea47800924c9db97d58a286
4
- data.tar.gz: 1d1541d8f279d47fd98980755a975aaa3c48e621faa964d47970bc25b6b3ef4f
3
+ metadata.gz: 369e8186185983d60f194d55ddddd7dbd46d12d9e981023e5ed7043b090a6115
4
+ data.tar.gz: 5d0a4e7108e254484cb2d1c86a0c2a6a011e29619fcf1f6cb1c3f6cab53027f8
5
5
  SHA512:
6
- metadata.gz: 80336d550bcb73bb1ef81675944b677e090ea1627c8cc0457ef49ea18b3d6c9dcaa2bc3749a5c6800694da2a1142a3668e8b69787b0134852e700f348c00e9d6
7
- data.tar.gz: 3a5fe0414f07e6eb4848be4af5d109a5b34e79b479db433c68709c6081e1ce6f41186b9cecc883d2c394f717c008c5c46a5ccc74b4a35fd99927bdd40bc1de8b
6
+ metadata.gz: c7f33972184bab82574256bf799581a2fbc87c8c9f8a02076345d45d0934d189812fc6b8df9905ab3474d6a2582470400e85cc985cd9b28c75d0eb60984e62cb
7
+ data.tar.gz: 7a36382d29fc2a22a2535578debfd34fb35755d94333ee973402808b4fd87078673d3d006d994cfa75545f3d97a43729aae9e485d080526b4f78a7b3bfaa5e11
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- thirteen_f (0.5.8)
4
+ thirteen_f (0.5.9)
5
5
  http (>= 5.1)
6
6
  nokogiri (>= 1.15)
7
7
  pdf-reader (>= 2.11)
@@ -3,25 +3,27 @@
3
3
  class ThirteenF
4
4
  class Position
5
5
  attr_reader :name_of_issuer, :title_of_class, :cusip, :value_in_thousands,
6
- :shares_or_principal_amount_type, :shares_or_principal_amount, :put_or_call,
7
- :investment_discretion, :other_managers, :voting_authority, :filing
6
+ :shares_or_principal_amount_type, :shares_or_principal_amount,
7
+ :put_or_call, :investment_discretion, :other_managers, :voting_authority,
8
+ :filing, :time_accepted
8
9
 
9
10
  def self.from_xml_filing(filing)
10
11
  return nil unless filing.table_xml_url
11
12
  from_xml_url(filing.table_xml_url, filing: filing)
12
13
  end
13
14
 
14
- def self.from_xml_url(table_xml_url, filing: nil)
15
+ def self.from_xml_url(table_xml_url, filing: nil, time_accepted: nil)
15
16
  xml_doc = SecRequest.get table_xml_url, response_type: :xml
16
17
  xml_doc.search("//infoTable").map do |info_table|
17
- position = new filing: filing
18
+ position = new filing: filing, time_accepted: time_accepted
18
19
  position.attributes_from_info_table(info_table)
19
20
  position
20
21
  end
21
22
  end
22
23
 
23
- def initialize(filing: nil)
24
+ def initialize(filing: nil, time_accepted: nil)
24
25
  @filing = filing
26
+ @time_accepted = time_accepted
25
27
  end
26
28
 
27
29
  def attributes_from_info_table(info_table)
@@ -54,7 +56,7 @@ class ThirteenF
54
56
  # quarter ending December 31, 2022, and for any other preceding or
55
57
  # succeeding calendar quarter), must use the updated Form 13F.
56
58
  def set_value_to_thousands(text)
57
- before_change = filing.time_accepted < Date.parse('2023-01-03')
59
+ before_change = time_accepted < Date.parse('2023-01-03')
58
60
  if before_change
59
61
  to_float(text)
60
62
  else
@@ -1,3 +1,3 @@
1
1
  class ThirteenF
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thirteen_f
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Savannah Fischer