sec_query 1.0.9 → 1.1.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/sec_query/filing.rb +7 -0
- data/lib/sec_query/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10cc642633f4e01fb1bebd0d1f611766e3f93a69
|
4
|
+
data.tar.gz: 2f50d5d488d8504299e2fd01f852e76b784aec2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f5846cda290b9c3f2182460842e9263c1a2d60bbb5ae07d2abce512ce15d6f47220acaac721777af46b38b487115708db9652d4e911b618a965bb1baaea9fa6
|
7
|
+
data.tar.gz: 0053b07879bf113fb79127bcac37decc9b6a8569f12404597e81827940fe9923110515e31f074f2ef61056560e350c6e4195016746ebe4d6e34e5bbb47c634af
|
data/lib/sec_query/filing.rb
CHANGED
@@ -77,11 +77,18 @@ module SecQuery
|
|
77
77
|
def self.filing_for_index_row(row)
|
78
78
|
data = row.split(/ /).reject(&:blank?).map(&:strip)
|
79
79
|
data = row.split(/ /).reject(&:blank?).map(&:strip) if data.count == 4
|
80
|
+
return nil unless data[0] and data[1] and data[2] and data[3] and data[4]
|
80
81
|
data.delete_at(1) if data[1][0] == '/'
|
81
82
|
return nil unless Regexp.new(/\d{8}/).match(data[3])
|
83
|
+
return nil if data[4] == nil
|
82
84
|
unless data[4][0..3] == 'http'
|
83
85
|
data[4] = "http://www.sec.gov/Archives/#{ data[4] }"
|
84
86
|
end
|
87
|
+
begin
|
88
|
+
Date.parse(data[3])
|
89
|
+
rescue ArgumentError
|
90
|
+
return nil
|
91
|
+
end
|
85
92
|
Filing.new(
|
86
93
|
term: data[1],
|
87
94
|
cik: data[2],
|
data/lib/sec_query/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sec_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ty Rauber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -171,3 +171,4 @@ test_files:
|
|
171
171
|
- spec/support/filings/filing.txt
|
172
172
|
- spec/support/idx/test.idx
|
173
173
|
- spec/support/vcr.rb
|
174
|
+
has_rdoc:
|