oydid 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/oydid.rb +3 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 302dab4436bd984d28adc707c31528a0de49abc37c20e0b0099e25a74a1b0487
4
- data.tar.gz: 847a3c2efde464428f407df125563ddb3132fef1233af76ad5fd205dc51eecf9
3
+ metadata.gz: ac6225dd965dafae4c9a9013d023882dd0ffe6408eb8922ef4179b8c0be96e10
4
+ data.tar.gz: ec26220fc09876cef2fb554ebc8cb16b03485cd31d019514384831188addd645
5
5
  SHA512:
6
- metadata.gz: f61488457caa9c132676802b0d345c1918a74d125a571f02e41120a87b47ee0ce1bbb02540f6fc72b2100e46dafdc6e547b0fd99a3e9616c82dc21a895a9c45f
7
- data.tar.gz: a5f9ad43d728560c63bc81cd7daa57702db6ff8162dfbfe7f38864f57d524479a9e5bbea0430cf59addf5ff2838b964778e2f6853b85ed3bb09173e13a7f865f
6
+ metadata.gz: b982abdf30a063066e8d6d636cff2b144b80d25aca19aaadc13b2c9aa8f05a794f51362cd03877ad1113be6d08e4f0a038308eafed9c00a6aea25d10ef59db89
7
+ data.tar.gz: f783d819dea7744cfe54a1a7575cbf7657b56c0f836822a61eeb4b658e8e1eead2cc3cc1f2d120f06cca6e22e2c6ebda1d83ea3ce50a2050e5e37e2aa58fc4ee
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/lib/oydid.rb CHANGED
@@ -139,9 +139,9 @@ class Oydid
139
139
 
140
140
  def self.generate_base(content, did, mode, options)
141
141
  # input validation
142
- did_doc = JSON.parse(content.to_json) rescue {}
143
- if did_doc == {}
144
- return [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, "empty or invalid payload"]
142
+ did_doc = JSON.parse(content.to_json) rescue nil
143
+ if did_doc.nil?
144
+ return [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, "invalid payload"]
145
145
  end
146
146
  did_old = nil
147
147
  log_old = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oydid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Fabianek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-19 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dag