indicators 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/indicators/parser.rb +1 -1
- data/lib/indicators/version.rb +1 -1
- data/spec/data_spec.rb +2 -2
- metadata +4 -4
data/lib/indicators/parser.rb
CHANGED
@@ -13,7 +13,7 @@ module Indicators
|
|
13
13
|
transposed_hash = Hash.new
|
14
14
|
# Such a hacky way to transpose an array.
|
15
15
|
# FIXME: Now v.to_f converts date to float, it shouldn't.
|
16
|
-
parameters.
|
16
|
+
parameters.inject({}){|a, h|
|
17
17
|
h.each_pair{|k,v| (a[k] ||= []) << v.to_f}
|
18
18
|
transposed_hash = a
|
19
19
|
}
|
data/lib/indicators/version.rb
CHANGED
data/spec/data_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe Data do
|
|
11
11
|
expect { Indicators::Data.new('some string') }.to raise_error
|
12
12
|
end
|
13
13
|
it "contains dividends hash from securities gem" do
|
14
|
-
expect { Indicators::Data.new(Securities::Stock.new(["aapl"]).history(:start_date => '2012-08-01', :end_date => '2012-08-10', :periods => :dividends)
|
14
|
+
expect { Indicators::Data.new(Securities::Stock.new(["aapl"]).history(:start_date => '2012-08-01', :end_date => '2012-08-10', :periods => :dividends)) }.to raise_error
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -20,7 +20,7 @@ describe Data do
|
|
20
20
|
expect { Indicators::Data.new([1, 2, 3]) }.not_to raise_error
|
21
21
|
end
|
22
22
|
it "is a hash" do
|
23
|
-
expect { Indicators::Data.new(Securities::Stock.new(["aapl"]).history(:start_date => '2012-08-01', :end_date => '2012-08-03', :periods => :daily)
|
23
|
+
expect { Indicators::Data.new(Securities::Stock.new(["aapl"]).history(:start_date => '2012-08-01', :end_date => '2012-08-03', :periods => :daily)) }.not_to raise_error
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indicators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.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-09-
|
12
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
segments:
|
104
104
|
- 0
|
105
|
-
hash:
|
105
|
+
hash: -937322617127678675
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
segments:
|
113
113
|
- 0
|
114
|
-
hash:
|
114
|
+
hash: -937322617127678675
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
117
|
rubygems_version: 1.8.24
|