Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
Fixing houndci-bot issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
hweng committed May 15, 2018
1 parent 157d989 commit 3b42cb5
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions lib/dams/controller_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,44 +64,44 @@ def osf_related_agents(document)
end

def agent_type(type)
type = "principalinvestigator" if type == "principal investigator" || type == "Principal Investigator"
type = 'principalinvestigator' if type == 'principal investigator' || type == 'Principal Investigator'

share_agent_type = [
"AGENTWORKRELATION",
"AgentWorkRelation",
"CONTRIBUTOR",
"CREATOR",
"Contributor",
"Creator",
"FUNDER",
"Funder",
"HOST",
"Host",
"PRINCIPALINVESTIGATOR",
"PRINCIPALINVESTIGATORCONTACT",
"PUBLISHER",
"PrincipalInvestigator",
"PrincipalInvestigatorContact",
"Publisher",
"agentworkrelation",
"contributor",
"creator",
"funder",
"host",
"principalinvestigator",
"principalinvestigatorcontact",
"publisher"
'AGENTWORKRELATION',
'AgentWorkRelation',
'CONTRIBUTOR',
'CREATOR',
'Contributor',
'Creator',
'FUNDER',
'Funder',
'HOST',
'Host',
'PRINCIPALINVESTIGATOR',
'PRINCIPALINVESTIGATORCONTACT',
'PUBLISHER',
'PrincipalInvestigator',
'PrincipalInvestigatorContact',
'Publisher',
'agentworkrelation',
'contributor',
'creator',
'funder',
'host',
'principalinvestigator',
'principalinvestigatorcontact',
'publisher'
]
type = (share_agent_type.include? type) ? type : "Contributor"
type = (share_agent_type.include? type) ? type : 'Contributor'
end

def osf_extra(document)
field_name = 'otherNote_json_tesim'
dams_data = document["#{field_name}"]
osf_data = {}
dams_data = document["#{field_name}"]
osf_data = {}

if dams_data != nil
dams_data.each do |datum|
if !dams_data.nil
dams_data.each do |datum|
other_note = JSON.parse(datum)
osf_data = { funding: other_note['value'] } if other_note['type'] == 'funding'
end
Expand Down

0 comments on commit 3b42cb5

Please sign in to comment.