quandl_format 0.1.8 → 0.2.0

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: e3c22439813d6d95d978d4f5f1208445e4d8f25d
4
- data.tar.gz: 89860b891f3076468f853d3151f50a6c48b5a8ca
3
+ metadata.gz: af15ce5e4292eb9211385565c9f7b4dadb621474
4
+ data.tar.gz: d4c9c38d5ab361dc1412559f2e4fe2ee4d8da2c6
5
5
  SHA512:
6
- metadata.gz: 425e8f296e868a0f2978ed42aacb0848974c382f340598988fafaabd101e1c794645566becf871060e331a552db771c211646711ea6cc3d6a3f680ce97456846
7
- data.tar.gz: eed88eb2e36fa32feab9e70f0e52d929af540e127cea59610433319f6e4ede46445bc53dbf4b4c90995caff9e149e7a2377a8b5c3352f1c4a9bd0b67a7f2ce8d
6
+ metadata.gz: 9a013fdc871324b9ec031b35584bd7c4022c3adb03154f8cba993d76da02a1a7fe3e4dda52629e7893647584d960ac695913e7216751f04e68b1745ce40cd2c0
7
+ data.tar.gz: cc167b7ee8534ee0e41af517c449a9650c03fc25910d33662bc07207fd03595bc029518b980b00a7b2ac83786b1391dd75a22b1a7a8b78a02aafb114d292b174
data/UPGRADE.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.2.0
2
+
3
+ * Update Quandl::Client to gain access to Quandl::Pattern
4
+ * Errors dont output internal attributes in error messages
5
+ * Display more information around YAML Parse Failures
6
+
7
+
1
8
  ## 0.1.8
2
9
 
3
10
  * add Quandl::Format::Dataset.each_line to upload dataset's line by line as they become availabe from whichever interface. Allows ruby GC to operate and avoid having 20k datasets in memory ...
data/examples/load.rb CHANGED
@@ -6,4 +6,6 @@ Quandl::Logger.use Quandl::Logger::Outputs
6
6
  Quandl::Format::Dataset.load_from_file('spec/fixtures/data/invalid_data.qdf')
7
7
  Quandl::Format::Dataset.load_from_file('spec/fixtures/data/invalid_yaml.qdf')
8
8
  Quandl::Format::Dataset.load_from_file('spec/fixtures/data/mismatched_columns.qdf')
9
- Quandl::Format::Dataset.load_from_file('spec/fixtures/data/mismatched_rows.qdf')
9
+ Quandl::Format::Dataset.load_from_file('spec/fixtures/data/mismatched_rows.qdf')
10
+ Quandl::Format::Dataset.load_from_file('spec/fixtures/data/unknown_attribute.qdf')
11
+ Quandl::Format::Dataset.load_from_file('spec/fixtures/data/illegal_colon.qdf')
@@ -113,7 +113,7 @@ module Attributes
113
113
  end
114
114
 
115
115
  def raise_unknown_attribute_error!(key)
116
- m = "Unknown Field '#{key}' valid fields are: #{self.class.attribute_names.join(', ')}"
116
+ m = "Unknown Field '#{key}' valid fields are: #{self.class.meta_attribute_names.join(', ')}"
117
117
  raise Quandl::Error::UnknownAttribute, m
118
118
  end
119
119
 
@@ -128,6 +128,7 @@ class Quandl::Format::Dataset::Load
128
128
  def log_yaml_parse_error(node, err)
129
129
  message = "Attribute parse error at line #{ node[:line] + err.line } column #{err.column}. #{err.problem} (#{err.class})\n"
130
130
  message += "Did you forget to delimit the meta data section from the data section with a one or more dashes ('#{SYNTAX[:data]}')?\n" unless node[:attributes] =~ /^-/
131
+ message += "Encountered error while parsing: \n " + node[:attributes].split("\n")[err.line - 1].to_s + "\n" rescue nil
131
132
  message += "--"
132
133
  Quandl::Logger.error(message)
133
134
  end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Format
3
- VERSION = "0.1.8"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -26,6 +26,6 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency "guard-rspec"
27
27
 
28
28
  s.add_runtime_dependency "quandl_babelfish", "~> 0.0"
29
- s.add_runtime_dependency "quandl_client", "~> 2.3"
29
+ s.add_runtime_dependency "quandl_client", "~> 2.4"
30
30
 
31
31
  end
@@ -0,0 +1,5 @@
1
+ code: TEST88
2
+ name: oops: colon
3
+
4
+ Data,Value
5
+ 2012-01-03,13,23
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.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: '2.3'
131
+ version: '2.4'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ~>
137
137
  - !ruby/object:Gem::Version
138
- version: '2.3'
138
+ version: '2.4'
139
139
  description: Data will be loaded and dumped.
140
140
  email:
141
141
  - blake@hilscher.ca
@@ -165,6 +165,7 @@ files:
165
165
  - spec/config/client.rb
166
166
  - spec/config/logger.rb
167
167
  - spec/fixtures/data/annual.qdf
168
+ - spec/fixtures/data/illegal_colon.qdf
168
169
  - spec/fixtures/data/invalid_data.qdf
169
170
  - spec/fixtures/data/invalid_yaml.qdf
170
171
  - spec/fixtures/data/mismatched_columns.qdf
@@ -210,6 +211,7 @@ test_files:
210
211
  - spec/config/client.rb
211
212
  - spec/config/logger.rb
212
213
  - spec/fixtures/data/annual.qdf
214
+ - spec/fixtures/data/illegal_colon.qdf
213
215
  - spec/fixtures/data/invalid_data.qdf
214
216
  - spec/fixtures/data/invalid_yaml.qdf
215
217
  - spec/fixtures/data/mismatched_columns.qdf