sec_query 1.0.9 → 1.1.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
  SHA1:
3
- metadata.gz: 3c3c9f7d7dedad6a2a5ea797e3e7976819357089
4
- data.tar.gz: e4679b4d26bbaac6864a8fd4c56b848cf19ccc68
3
+ metadata.gz: 10cc642633f4e01fb1bebd0d1f611766e3f93a69
4
+ data.tar.gz: 2f50d5d488d8504299e2fd01f852e76b784aec2a
5
5
  SHA512:
6
- metadata.gz: a72bc87cec1f0326c6bb4dc0496348e734c5832821399d715561163e95ae82ba9f90b92fa0791e35dd920cdf7757a44f0af5485928350b64e2f2da4d4285b151
7
- data.tar.gz: 9ac484fd588f4de9d81b700103cc21bc4f2195e72c6d816d28c6d038b594ce03d6afcce2906ea1c57697b5839b2c56e8b681a137c49bd37f8aa501e47c40ad55
6
+ metadata.gz: 4f5846cda290b9c3f2182460842e9263c1a2d60bbb5ae07d2abce512ce15d6f47220acaac721777af46b38b487115708db9652d4e911b618a965bb1baaea9fa6
7
+ data.tar.gz: 0053b07879bf113fb79127bcac37decc9b6a8569f12404597e81827940fe9923110515e31f074f2ef61056560e350c6e4195016746ebe4d6e34e5bbb47c634af
@@ -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],
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  # => SecQuery::VERSION
3
3
  module SecQuery
4
- VERSION = "1.0.9"
4
+ VERSION = "1.1.0"
5
5
  end
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.9
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-05-31 00:00:00.000000000 Z
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: