sec_query 1.1.0 → 1.2.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: 10cc642633f4e01fb1bebd0d1f611766e3f93a69
4
- data.tar.gz: 2f50d5d488d8504299e2fd01f852e76b784aec2a
3
+ metadata.gz: 7fcc071c9c2a20d9785eb3e18f08bafb8aa5d76a
4
+ data.tar.gz: 28e85cbe4e92ca568bdd66477bb34b345ec0a3b9
5
5
  SHA512:
6
- metadata.gz: 4f5846cda290b9c3f2182460842e9263c1a2d60bbb5ae07d2abce512ce15d6f47220acaac721777af46b38b487115708db9652d4e911b618a965bb1baaea9fa6
7
- data.tar.gz: 0053b07879bf113fb79127bcac37decc9b6a8569f12404597e81827940fe9923110515e31f074f2ef61056560e350c6e4195016746ebe4d6e34e5bbb47c634af
6
+ metadata.gz: da3bc6d656bebf0c4248a2c476caa5c9fec28ad2e1cf9f2c2cd06b16519a802045255257d525bc3afd85c52e00689258fbc87fc7724621fdda65ad19f5bdf07e
7
+ data.tar.gz: f04996d7a20f500ee31e83798efa1cd1930f6d909fb86b5e94b3f7f5f9c29591cba74d701a18e742d8849d62ff414491f3e8c4c2a9b1f39f888440539b71f057
data/README.md CHANGED
@@ -6,6 +6,10 @@ Look-up an Entity - person or company - by Central Index Key (CIK), stock symbol
6
6
 
7
7
  Additionally retrieve some, or all, Relationships, Transactions and Filings as recorded by the SEC.
8
8
 
9
+ ## Note: 9/13/16, SEC.GOV embraces SSL!
10
+
11
+ On or before Septmember 13th, 2016, the SEC.gov updated their site to use SSL (Huzzah!). Version 1.2.0 addresses this change. All versions less than 1.2.0, will cease to function as expected. Update immeditiately.
12
+
9
13
  ## Installation
10
14
 
11
15
  To install the 'sec_query' Ruby Gem run the following command at the terminal prompt.
@@ -53,7 +53,7 @@ module SecQuery
53
53
  content['formerly_names'] = content.delete('formerly_names')['names']
54
54
  end
55
55
  content['addresses']['address'].each do |address|
56
- content["#{address['type']}_address"] = address
56
+ content["#{address['type']}_address"] = address unless address.nil?
57
57
  end
58
58
  return content
59
59
  else
@@ -82,7 +82,7 @@ module SecQuery
82
82
  return nil unless Regexp.new(/\d{8}/).match(data[3])
83
83
  return nil if data[4] == nil
84
84
  unless data[4][0..3] == 'http'
85
- data[4] = "http://www.sec.gov/Archives/#{ data[4] }"
85
+ data[4] = "https://www.sec.gov/Archives/#{ data[4] }"
86
86
  end
87
87
  begin
88
88
  Date.parse(data[3])
@@ -81,7 +81,7 @@ module SecQuery
81
81
 
82
82
  def initialize
83
83
  self.host = 'www.sec.gov'
84
- self.scheme = 'http'
84
+ self.scheme = 'https'
85
85
  self.path = 'cgi-bin'
86
86
  end
87
87
 
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  # => SecQuery::VERSION
3
3
  module SecQuery
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
data/sec_query.gemspec CHANGED
@@ -20,11 +20,12 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  s.require_paths = ['lib']
22
22
 
