stock_index 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/cache/XJPX.pstore +0 -0
- data/lib/stock_index/scrapers/nikkei_scraper.rb +3 -3
- data/lib/stock_index/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfab9b39ccc9ebec601e06715fda111ee1e0db98
|
4
|
+
data.tar.gz: 4c2ca0e3f9bb2745255d3114fd7a1e45bda1b879
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 756bbd553b18cdfd2d1de5d67f183119fd63e3409497e9d2c4c2c53388b089c934136609f2136608ddccb09a2967e0002e21e695b20a1dbc131274e680360b77
|
7
|
+
data.tar.gz: 6849e7266f57ada31cb126a522709f1a38c3938892f14c91f5223b6ec0d5a4cca83b3a933bf96657f59c39422fbfbee99b7d534bc545c6cc2914fc7e306075fa
|
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
|
-
[![Gem Version](http://img.shields.io/badge/gem-v0.8.
|
106
|
+
[![Gem Version](http://img.shields.io/badge/gem-v0.8.7-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)
|
data/cache/XJPX.pstore
CHANGED
Binary file
|
@@ -3,14 +3,14 @@ class NikkeiScraper < StockIndex::BaseScraper
|
|
3
3
|
def scrape
|
4
4
|
doc = Nokogiri::HTML(open(StockIndex::INDICES['^N225'][:url]))
|
5
5
|
@wikipedia_hash = parse_wikipedia_page(Nokogiri::HTML(open(StockIndex::INDICES['^N225'][:wikipedia_url])))
|
6
|
-
parse_rows doc.css('
|
6
|
+
parse_rows doc.css('div.row.component-list')
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def parse_rows(rows)
|
12
12
|
rows.inject([]) do |array, tr|
|
13
|
-
symbol = tr.css('
|
13
|
+
symbol = tr.css('div').text
|
14
14
|
market = 'XJPX'
|
15
15
|
if symbol && market
|
16
16
|
component = StockIndex::Component.new(symbol, market, @wikipedia_hash[symbol], :jp)
|
@@ -32,4 +32,4 @@ class NikkeiScraper < StockIndex::BaseScraper
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
end
|
35
|
+
end
|
data/lib/stock_index/version.rb
CHANGED
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.7
|
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-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|