quandl_format 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/UPGRADE.md +6 -0
- data/VERSION +1 -1
- data/lib/quandl/format/dataset/load.rb +2 -0
- data/spec/fixtures/data/QUGC-162.qdf +7 -0
- data/spec/lib/quandl/format/dataset/load/valid_spec.rb +15 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6e6365d76d49a7884466644c94eaf7eaafd0cbe
|
4
|
+
data.tar.gz: 8e6498c4952197b959c383faa225d2766800a755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99bd6926cd936e676d0cffdb3aeb128228119ed1d1b3c5f0cc8029116d723cdb338b402365ea3a7e137bc6f6c5c641be96b5cb13831f22c71fd5359bb024f6c
|
7
|
+
data.tar.gz: f884baa33d4ca035fff6190c00cfa05383b6d0ef34c26383c19100edf2de101fd63cc83266a3f84ed5b826ba8afab7e667960beae2f49279bb76c84979759c9c
|
data/UPGRADE.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
@@ -82,6 +82,8 @@ class Quandl::Format::Dataset::Load
|
|
82
82
|
# skip to the next line
|
83
83
|
return node
|
84
84
|
end
|
85
|
+
# strip extra commas
|
86
|
+
rline = rline.gsub(/,+$/,'') if node[:section] == :attributes
|
85
87
|
# append the line to the requested section
|
86
88
|
node[ node[:section] ] += ( node[:section] == :data ) ? "#{line}\n" : rline
|
87
89
|
# return the updated node
|
@@ -19,6 +19,21 @@ describe Quandl::Format::Dataset do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
context "QUGC-162.qdf" do
|
23
|
+
let(:data){ Quandl::Format::Dataset.load( fixtures_data['QUGC-162'] ) }
|
24
|
+
|
25
|
+
it{ should be_a Array }
|
26
|
+
its(:count){ should eq 1 }
|
27
|
+
|
28
|
+
describe "#first" do
|
29
|
+
subject{ data.first }
|
30
|
+
its(:code){ should eq 'IPDCONGD' }
|
31
|
+
its(:name){ should eq 'Testdata' }
|
32
|
+
its(:description){ should eq 'example indust production upload'}
|
33
|
+
its(:data){ should_not eq [] }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
22
37
|
context "metadata_only.qdf" do
|
23
38
|
let(:data){ Quandl::Format::Dataset.load( fixtures_data['metadata_only'] ) }
|
24
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quandl_client
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- quandl_format.gemspec
|
171
171
|
- spec/config/client.rb
|
172
172
|
- spec/config/logger.rb
|
173
|
+
- spec/fixtures/data/QUGC-162.qdf
|
173
174
|
- spec/fixtures/data/annual.qdf
|
174
175
|
- spec/fixtures/data/illegal_colon.qdf
|
175
176
|
- spec/fixtures/data/illegal_dash.qdf
|
@@ -223,6 +224,7 @@ summary: Quandl Data Format
|
|
223
224
|
test_files:
|
224
225
|
- spec/config/client.rb
|
225
226
|
- spec/config/logger.rb
|
227
|
+
- spec/fixtures/data/QUGC-162.qdf
|
226
228
|
- spec/fixtures/data/annual.qdf
|
227
229
|
- spec/fixtures/data/illegal_colon.qdf
|
228
230
|
- spec/fixtures/data/illegal_dash.qdf
|