signed_json 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signed_json (0.0.1)
4
+ signed_json (0.0.3)
5
5
  json
6
6
 
7
7
  GEM
data/lib/signed_json.rb CHANGED
@@ -33,7 +33,7 @@ module SignedJson
33
33
  def json_decode(input)
34
34
  begin
35
35
  parts = JSON.parse(input)
36
- rescue JSON::ParserError
36
+ rescue TypeError, JSON::ParserError
37
37
  raise InputError
38
38
  end
39
39
 
@@ -1,3 +1,3 @@
1
1
  module SignedJson
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -55,6 +55,12 @@ describe SignedJson do
55
55
  }.should raise_error(SignedJson::InputError)
56
56
  end
57
57
 
58
+ it "raises InputError for nil input" do
59
+ lambda {
60
+ SignedJson::Signer.new('key').decode(nil)
61
+ }.should raise_error(SignedJson::InputError)
62
+ end
63
+
58
64
  end
59
65
 
60
66
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Annesley
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-06 00:00:00 +11:00
17
+ date: 2010-12-08 00:00:00 +11:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency