stock_index 0.8.5 → 0.8.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0994ef974caef24ee63eeef337bbb988bf49e6a
4
- data.tar.gz: db6e40cd2efe1f3d701d05bc8b5b95d47ad995fd
3
+ metadata.gz: dc376488f014e79117bbc733f58daf5976e72647
4
+ data.tar.gz: dfd6f5ef8da962de8aabced9b4ca132585f50468
5
5
  SHA512:
6
- metadata.gz: 4dabf1c0226bb5c9dd10a3b0badbd73595f13da0396b01ea09a5a87f92011ce2e1774fc68d815a67eded6335b6a4f1d5e449d9ea7986f44e2437e6c529f3187c
7
- data.tar.gz: 8dd9fd2b3717f8448446a2126d7c48b8ee71eccdcd033b48c52fb4a94c856a92562c7ad9e54b17fa310009206fd848953cb7d2d48d7d38fcf7f023da4a79b9fa
6
+ metadata.gz: b2087b710eb5f655edbd8f0e827c6cf97ca7f441cdbf0d3099da3f8d19a7b526ff8c4c1b6c480bb5efd3099ac4ef4d4ac0e0836e033527adf05679290d4c9e59
7
+ data.tar.gz: 484344af8358015b685721043abb0228418cfe88c1fabd9fad7ea137263107a5fe55116619485df1da5376b273ecc8ac087739406d7eb3b94177c55f40b0f37f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.8.6] - 2015-11-27
4
+
5
+ ### Fixed
6
+ - [StockIndex::Component#valid? fails when StockIndex::BsymSearch#find returns nil](https://github.com/javiervidal/stock_index/issues/3)
7
+ - Updated cached files
8
+
3
9
  ## [0.8.5] - 2015-09-03
4
10
 
5
11
  ### Changed
@@ -28,4 +34,4 @@
28
34
  - Change .rvmrc for .ruby-version and .ruby-gemset in .gitignore
29
35
 
30
36
  ### Fixed
31
- - [Scraping from wikipedia pages has stopped working](https://github.com/javiervidal/stock_index/issues/1)
37
+ - [Scraping from wikipedia pages has stopped working](https://github.com/javiervidal/stock_index/issues/1)
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
- [![Gem Version](http://img.shields.io/badge/gem-v0.8.5-blue.svg)](https://rubygems.org/gems/stock_index)
106
+ [![Gem Version](http://img.shields.io/badge/gem-v0.8.6-blue.svg)](https://rubygems.org/gems/stock_index)
107
107
  [![Build Status](https://travis-ci.org/javiervidal/stock_index.svg?branch=master)](https://travis-ci.org/javiervidal/stock_index)
108
108
  [![Coverage Status](https://coveralls.io/repos/javiervidal/stock_index/badge.png?branch=master)](https://coveralls.io/r/javiervidal/stock_index?branch=master)
109
109
  [![Code Climate](https://codeclimate.com/github/javiervidal/stock_index/badges/gpa.svg)](https://codeclimate.com/github/javiervidal/stock_index)
@@ -114,4 +114,4 @@ Copyright (c) 2014 – ∞ Javier Vidal
114
114
 
115
115
  ## License
116
116
 
117
- This gem is released under the [MIT License](http://opensource.org/licenses/MIT).
117
+ This gem is released under the [MIT License](http://opensource.org/licenses/MIT).
data/cache/XNAS.pstore CHANGED
Binary file
data/cache/XNYS.pstore CHANGED
Binary file
@@ -36,15 +36,15 @@ class StockIndex
36
36
  def attributes_lookup
37
37
  bsym = StockIndex::BsymSearch.find(@symbol, @pricing_source)
38
38
  cik = lookup_cik
39
+ puts " --- #{@symbol} #{@market} #{@wikipedia} #{@pricing_source}"
39
40
  puts " --- #{@symbol} bsym: #{bsym}"
40
41
  puts " --- #{@symbol} cik: #{cik}"
41
- return nil unless bsym
42
42
  a = {
43
43
  market: @market,
44
44
  share: {
45
45
  symbol: @symbol,
46
- name: bsym[:name],
47
- bbgid: bsym[:bbgid]
46
+ name: bsym ? bsym[:name] : nil,
47
+ bbgid: bsym ? bsym[:bbgid] : nil
48
48
  },
49
49
  company: {wikipedia: @wikipedia}.merge( cik || {} )
50
50
  }
@@ -78,6 +78,7 @@ class StockIndex
78
78
  end
79
79
 
80
80
  def valid?(attributes)
81
+ return false if attributes.nil?
81
82
  !attributes[:market].nil? &&
82
83
  !attributes[:share][:symbol].nil? &&
83
84
  !attributes[:share][:name].nil? &&
@@ -87,4 +88,4 @@ class StockIndex
87
88
 
88
89
  end
89
90
 
90
- end
91
+ end
@@ -1,3 +1,3 @@
1
1
  class StockIndex
2
- VERSION = "0.8.5"
3
- end
2
+ VERSION = "0.8.6"
3
+ 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.5
4
+ version: 0.8.6
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-03 00:00:00.000000000 Z
11
+ date: 2015-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler