quandl_operation 0.1.19 → 0.1.20
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7881122ddea828dd458817aa7de4facbb24dd7ba
|
4
|
+
data.tar.gz: 1604dc65536cce9cf67a8e89a79a872f4ffffa0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c1425f09dcea673d51d707886594de40f1930f0f61e2b176b43047c92dff746e717b3ca44fbf469f2f611dee8ce9157ed36053022068f7775770176875e550c
|
7
|
+
data.tar.gz: 276cc0608fd53738e2f0874e6edcefe9b882865493f2753f61402ee3c3d10a2eee7c57c1bd238924c75ff45b0056aad9aa6770c2e9c922af673b55489f4477d0
|
data/UPGRADE.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
class Quandl::Operation::QDFormat::Node
|
2
2
|
|
3
|
-
ATTRIBUTES = :source_code, :code, :name, :description, :column_names
|
3
|
+
ATTRIBUTES = :source_code, :code, :name, :description, :column_names, :data
|
4
4
|
attr_accessor *ATTRIBUTES
|
5
5
|
|
6
|
-
attr_accessor :data
|
7
|
-
|
8
6
|
def initialize(attrs)
|
9
7
|
assign_attributes(attrs)
|
10
8
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'quandl/operation/qdformat'
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Quandl::Operation::QDFormat::Node do
|
6
|
+
|
7
|
+
let(:attributes) { {
|
8
|
+
code: 'DATASET_CODE',
|
9
|
+
source_code: 'SOURCE_CODE',
|
10
|
+
name: 'Test Dataset Name 1',
|
11
|
+
description: "Here is a description with multiple lines.\\n This is the second line.",
|
12
|
+
column_names: ['Date', 'Value', 'High', 'Low'],
|
13
|
+
data: [["2013-11-20", "9.99470588235294", "11.003235294117646", "14.00164705882353"],
|
14
|
+
["2013-11-19", "10.039388096885814", nil, "14.09718770934256"]],
|
15
|
+
}}
|
16
|
+
|
17
|
+
subject{ Quandl::Operation::QDFormat::Node.new(attributes) }
|
18
|
+
|
19
|
+
its(:code){ should eq 'DATASET_CODE' }
|
20
|
+
its(:source_code){ should eq 'SOURCE_CODE' }
|
21
|
+
its(:name){ should eq 'Test Dataset Name 1' }
|
22
|
+
its(:description){ should eq "Here is a description with multiple lines.\\n This is the second line." }
|
23
|
+
its(:column_names){ should eq ['Date', 'Value', 'High', 'Low'] }
|
24
|
+
its(:data){ should eq [["2013-11-20", "9.99470588235294", "11.003235294117646", "14.00164705882353"],
|
25
|
+
["2013-11-19", "10.039388096885814", nil, "14.09718770934256"]] }
|
26
|
+
|
27
|
+
its(:attributes){ should eq attributes }
|
28
|
+
|
29
|
+
its(:to_qdf){ should eq %Q{source_code: SOURCE_CODE
|
30
|
+
code: DATASET_CODE
|
31
|
+
name: Test Dataset Name 1
|
32
|
+
description: Here is a description with multiple lines.\\n This is the second line.
|
33
|
+
Date,Value,High,Low
|
34
|
+
2013-11-20,9.99470588235294,11.003235294117646,14.00164705882353
|
35
|
+
2013-11-19,10.039388096885814,,14.09718770934256
|
36
|
+
}}
|
37
|
+
|
38
|
+
end
|
@@ -52,25 +52,4 @@ describe Quandl::Operation::QDFormat do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
describe "#to_qdf" do
|
56
|
-
subject{ collection.first }
|
57
|
-
|
58
|
-
its(:to_qdf){ should eq %Q{source_code: SOURCE_CODE
|
59
|
-
code: DATASET_CODE
|
60
|
-
name: Test Dataset Name 1
|
61
|
-
description: Here is a description with multiple lines.\\n This is the second line.
|
62
|
-
Date,Value,High,Low
|
63
|
-
2013-11-20,9.99470588235294,11.003235294117646,14.00164705882353
|
64
|
-
2013-11-19,10.039388096885814,,14.09718770934256
|
65
|
-
}}
|
66
|
-
|
67
|
-
context "data Array" do
|
68
|
-
let(:data){ [['2013-11-20',9.94,11.2],['2013-11-19',9.94,11.2],['2013-11-18',9.94,11.2]] }
|
69
|
-
subject{ Quandl::Operation::QDFormat::Node.new( full_code: "TEST/OIL", data: data ) }
|
70
|
-
|
71
|
-
its(:to_qdf){ should eq "source_code: TEST\ncode: OIL\n2013-11-20,9.94,11.2\n2013-11-19,9.94,11.2\n2013-11-18,9.94,11.2\n" }
|
72
|
-
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_operation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- spec/lib/quandl/operation/collapse_spec.rb
|
159
159
|
- spec/lib/quandl/operation/date_spec.rb
|
160
160
|
- spec/lib/quandl/operation/parse_spec.rb
|
161
|
+
- spec/lib/quandl/operation/qdformat/node_spec.rb
|
161
162
|
- spec/lib/quandl/operation/qdformat_spec.rb
|
162
163
|
- spec/lib/quandl/operation/transform_spec.rb
|
163
164
|
- spec/spec_helper.rb
|
@@ -189,6 +190,7 @@ test_files:
|
|
189
190
|
- spec/lib/quandl/operation/collapse_spec.rb
|
190
191
|
- spec/lib/quandl/operation/date_spec.rb
|
191
192
|
- spec/lib/quandl/operation/parse_spec.rb
|
193
|
+
- spec/lib/quandl/operation/qdformat/node_spec.rb
|
192
194
|
- spec/lib/quandl/operation/qdformat_spec.rb
|
193
195
|
- spec/lib/quandl/operation/transform_spec.rb
|
194
196
|
- spec/spec_helper.rb
|