panic_board_data 1.0.0 → 1.0.1

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: fee76cea6dc1944138149648f63677782cfabe1c
4
- data.tar.gz: 4c855bafe3e0fbefe883301bf01f8627fec8e9f3
3
+ metadata.gz: a96cc0a4c0c9defb433c8e52cd435b416725cf75
4
+ data.tar.gz: 3892a19e078f15052b1a4ef43e5637912704d46c
5
5
  SHA512:
6
- metadata.gz: 332de7cf5bfeb53584c0496277ee9f4d45b26df3bc6c77ab991e52a76c756d4118262ee4698325790bee6bd2551a4a948c4451cee32706b95d617c7577cadcb9
7
- data.tar.gz: 986e2f0a21cd3a5652b5ea7a04f3573a5982a4e2fd4a91bb386436a06bf5f3c8f147bb8083d752c5a1d18bcf8979e05d14b7bf4155fd2016f2fceda0e47df717
6
+ metadata.gz: 960baaac1f93813e6aa934d1d37d608b2ef9da670f8e5912436eaa8d3758dd40fd0a2f748f67a3fbcd8da5cf94184ec04c937ab4dff822cd479e6381825af386
7
+ data.tar.gz: 4c1024b24e53409d1aafdb8972a5515e2ecda9837bcb8f3bc14e07085b1fb884811a309810404e2c436c5ca58bd18bb23c8c291aa3d36afea08ef12f74238de3
@@ -1,3 +1,4 @@
1
+ require 'json'
1
2
  Dir[File.dirname(__FILE__) + '/panic_board_data/*.rb'].each {|file| require file }
2
3
 
3
4
  module PanicBoardData
@@ -19,6 +19,10 @@ module PanicBoardData
19
19
  }
20
20
  end
21
21
 
22
+ def to_json
23
+ to_hash.to_json
24
+ end
25
+
22
26
  private
23
27
 
24
28
  def graph
@@ -1,3 +1,3 @@
1
1
  module PanicBoardData
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -196,4 +196,19 @@ describe PanicBoardData::Graph do
196
196
  end
197
197
  end
198
198
  end
199
+
200
+ describe "to_json" do
201
+ it "should call to_json on the to_hash result" do
202
+ graph = PanicBoardData::Graph.new
203
+
204
+ result = Object.new
205
+
206
+ hash = Object.new
207
+ graph.stubs(:to_hash).returns hash
208
+
209
+ hash.stubs(:to_json).returns result
210
+
211
+ graph.to_json.must_be_same_as result
212
+ end
213
+ end
199
214
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panic_board_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Cauthon