quandl_data 1.3.3 → 1.3.4
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/UPGRADE.md +6 -0
- data/lib/quandl/data/operations.rb +7 -0
- data/lib/quandl/data/version.rb +1 -1
- data/lib/quandl/fabricate/data.rb +1 -1
- data/spec/lib/quandl/data/operations_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08bf146b0c8eb0013154683227fb6490afbdcaca
|
4
|
+
data.tar.gz: a1d68b8e4933d8573dbe30bdd0bc591931ef4954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31545591417716667defb90d4c2c34db0c31e484bd9d3cbd2762cf19ab3ff06d6a0a391ed2bc9163ab098f9864e27cfffbe56bc6f123733e45401997372662da
|
7
|
+
data.tar.gz: 90ad18560130551a978b37819dcba6ae14069fc336ce5d279c07f0f0e15d6e6fbeb1be4a786a222c1819ccb94490b9873c8bcecf4cd5c17a5e0a0b12e2ed4150
|
data/UPGRADE.md
CHANGED
@@ -88,6 +88,10 @@ module Operations
|
|
88
88
|
@data_array = Quandl::Operation::Sort.desc( data_array ); self
|
89
89
|
end
|
90
90
|
|
91
|
+
def to_precision!(value)
|
92
|
+
@data_array = Quandl::Operation::Value.precision(data_array, value); self
|
93
|
+
end
|
94
|
+
|
91
95
|
def row(*args)
|
92
96
|
return @row if args[0].nil?
|
93
97
|
@row = args[0]
|
@@ -130,6 +134,9 @@ module Operations
|
|
130
134
|
self.class.new( data_array.dup, headers: headers, cleaned: cleaned )
|
131
135
|
end
|
132
136
|
|
137
|
+
def to_precision(value)
|
138
|
+
clone.to_precision!(value)
|
139
|
+
end
|
133
140
|
def to_jd
|
134
141
|
clone.to_jd!
|
135
142
|
end
|
data/lib/quandl/data/version.rb
CHANGED
@@ -17,6 +17,13 @@ describe Quandl::Data::Operations do
|
|
17
17
|
subject.limit(2).count.should eq 2
|
18
18
|
end
|
19
19
|
|
20
|
+
describe "#to_precision" do
|
21
|
+
it "should set the precision" do
|
22
|
+
raw = '1998,10.293842930288591859035,1200.293842930288591859035'
|
23
|
+
Quandl::Data.new(raw).to_precision(6).to_date_str.should eq [["1998-12-31", 10.2938, 1200.29]]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
20
27
|
describe "#collapse=" do
|
21
28
|
|
22
29
|
it "should collapse to monthly" do
|