23
- s.add_development_dependency 'rspec', '~> 2.14'
24
- s.add_development_dependency 'vcr', '~> 2.9'
25
- s.add_development_dependency 'webmock', '~> 1.17'
26
- s.add_development_dependency 'rubocop', '~> 0.20'
23
+ s.add_development_dependency 'rspec', '~> 3.4'
24
+ s.add_development_dependency 'vcr', '~> 3.0.1'
25
+ s.add_development_dependency 'webmock', '~> 1.24.6'
26
+ s.add_development_dependency 'rubocop', '~> 0.40'
27
+ s.add_development_dependency 'byebug', '~> 9.0.5'
28
+ s.add_runtime_dependency 'rest-client', '~> 1.8'
27
29
  s.add_runtime_dependency 'addressable', '~> 2.3'
28
- s.add_runtime_dependency 'rest-client', '~> 1.6'
29
30
  s.add_runtime_dependency 'nokogiri', '~> 1.6'
30
31
  end
@@ -5,12 +5,12 @@ require 'spec_helper'
5
5
  describe SecQuery::Filing do
6
6
  it '::uri_for_recent' do
7
7
  expect(SecQuery::Filing.uri_for_recent.to_s)
8
- .to eq('http://www.sec.gov/cgi-bin/browse-edgar?action=getcurrent&company&count=100&output=atom&owner=include&start=0')
8
+ .to eq('https://www.sec.gov/cgi-bin/browse-edgar?action=getcurrent&company&count=100&output=atom&owner=include&start=0')
9
9
  end
10
10
 
11
11
  it '::uri_for_cik' do
12
12
  expect(SecQuery::Filing.uri_for_cik('testing').to_s)
13
- .to eq('http://www.sec.gov/cgi-bin/browse-edgar?CIK=testing&action=getcompany&company&count=100&output=atom&owner=include&start=0')
13
+ .to eq('https://www.sec.gov/cgi-bin/browse-edgar?CIK=testing&action=getcompany&company&count=100&output=atom&owner=include&start=0')
14
14
  end
15
15
 
16
16
  describe '::filings_for_index' do
@@ -23,7 +23,7 @@ describe SecQuery::Filing do
23
23
 
24
24
  it 'correctly parses out the link' do
25
25
  expect(filing1.link)
26
- .to eq('http://www.sec.gov/Archives/edgar/data/38723/0000038723-14-000001.txt')
26
+ .to eq('https://www.sec.gov/Archives/edgar/data/38723/0000038723-14-000001.txt')
27
27
  end
28
28
 
29
29
  it 'correctly parses out the cik' do
@@ -51,7 +51,7 @@ describe SecQuery::Filing do
51
51
  expect(filing1.cik).to eq('1551138')
52
52
  expect(filing1.date).to eq(Date.parse('20121123'))
53
53
  expect(filing1.link)
54
- .to eq('http://www.sec.gov/Archives/edgar/data/1551138/0001144204-12-064668.txt')
54
+ .to eq('https://www.sec.gov/Archives/edgar/data/1551138/0001144204-12-064668.txt')
55
55
  end
56
56
 
57
57
  it 'returns nil if for_date is run on a market close day' do
@@ -134,7 +134,7 @@ describe SecQuery::Filing do
134
134
  cik: 123,
135
135
  title: 'test filing title',
136
136
  summary: 'test filing',
137
- link: 'http://www.sec.gov/Archives/edgar/data/1572871/000114036114019536/0001140361-14-019536.txt',
137
+ link: 'https://www.sec.gov/Archives/edgar/data/1572871/000114036114019536/0001140361-14-019536.txt',
138
138
  term: '4',
139
139
  date: Date.today,
140
140
  file_id: 1
@@ -7,31 +7,31 @@ describe SecQuery::SecURI do
7
7
  describe '#browse_edgar_uri' do
8
8
  it 'builds a default /browse-edgar/ url' do
9
9
  uri = SecQuery::SecURI.browse_edgar_uri
10
- expect(uri.to_s).to eq('http://www.sec.gov/cgi-bin/browse-edgar')
10
+ expect(uri.to_s).to eq('https://www.sec.gov/cgi-bin/browse-edgar')
11
11
  end
12
12
 
13
13
  it 'builds a default /browse-edgar/ url with options: {symbol: "AAPL"}' do
14
14
  uri = SecQuery::SecURI.browse_edgar_uri(symbol: 'AAPL')
15
15
  expect(uri.to_s)
16
- .to include('http://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
16
+ .to include('https://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
17
17
  end
18
18
 
19
19
  it 'builds a default /browse-edgar/ url with options: {cik: "AAPL"}' do
20
20
  uri = SecQuery::SecURI.browse_edgar_uri(cik: 'AAPL')
21
21
  expect(uri.to_s)
22
- .to include('http://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
22
+ .to include('https://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
23
23
  end
24
24
 
25
25
  it 'builds a default /browse-edgar/ url with options: "AAPL"' do
26
26
  uri = SecQuery::SecURI.browse_edgar_uri('AAPL')
27
27
  expect(uri.to_s)
28
- .to eq('http://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
28
+ .to eq('https://www.sec.gov/cgi-bin/browse-edgar?CIK=AAPL')
29
29
  end
30
30
 
31
31
  it 'builds a default /browse-edgar/ url with options: "Apple"' do
32
32
  uri = SecQuery::SecURI.browse_edgar_uri('Apple')
33
33
  expect(uri.to_s)
34
- .to eq('http://www.sec.gov/cgi-bin/browse-edgar?company=Apple')
34
+ .to eq('https://www.sec.gov/cgi-bin/browse-edgar?company=Apple')
35
35
  end
36
36
  end
37
37
 
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@ require 'sec_query'
6
6
  require 'support/vcr'
7
7
 
8
8
  def is_valid?(entity)
9
- entity.should_not be_nil
9
+ expect(entity).to_not be_nil
10
10
  entity.name.should == query[:name]
11
11
  entity.cik.should == query[:cik]
12
12
  entity.instance_variables.each do |key|
@@ -15,14 +15,14 @@ def is_valid?(entity)
15
15
  end
16
16
 
17
17
  def is_valid_address?(address)
18
- address.should_not be_nil
18
+ expect(address).to_not be_nil
19
19
  address.keys.each do |key|
20
20
  ['city', 'state', 'street1', 'street2', 'type', 'zip', 'phone'].should include(key)
21
21
  end
22
22
  end
23
23
 
24
24
  def is_valid_filing?(filing)
25
- filing.should_not be_nil
25
+ expect(filing).to_not be_nil
26
26
  filing.instance_variables.each do |key|
27
27
  SecQuery::Filing::COLUMNS.should include(key[1..-1].to_sym)
28
28
  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.1.0
4
+ version: 1.2.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-08-04 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,84 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.14'
19
+ version: '3.4'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.14'
26
+ version: '3.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: vcr
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.9'
33
+ version: 3.0.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.9'
40
+ version: 3.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.17'
47
+ version: 1.24.6
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.17'
54
+ version: 1.24.6
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.20'
61
+ version: '0.40'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.20'
68
+ version: '0.40'
69
69
  - !ruby/object:Gem::Dependency
70
- name: addressable
70
+ name: byebug
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '2.3'
76
- type: :runtime
75
+ version: 9.0.5
76
+ type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '2.3'
82
+ version: 9.0.5
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rest-client
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.6'
89
+ version: '1.8'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.6'
96
+ version: '1.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: addressable
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.3'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.3'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: nokogiri
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -157,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
171
  version: '0'
158
172
  requirements: []
159
173
  rubyforge_project: sec_query
160
- rubygems_version: 2.2.2
174
+ rubygems_version: 2.5.1
161
175
  signing_key:
162
176
  specification_version: 4
163
177
  summary: A ruby gem for querying the United States Securities and Exchange Commission
@@ -171,4 +185,3 @@ test_files:
171
185
  - spec/support/filings/filing.txt
172
186
  - spec/support/idx/test.idx
173
187
  - spec/support/vcr.rb
174
- has_rdoc: