quandl_data 0.1.4 → 0.1.5

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: a671dc7961dc824080203af92205cbf45401c38c
4
- data.tar.gz: 573b0ccfabfe0b929749f6b2d1d1ff40f10d22fa
3
+ metadata.gz: cdb1cfbcde2bd319c947b82161d2d3e077396a7d
4
+ data.tar.gz: 1f7b9d8ffa79d2a07b1cc88c12875860e6b5b972
5
5
  SHA512:
6
- metadata.gz: 5e7dd6185d4c8947fffe2b450fd7c7d6ce217576c1a47e51a7f7cffa2b3c0712a75499f5f7fed0057bec51d71add108c841b3b801e4e756f2932e9ed86a42112
7
- data.tar.gz: 2166730089b5375f8eba61a11db1108539bc3e9bf7f3f0c5299e6b8ee6f767675c2eabec9475f564e2a783bc12178e436d9477825dcf9390d20539f1ffd3152f
6
+ metadata.gz: 48e67f3889d806cbfd8521c84356daf69216a3c3d4c369b723f895d3a48bb6061100295aa71a6e79545dcfae915f4ce93e48aced1ed71b0a022ee9dea2a2e1f7
7
+ data.tar.gz: 907c27dc82a909d58db2b77213bea36ff68d4e60f4495abb4e5adde3256a99870ba1369b0f6d14c6ce35a6fa83a72af71a1ecf26180528aa4bf7a5651f04a502
@@ -11,6 +11,8 @@ class Table
11
11
 
12
12
  delegate *Array.forwardable_methods, to: :data_array
13
13
 
14
+ delegate :to_json, to: :data_array
15
+
14
16
  attr_accessor :pristine_data
15
17
 
16
18
  def initialize(*args)
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Data
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -55,6 +55,12 @@ describe Quandl::Data::Table do
55
55
 
56
56
  end
57
57
 
58
+ describe "to_json" do
59
+ it "should convert the data_array to json and back" do
60
+ JSON.parse(subject.to_json).should eq JSON.parse(subject.data_array.to_json)
61
+ end
62
+ end
63
+
58
64
  describe "trim_end" do
59
65
 
60
66
  it "should delete everything after trim_end" do
data/spec/spec_helper.rb CHANGED
@@ -2,4 +2,5 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
2
2
 
3
3
  require "rspec"
4
4
  require "csv"
5
+ require "json"
5
6
  require "quandl/data"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher