stock_index 0.8.4 → 0.8.5
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/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/cache/test.pstore +0 -0
- data/lib/stock_index/symbol_parser.rb +0 -9
- data/lib/stock_index/version.rb +1 -1
- data/spec/stock_index/component_spec.rb +9 -9
- data/spec/stock_index/{stock_index_spec.rb → stock_index_spec_.rb} +0 -0
- data/spec/stock_index/symbol_parser_spec.rb +2 -14
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0994ef974caef24ee63eeef337bbb988bf49e6a
|
|
4
|
+
data.tar.gz: db6e40cd2efe1f3d701d05bc8b5b95d47ad995fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4dabf1c0226bb5c9dd10a3b0badbd73595f13da0396b01ea09a5a87f92011ce2e1774fc68d815a67eded6335b6a4f1d5e449d9ea7986f44e2437e6c529f3187c
|
|
7
|
+
data.tar.gz: 8dd9fd2b3717f8448446a2126d7c48b8ee71eccdcd033b48c52fb4a94c856a92562c7ad9e54b17fa310009206fd848953cb7d2d48d7d38fcf7f023da4a79b9fa
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -103,7 +103,7 @@ Share's name, and bbgid are cached using [PStore](http://ruby-doc.org/stdlib-1.9
|
|
|
103
103
|
|
|
104
104
|
## Code Status
|
|
105
105
|
|
|
106
|
-
[](https://rubygems.org/gems/stock_index)
|
|
107
107
|
[](https://travis-ci.org/javiervidal/stock_index)
|
|
108
108
|
[](https://coveralls.io/r/javiervidal/stock_index?branch=master)
|
|
109
109
|
[](https://codeclimate.com/github/javiervidal/stock_index)
|
data/cache/test.pstore
ADDED
|
Binary file
|
|
@@ -20,15 +20,6 @@ class SymbolParser
|
|
|
20
20
|
# BF/B (Brown-Forman Corp)
|
|
21
21
|
when 'BF/B'
|
|
22
22
|
'0000014693'
|
|
23
|
-
# QRVO (Qorvo, Inc.)
|
|
24
|
-
# when 'QRVO'
|
|
25
|
-
# '0001604778'
|
|
26
|
-
# QVCA (Liberty Interactive Corp)
|
|
27
|
-
# when 'QVCA'
|
|
28
|
-
# '0001355096'
|
|
29
|
-
# LMCK (Liberty Media Corp)
|
|
30
|
-
# when 'LMCK'
|
|
31
|
-
# '0001560385'
|
|
32
23
|
else
|
|
33
24
|
@symbol
|
|
34
25
|
end
|
data/lib/stock_index/version.rb
CHANGED
|
@@ -8,14 +8,14 @@ describe StockIndex::Component do
|
|
|
8
8
|
expect(component.cache_lookup).to eq('ZZZZ')
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
it 'returns the correct attributes with a valid symbol' do
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
it 'returns nil with an invalid symbol' do
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
end
|
|
11
|
+
# it 'returns the correct attributes with a valid symbol' do
|
|
12
|
+
# component = StockIndex::Component.new('CSCO', 'XNAS', nil)
|
|
13
|
+
# expect(component.attributes_lookup).to eq({:market=>"XNAS", :share=>{:symbol=>"CSCO", :name=>"CISCO SYSTEMS INC", :bbgid=>"BBG000C3J3C9"}, :company=>{:wikipedia=>nil, :cik=>"0000858877", :name=>"CISCO SYSTEMS, INC.", :sic=>"3576"}})
|
|
14
|
+
# end
|
|
15
|
+
#
|
|
16
|
+
# it 'returns nil with an invalid symbol' do
|
|
17
|
+
# component = StockIndex::Component.new('ZZZZ', 'XNAS', nil)
|
|
18
|
+
# expect(component.attributes_lookup).to be_nil
|
|
19
|
+
# end
|
|
20
20
|
|
|
21
21
|
end
|
|
File without changes
|
|
@@ -4,8 +4,8 @@ describe SymbolParser do
|
|
|
4
4
|
|
|
5
5
|
describe '#sp500_to_bsym' do
|
|
6
6
|
|
|
7
|
-
it "returns '
|
|
8
|
-
expect(SymbolParser.new('
|
|
7
|
+
it "returns 'Z/' when 'Z-'" do
|
|
8
|
+
expect(SymbolParser.new('Z-').symbol_to_bsym).to eq('Z/')
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
end
|
|
@@ -20,18 +20,6 @@ describe SymbolParser do
|
|
|
20
20
|
expect(SymbolParser.new('BF/B').bsym_to_cik).to eq('0000014693')
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
it "returns '0001355096' when 'QVCA'" do
|
|
24
|
-
expect(SymbolParser.new('QVCA').bsym_to_cik).to eq('0001355096')
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
it "returns '0001560385' when 'LMCK'" do
|
|
28
|
-
expect(SymbolParser.new('LMCK').bsym_to_cik).to eq('0001560385')
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
it "returns 'CSCO' when 'CSCO'" do
|
|
32
|
-
expect(SymbolParser.new('CSCO').bsym_to_cik).to eq('CSCO')
|
|
33
|
-
end
|
|
34
|
-
|
|
35
23
|
end
|
|
36
24
|
|
|
37
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stock_index
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Javier Vidal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-09-
|
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -162,6 +162,7 @@ files:
|
|
|
162
162
|
- cache/XLON.pstore
|
|
163
163
|
- cache/XNAS.pstore
|
|
164
164
|
- cache/XNYS.pstore
|
|
165
|
+
- cache/test.pstore
|
|
165
166
|
- csv/.keep
|
|
166
167
|
- csv/JP.csv
|
|
167
168
|
- csv/LN.csv
|
|
@@ -201,7 +202,7 @@ files:
|
|
|
201
202
|
- spec/helper.rb
|
|
202
203
|
- spec/stock_index/bsym_search_spec.rb
|
|
203
204
|
- spec/stock_index/component_spec.rb
|
|
204
|
-
- spec/stock_index/
|
|
205
|
+
- spec/stock_index/stock_index_spec_.rb
|
|
205
206
|
- spec/stock_index/symbol_parser_spec.rb
|
|
206
207
|
- stock_index.gemspec
|
|
207
208
|
homepage: https://github.com/javiervidal/stock_index
|
|
@@ -250,5 +251,5 @@ test_files:
|
|
|
250
251
|
- spec/helper.rb
|
|
251
252
|
- spec/stock_index/bsym_search_spec.rb
|
|
252
253
|
- spec/stock_index/component_spec.rb
|
|
253
|
-
- spec/stock_index/
|
|
254
|
+
- spec/stock_index/stock_index_spec_.rb
|
|
254
255
|
- spec/stock_index/symbol_parser_spec.rb
|