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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78c520f62b1ac60daa23cbf27b38ab8c825e6deb
4
- data.tar.gz: ef09c7be3ec51063e241d620c225865dbe4b515b
3
+ metadata.gz: d6e6365d76d49a7884466644c94eaf7eaafd0cbe
4
+ data.tar.gz: 8e6498c4952197b959c383faa225d2766800a755
5
5
  SHA512:
6
- metadata.gz: a332a434967289b15fdabe3d99a8a77964d6db419196cf3837d81e108c3d748c8f184a246ee922a58c0353679b9830d4e4fb0ec96e65497c1c7b8132c0dd2e2e
7
- data.tar.gz: 9fbac961821cc7d0b40e8fad4c2d7e2f410749a06703b3ae80e0ba5db2fb90d9d1e4347cb8317d6dd691d8c58f28101f4a6bd20695ef28650c51f140e306b529
6
+ metadata.gz: b99bd6926cd936e676d0cffdb3aeb128228119ed1d1b3c5f0cc8029116d723cdb338b402365ea3a7e137bc6f6c5c641be96b5cb13831f22c71fd5359bb024f6c
7
+ data.tar.gz: f884baa33d4ca035fff6190c00cfa05383b6d0ef34c26383c19100edf2de101fd63cc83266a3f84ed5b826ba8afab7e667960beae2f49279bb76c84979759c9c
data/UPGRADE.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.4.3
2
+
3
+ * QUGC-162 Strip trailing commas in meta data section
4
+
5
+
6
+
1
7
  ## 0.4.2
2
8
 
3
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
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
@@ -0,0 +1,7 @@
1
+ code: IPDCONGD,,
2
+ name: Testdata,,
3
+ description: example indust production upload,,
4
+ -------------,,
5
+ 2013-11-22,10,20,
6
+ 2013-11-22,10,20,30,
7
+ 2013-11-22,10,20,30,
@@ -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.2
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-03-31 00:00:00.000000000 Z
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