uc3-dmp-id 0.0.90 → 0.0.91

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13c2a01e8e979f1cc3a4e9fe003cb8429d742c0e5b9d217d78e2d93bd36c276c
4
- data.tar.gz: 5541be19755ac0850166d14fd4e02408d02db1e35caf83cddab527729c061a54
3
+ metadata.gz: 8fc2f1105b9026517773a3df7165cf35d1e346f35abe5e1250390328ebdb8dcc
4
+ data.tar.gz: 6ebf56cfed68d53f67e1b272c0f9eec2db1fe027d773388ddc9705e277435e1f
5
5
  SHA512:
6
- metadata.gz: 0d9e65edacb5d45bef33510718f50023fb14abf271859ca07910bd2b60941ebb7219e662efcead0a818141e7e2349f5e57c81e705162685dbe7cd6d736c60238
7
- data.tar.gz: f5e2103aa8360d25a73ec5af6415a3087c73afdfc63c03983cbdf798e107e1bb086f0effc7c00ca3ddd71e4859e48832e03d441a2d092ff11ab4c0f0db053fcc
6
+ metadata.gz: 6754ec2264db1e2b993c5cf5289a13b48c888587a5c2df2f5ad64521ffeba1b13c71916e5feea230bf0fc75dab3c79a47e75fe92101c885afa572529866834a2
7
+ data.tar.gz: aac5e6524c66cee7f18cfe9f4fe90d44cdfbdedc530c1a7318140929bf5ad59f07645a3d9b016fef54d133ee1f7ac17937479c5edf74164781cde3dba52047ed
@@ -38,16 +38,14 @@ module Uc3DmpId
38
38
  # Delete the Latest version
39
39
  resp = client.delete_item(p_key: p_key, s_key: Helper::SK_DMP_PREFIX, logger: logger)
40
40
 
41
- # TODO: We should do a check here to see if it was successful!
42
- puts resp.inspect
41
+ # TODO: We should do a check here to see if it was successful!
43
42
 
44
43
  # Notify EZID about the removal
45
44
  _post_process(json: dmp, logger: logger)
46
45
  # Return the tombstoned record
47
46
  Helper.cleanse_dmp_json(json: JSON.parse({ dmp: dmp }.to_json))
48
47
  rescue Aws::Errors::ServiceError => e
49
- puts "ERROR in Uc3DmpId::Deleter - #{e.message}"
50
- puts e.backtrace
48
+ logger.error(message: e.message, details: e.backtrace) unless logger.nil?
51
49
  { status: 500, error: Messages::MSG_SERVER_ERROR }
52
50
  end
53
51
  # rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
@@ -135,7 +135,7 @@ module Uc3DmpId
135
135
  filter_expression: 'SK = :version',
136
136
  expression_attribute_values: { ':version': Helper::DMP_LATEST_VERSION }
137
137
  }
138
- puts "Querying _by_owner with #{args}" if debug
138
+ logger.info(message: "Querying _by_owner with #{args}") unless logger.nil?
139
139
  client = client.nil? ? Uc3DmpDynamo::Client.new : client
140
140
  _process_search_response(response: client.query(args: args, logger: logger))
141
141
  end
@@ -159,7 +159,7 @@ module Uc3DmpId
159
159
  filter_expression: 'SK = :version',
160
160
  expression_attribute_values: { ':version': Helper::DMP_LATEST_VERSION }
161
161
  }
162
- puts "Querying _by_owner_org with #{args}" if debug
162
+ logger.info(message: "Querying _by_owner_org with #{args}") unless logger.nil?
163
163
  client = client.nil? ? Uc3DmpDynamo::Client.new : client
164
164
  _process_search_response(response: client.query(args: args, logger: logger))
165
165
  end
@@ -180,7 +180,7 @@ module Uc3DmpId
180
180
  filter_expression: 'SK = :version',
181
181
  expression_attribute_values: { ':version': Helper::DMP_LATEST_VERSION }
182
182
  }
183
- puts "Querying _by_mod_day with #{args}" if debug
183
+ logger.info(message: "Querying _by_mod_day with #{args}") unless logger.nil?
184
184
  client = client.nil? ? Uc3DmpDynamo::Client.new : client
185
185
  _process_search_response(response: client.query(args: args, logger: logger))
186
186
  end
@@ -45,7 +45,7 @@ module Uc3DmpId
45
45
  # ------------------------------------------------------------------------------------
46
46
  def _load_schema(mode:)
47
47
  # Instatiate the matching schema
48
- schema = "Uc3DmpId::Schemas::#{mode.to_s.downcase.capitalize}".split('::').inject(Object) { |o,c| p o; o.const_get c }
48
+ schema = "Uc3DmpId::Schemas::#{mode.to_s.downcase.capitalize}".split('::').inject(Object) { |o,c| o.const_get c }
49
49
  schema.respond_to?(:load) ? schema.load : nil
50
50
  end
51
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.90'
4
+ VERSION = '0.0.91'
5
5
  end
@@ -111,7 +111,6 @@ module Uc3DmpId
111
111
  resp = client.put_item(json: latest_version, logger: logger)
112
112
  return nil if resp.nil?
113
113
 
114
- puts "Created new version #{latest_version['PK']} - #{latest_version['SK']}" if debug
115
114
  msg = "#{SOURCE} created version PK: #{latest_version['PK']} SK: #{latest_version['SK']}"
116
115
  logger.info(message: msg, details: latest_version) if logger.respond_to?(:debug)
117
116
  latest_version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.90
4
+ version: 0.0.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley