nas-yahoo_stock 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -10,9 +10,14 @@
10
10
 
11
11
  === 0.1.3 2009-09-05
12
12
 
13
- * 1 addition:
13
+ * 3 additions:
14
14
  * adds a new class called YahooStock::ScripSymbol that allows to
15
15
  find out the stock symbol for a company
16
16
  * adds specs for previous and new code
17
- * adds rdocs
18
-
17
+ * adds
18
+
19
+ === 0.1.4 2009-09-05
20
+
21
+ * 2 changes related with ruby 1.9:
22
+ * modifies quote class to be compatible with ruby 1.9
23
+ * modifies interface class to be compatible with 1.9
data/README.rdoc CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Provides an interface to yahoo finance to get stock related data. For instance, latest trade related data, volume, 50 day moving average, market cap, etc, virtually that yahoo finance provides.
7
+ Provides an interface to yahoo finance to get stock related data. For instance, latest trade related data, volume, 50 day moving average, market cap, etc, virtually any thing that yahoo finance provides.
8
8
 
9
9
  If you don't know the stock / scrip symbol of the company then you can find that out by using the YahooStock::ScripSymbol class. The methods are mentioned in the Usage section below. For instance, YHOO for yahoo, GOOG for google, etc.
10
10
  The kind of parameters can be passed can be found after initializing the
@@ -134,10 +134,10 @@ module YahooStock
134
134
  raise InterfaceError, "The parameters '#{params.join(', ')}' are not valid. Please check using YahooStock::Interface#allowed_parameters or YahooStock::Quote#valid_parameters"
135
135
  end
136
136
  parameter_values = yahoo_url_parameters.collect {|v| parameters[v]}.join('')
137
- if !all_stock_symbols.any?
137
+ if all_stock_symbols.empty?
138
138
  raise InterfaceError, "You must add atleast one stock symbol to get stock data"
139
139
  end
140
- if !parameter_values.any?
140
+ if parameter_values.empty?
141
141
  raise InterfaceError, "You must add atleast one parameter to get stock data"
142
142
  end
143
143
  "#{@base_url}?s=#{all_stock_symbols}&f=#{parameter_values}"
@@ -54,7 +54,7 @@ module YahooStock
54
54
  if options.nil? || !options[:stock_symbols]
55
55
  raise QuoteException, "You must provide a hash of stock symbols to fetch data"
56
56
  end
57
- unless options[:stock_symbols].any?
57
+ if options[:stock_symbols].nil? || options[:stock_symbols].empty?
58
58
  raise QuoteException, "You must provide atleast one stock symbol to fetch data"
59
59
  end
60
60
  if !(options[:read_parameters] && options[:read_parameters].any?)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nas-yahoo_stock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nasir Jamal