dmp-dynamo_adapter 0.3.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dmp/dynamo_adapter.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1df64725fca2ba042c200d8615e9d304503836f48bd04451cb08a034773b4ad9
4
- data.tar.gz: ce3dc12d41f2b48f7106d390cb0ef7d7b61f5ea3d77337adba094e8604f59575
3
+ metadata.gz: 0f39029d969245a0f4f373d6674a8f6e86ed20504acfa194b65db3aed0e44662
4
+ data.tar.gz: eb983ec70d446822ad73624ae69bc60d0aed9a9f41a3cbff66fc1d3ff2e2ff61
5
5
  SHA512:
6
- metadata.gz: b0393c336cc05254ae08dc757f449fda523f6caaaff7a65241b466d468af7ef9e595a95ea56d2b6a3934dc406bf9414b0da2bc2c06ea77c8e7d89c61abb87331
7
- data.tar.gz: d2ac537a78af198168ff50006a8d74ed880f0103f2cce91045c48578dbbd7e44815205f37d7167c206c8cd468ee92bad35caca6d4af96700aaf2b66950e07ff0
6
+ metadata.gz: 9e686735220befaa29d23b2cf1c727732df71303be7af21395ff122d0c9f6c5a5b4230a90e7ad7e95df41311d6b435da3426a8ef32b8104b16ed08e0f18a94eb
7
+ data.tar.gz: 88f0325797bcb347b1266a1fea4631180ad1d220c3ac8fa2737562efdf61d3588a28f6e254a743b9dca1459a8e8100210c1dfe2c4f7323534a9e39454a9ba66f
@@ -70,7 +70,7 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
70
70
  return_consumed_capacity: @debug_mode ? 'TOTAL' : 'NONE'
71
71
  }
72
72
  )
73
- return { status: 404, error: MSG_NOT_FOUND } if response.fetch(:item, []).empty?
73
+ return { status: 404, error: MSG_NOT_FOUND } if response[:item].nil? || response[:item].empty?
74
74
 
75
75
  { status: 200, items: [response[:item]] }
76
76
  rescue Aws::Errors::ServiceError => e
@@ -89,6 +89,10 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
89
89
 
90
90
  # find_by_PK
91
91
  response = find_by_pk(p_key: pk, s_key: json['SK']) unless pk.nil?
92
+
93
+ p "FOUND? #{response[:status]}"
94
+ pp response[:items]
95
+
92
96
  return response unless response[:status] != 404
93
97
 
94
98
  # find_by_dmphub_provenance_id -> if no PK and no dmp_id result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmp-dynamo_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - briri