uc3-dmp-rds 0.0.16 → 0.0.17

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: f5a1eef3f03371fe98e76dabd04387f03c8d141fb30782ab660c3ef098e6a4e9
4
- data.tar.gz: 1823a9005c68985f6f3af990f41255fecd21bf344987e4f9c150aa4873accf04
3
+ metadata.gz: 12d1d6576ea3620ee8bf943382a260531b6193a39141173698fd5e70f8fccca9
4
+ data.tar.gz: '08c112afc6771fa199222358eeb09f7d45821f92775875b639fd0c2d91fc2dbe'
5
5
  SHA512:
6
- metadata.gz: 91bb16e36bec17bff2a6cf257d279b59672c9c6ad30b6c779291c53ea5611fba8ea668455d720e9d924f0376b900f333ae84f3b8b85391ed6b431371dd555371
7
- data.tar.gz: 18222b1957ef9b5466e745673cff35a1e9fbe502f5a9facb5947b9aeefdc2d96a9f9f4454831a2938a223c03d4f5315ef297464a683273d90b35dccf7d909872
6
+ metadata.gz: 7d73bf4e5172eee22e80101d452ed41ff9bb3873abff75f90be4f39bd8b858adb8b46f901f1fb4e552a1f3e7a5a1f8f1c3ea04803c021d180bb9a1f04d7ff72f
7
+ data.tar.gz: a68f4ed811d8af5920c369c23a4452467a092a56aeec302e732cee594065cb439bacc0bbcd6c755fcb78b6cde81d3fd9923c0e8de7af6b09b1bbb3bc6cd93bf1
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'active_record'
4
4
  require 'active_record_simple_execute'
5
+ require 'json'
5
6
  require 'mysql2'
6
7
 
7
8
  module Uc3DmpRds
@@ -69,7 +70,7 @@ puts sql
69
70
  puts "DB RESULTS:"
70
71
  puts user
71
72
 
72
- return {} if user.nil? || user['mbox'].nil?
73
+ return {} if user.nil? || user['email'].nil?
73
74
 
74
75
  hash = {
75
76
  name: [user['surname'], user['firstname']].join(', '),
@@ -77,7 +78,7 @@ puts user
77
78
  admin: !user['perm_name'].nil?
78
79
  }
79
80
  hash[:user_id] = { type: 'orcid', identifier: user['orcid'] } unless user['orcid'].nil?
80
- return hash.to_json if user['org_name'].nil?
81
+ return hash if user['org_name'].nil?
81
82
 
82
83
  hash[:affiliation] = { name: user.fetch('ror_name', user['org_name']) }
83
84
  hash[:affiliation][:affiliation_id] = { type: 'ror', identifier: user['ror_id'] } unless user['ror_id'].nil?
@@ -85,7 +86,7 @@ puts user
85
86
  puts "HASH:"
86
87
  puts hash
87
88
 
88
- hash
89
+ JSON.parse(hash.to_json)
89
90
  end
90
91
  end
91
92
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpRds
4
- VERSION = '0.0.16'
4
+ VERSION = '0.0.17'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-rds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley