securities 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/lib/securities/scraper.rb +10 -4
- data/lib/securities/version.rb +1 -1
- metadata +5 -5
data/README.md
CHANGED
@@ -77,7 +77,8 @@ Results are returned in a hash:
|
|
77
77
|
* Fix monthly+ and dividends+
|
78
78
|
* Fix exception messages for friendlier displaying to end-user+ (and invalid symbol error=>"Illegal quoting in line 1.")+.
|
79
79
|
* Rescue empty results error.+
|
80
|
-
* Let it raise exception on one symbol, but continue on other and send the message.
|
80
|
+
* BUG: Let it raise exception on one symbol, but continue on other and send the message. <= Now it just returns an empty array if the exception wasn't fatal.+
|
81
|
+
|
81
82
|
* Write specs.
|
82
83
|
* Add quote info (P/E, P/S, etc.)
|
83
84
|
* Add symbol from name lookup.
|
data/lib/securities/scraper.rb
CHANGED
@@ -43,7 +43,11 @@ module Securities
|
|
43
43
|
rescue => error
|
44
44
|
# PROBABLY an invalid symbol specified or there was some other way the parser couldn't read a CSV.
|
45
45
|
# FIXME: Let it raise exception on one symbol, but continue on other and send the message.
|
46
|
-
raise
|
46
|
+
# It will no longer raise exception because it causes a bug.
|
47
|
+
# bug => if exception occurs in one symbol, it will not give any results for any other.
|
48
|
+
# raise ScraperException, "Invalid symbol '#{symbol}' specified."
|
49
|
+
@results[symbol] = []
|
50
|
+
next
|
47
51
|
end
|
48
52
|
|
49
53
|
data = Array.new
|
@@ -57,9 +61,11 @@ module Securities
|
|
57
61
|
end
|
58
62
|
|
59
63
|
# FIXME: Let it raise exception on one symbol, but continue on other and send the message.
|
60
|
-
if data
|
61
|
-
|
62
|
-
|
64
|
+
# It will no longer raise exception if data is empty, because it causes a
|
65
|
+
# bug => if exception occurs in one symbol, it will not give any results for any other.
|
66
|
+
# if data.empty?
|
67
|
+
# raise ScraperException, "There were no results for #{symbol}."
|
68
|
+
# end
|
63
69
|
|
64
70
|
@results[symbol] = data
|
65
71
|
end
|
data/lib/securities/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: securities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
segments:
|
80
80
|
- 0
|
81
|
-
hash:
|
81
|
+
hash: 254096546998731436
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
@@ -87,10 +87,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
version: '0'
|
88
88
|
segments:
|
89
89
|
- 0
|
90
|
-
hash:
|
90
|
+
hash: 254096546998731436
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.8.
|
93
|
+
rubygems_version: 1.8.24
|
94
94
|
signing_key:
|
95
95
|
specification_version: 3
|
96
96
|
summary: Financial information scraper gem. Uses Yahoo Finance API.
|