stock_index 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ require 'helper'
2
+
3
+ describe SymbolParser do
4
+
5
+ describe '#sp500_to_bsym' do
6
+
7
+ it "returns 'BRK/B' when 'BRK.B'" do
8
+ expect(SymbolParser.new('BRK.B').sp500_to_bsym).to eq('BRK/B')
9
+ end
10
+
11
+ end
12
+
13
+ describe '#bsym_to_cik' do
14
+
15
+ it "returns '0001067983' when 'BRK/B'" do
16
+ expect(SymbolParser.new('BRK/B').bsym_to_cik).to eq('0001067983')
17
+ end
18
+
19
+ it "returns '0000014693' when 'BF/B'" do
20
+ expect(SymbolParser.new('BF/B').bsym_to_cik).to eq('0000014693')
21
+ end
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
+ end
36
+
37
+ end
data/stock_index.gemspec CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "awesome_print"
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_development_dependency "simplecov"
26
+ spec.add_development_dependency "coveralls"
26
27
  spec.add_runtime_dependency "nokogiri"
27
28
  spec.add_runtime_dependency "cik"
28
29
  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.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-02 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: nokogiri
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -116,12 +130,13 @@ extensions: []
116
130
  extra_rdoc_files: []
117
131
  files:
118
132
  - ".gitignore"
133
+ - ".rspec"
119
134
  - Gemfile
120
135
  - LICENSE.txt
121
136
  - README.md
122
137
  - Rakefile
138
+ - bsym/US.csv
123
139
  - cache/data.pstore
124
- - csv/US.csv
125
140
  - lib/stock_index.rb
126
141
  - lib/stock_index/bsym_search.rb
127
142
  - lib/stock_index/component.rb
@@ -130,8 +145,17 @@ files:
130
145
  - lib/stock_index/scrapers/SP500_scraper.rb
131
146
  - lib/stock_index/scrapers/base_scraper.rb
132
147
  - lib/stock_index/scrapers/dji_scraper.rb
148
+ - lib/stock_index/scrapers/nasdaq_scraper.rb
133
149
  - lib/stock_index/stock_index.rb
150
+ - lib/stock_index/symbol_parser.rb
134
151
  - lib/stock_index/version.rb
152
+ - spec/fixtures/DJI.yaml
153
+ - spec/fixtures/GSPC.yaml
154
+ - spec/fixtures/NDX.yaml
155
+ - spec/helper.rb
156
+ - spec/stock_index/bsym_search_spec.rb
157
+ - spec/stock_index/stock_index_spec.rb
158
+ - spec/stock_index/symbol_parser_spec.rb
135
159
  - stock_index.gemspec
136
160
  homepage: https://github.com/javiervidal/stock_index
137
161
  licenses:
@@ -157,4 +181,11 @@ rubygems_version: 2.2.2
157
181
  signing_key:
158
182
  specification_version: 4
159
183
  summary: Stock Index
160
- test_files: []
184
+ test_files:
185
+ - spec/fixtures/DJI.yaml
186
+ - spec/fixtures/GSPC.yaml
187
+ - spec/fixtures/NDX.yaml
188
+ - spec/helper.rb
189
+ - spec/stock_index/bsym_search_spec.rb
190
+ - spec/stock_index/stock_index_spec.rb
191
+ - spec/stock_index/symbol_parser_spec.rb