uc3-dmp-rds 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-rds/authenticator.rb +4 -3
- data/lib/uc3-dmp-rds/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12d1d6576ea3620ee8bf943382a260531b6193a39141173698fd5e70f8fccca9
|
4
|
+
data.tar.gz: '08c112afc6771fa199222358eeb09f7d45821f92775875b639fd0c2d91fc2dbe'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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['
|
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
|
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
|
data/lib/uc3-dmp-rds/version.rb
CHANGED