stock_index 0.8.2 → 0.8.3
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/.gitignore +2 -3
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/README.md +13 -1
- data/cache/XLON.pstore +0 -0
- data/cache/XNAS.pstore +0 -0
- data/cache/XNYS.pstore +0 -0
- data/lib/stock_index/indices.rb +5 -5
- data/lib/stock_index/version.rb +1 -1
- data/spec/helper.rb +5 -5
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 756783af169d357099bb8d42a12a845e1ea06f63
|
|
4
|
+
data.tar.gz: 3212e237c134bbe4230e212e523b4dac963dac9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7390f2bca18b518c3f22fb3cbeac607742c8053cb54efdb187d271f0720e48e47aeff0f9159186423d5bba263b9ced7874cdf516b827ae01600ef8c8b5ac490
|
|
7
|
+
data.tar.gz: 9c574bd43a8254ab207a81ea63052996ffbfe8700571631dcfd4d943dc1a1f5cd9aed57760b9ceb97f39aea854728c1fcc588ab883505e56054e104895b1ae0a
|
data/.gitignore
CHANGED
data/.ruby-gemset
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
stock_index
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby-2.2.2
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## [0.8.3] - 2015-07-27
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- This CHANGELOG.md file
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Improve README.md
|
|
10
|
+
- Change .rvmrc for .ruby-version and .ruby-gemset in .gitignore
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- [Scraping from wikipedia pages has stopped working](https://github.com/javiervidal/stock_index/issues/1)
|
data/README.md
CHANGED
|
@@ -75,6 +75,18 @@ The bbgid is obtained from [Bloomberg Open Symbology predefined files](http://bs
|
|
|
75
75
|
|
|
76
76
|
The name, cik, and bbgid are cached using [PStore](http://ruby-doc.org/stdlib-1.9.2/libdoc/pstore/rdoc/PStore.html).
|
|
77
77
|
|
|
78
|
+
## How to Launch the Console
|
|
79
|
+
|
|
80
|
+
$ rake console
|
|
81
|
+
|
|
82
|
+
## How to Run the Test Suite
|
|
83
|
+
|
|
84
|
+
$ rspec
|
|
85
|
+
|
|
86
|
+
## Changelog
|
|
87
|
+
|
|
88
|
+
[Changelog](https://github.com/javiervidal/stock_index/blob/master/CHANGELOG.md)
|
|
89
|
+
|
|
78
90
|
## Contributing
|
|
79
91
|
|
|
80
92
|
1. Fork it ( http://github.com/javiervidal/stock_index/fork )
|
|
@@ -85,7 +97,7 @@ The name, cik, and bbgid are cached using [PStore](http://ruby-doc.org/stdlib-1.
|
|
|
85
97
|
|
|
86
98
|
## Code Status
|
|
87
99
|
|
|
88
|
-
[](https://rubygems.org/gems/stock_index)
|
|
89
101
|
[](https://travis-ci.org/javiervidal/stock_index)
|
|
90
102
|
[](https://coveralls.io/r/javiervidal/stock_index?branch=master)
|
|
91
103
|
[](https://codeclimate.com/github/javiervidal/stock_index)
|
data/cache/XLON.pstore
CHANGED
|
Binary file
|
data/cache/XNAS.pstore
CHANGED
|
Binary file
|
data/cache/XNYS.pstore
CHANGED
|
Binary file
|
data/lib/stock_index/indices.rb
CHANGED
|
@@ -2,20 +2,20 @@ class StockIndex
|
|
|
2
2
|
INDICES = {
|
|
3
3
|
'^DJI' => {
|
|
4
4
|
name: 'DOW JONES INDUSTRIAL AVERAGE',
|
|
5
|
-
url: '
|
|
5
|
+
url: 'https://en.wikipedia.org/wiki/Dow_Jones_Industrial_Average'
|
|
6
6
|
},
|
|
7
7
|
'^GSPC' => {
|
|
8
8
|
name: 'S&P 500',
|
|
9
|
-
url: '
|
|
9
|
+
url: 'https://en.wikipedia.org/wiki/List_of_S%26P_500_companies'
|
|
10
10
|
},
|
|
11
11
|
'^NDX' => {
|
|
12
12
|
name: 'NASDAQ 100',
|
|
13
|
-
url: '
|
|
13
|
+
url: 'https://en.wikipedia.org/wiki/NASDAQ-100'
|
|
14
14
|
},
|
|
15
15
|
'^N225' => {
|
|
16
16
|
name: 'NIKKEI 225',
|
|
17
17
|
url: 'http://indexes.nikkei.co.jp/en/nkave/index/component?idx=nk225',
|
|
18
|
-
wikipedia_url: '
|
|
18
|
+
wikipedia_url: 'https://en.wikipedia.org/wiki/Nikkei_225'
|
|
19
19
|
},
|
|
20
20
|
'^STOXX50E' => {
|
|
21
21
|
name: 'EURO STOXX 50',
|
|
@@ -24,7 +24,7 @@ class StockIndex
|
|
|
24
24
|
'^FTSE' => {
|
|
25
25
|
name: 'FTSE 100',
|
|
26
26
|
url: 'http://www.londonstockexchange.com/exchange/prices-and-markets/stocks/indices/summary/summary-indices-constituents.html?index=UKX',
|
|
27
|
-
wikipedia_url: '
|
|
27
|
+
wikipedia_url: 'https://en.wikipedia.org/wiki/FTSE_100_Index#Current_constituents'
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
end
|
data/lib/stock_index/version.rb
CHANGED
data/spec/helper.rb
CHANGED
|
@@ -13,15 +13,15 @@ WebMock.disable_net_connect!(allow: 'coveralls.io')
|
|
|
13
13
|
RSpec.configure do |config|
|
|
14
14
|
config.before(:each) do
|
|
15
15
|
|
|
16
|
-
stub_request(:get, "
|
|
16
|
+
stub_request(:get, "https://en.wikipedia.org/wiki/Dow_Jones_Industrial_Average").
|
|
17
17
|
with(:headers => {'Accept' => '*/*'}).
|
|
18
18
|
to_return(:status => 200, :body => fixture_html('dji'), :headers => {})
|
|
19
19
|
|
|
20
|
-
stub_request(:get, "
|
|
20
|
+
stub_request(:get, "https://en.wikipedia.org/wiki/List_of_S&P_500_companies").
|
|
21
21
|
with(:headers => {'Accept' => '*/*'}).
|
|
22
22
|
to_return(:status => 200, :body => fixture_html('gspc'), :headers => {})
|
|
23
23
|
|
|
24
|
-
stub_request(:get, "
|
|
24
|
+
stub_request(:get, "https://en.wikipedia.org/wiki/NASDAQ-100").
|
|
25
25
|
with(:headers => {'Accept' => '*/*'}).
|
|
26
26
|
to_return(:status => 200, :body => fixture_html('ndx'), :headers => {})
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ RSpec.configure do |config|
|
|
|
29
29
|
with(:headers => {'Accept' => '*/*'}).
|
|
30
30
|
to_return(:status => 200, :body => fixture_html('n225'), :headers => {})
|
|
31
31
|
|
|
32
|
-
stub_request(:get, "
|
|
32
|
+
stub_request(:get, "https://en.wikipedia.org/wiki/Nikkei_225").
|
|
33
33
|
with(:headers => {'Accept' => '*/*'}).
|
|
34
34
|
to_return(:status => 200, :body => fixture_html('n225_wikipedia'), :headers => {})
|
|
35
35
|
|
|
@@ -65,7 +65,7 @@ RSpec.configure do |config|
|
|
|
65
65
|
with(:headers => {'Accept' => '*/*'}).
|
|
66
66
|
to_return(:status => 200, :body => fixture_html_ftse(6), :headers => {})
|
|
67
67
|
|
|
68
|
-
stub_request(:get, "
|
|
68
|
+
stub_request(:get, "https://en.wikipedia.org/wiki/FTSE_100_Index").
|
|
69
69
|
with(:headers => {'Accept' => '*/*'}).
|
|
70
70
|
to_return(:status => 200, :body => fixture_html('ftse_wikipedia'), :headers => {})
|
|
71
71
|
|
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.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Javier Vidal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-07-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -145,7 +145,10 @@ extra_rdoc_files: []
|
|
|
145
145
|
files:
|
|
146
146
|
- ".gitignore"
|
|
147
147
|
- ".rspec"
|
|
148
|
+
- ".ruby-gemset"
|
|
149
|
+
- ".ruby-version"
|
|
148
150
|
- ".travis.yml"
|
|
151
|
+
- CHANGELOG.md
|
|
149
152
|
- Gemfile
|
|
150
153
|
- LICENSE.txt
|
|
151
154
|
- README.md
|
|
@@ -216,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
216
219
|
version: '0'
|
|
217
220
|
requirements: []
|
|
218
221
|
rubyforge_project:
|
|
219
|
-
rubygems_version: 2.
|
|
222
|
+
rubygems_version: 2.4.8
|
|
220
223
|
signing_key:
|
|
221
224
|
specification_version: 4
|
|
222
225
|
summary: Stock Index
|