Skip to content

Commit

Permalink
fix person given name. #425
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 26, 2020
1 parent c1022ec commit 2f2e5ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/graphql/types/person_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def publications(**args)
Doi.query(nil, user_id: orcid_from_url(object[:id]), relation_type_id: "text", state: "findable", page: { size: args[:first], number: 1 }).results.to_a
end

def softwares(**_args)
def softwares(**args)
Doi.query(nil, user_id: orcid_from_url(object[:id]), relation_type_id: "software", state: "findable", page: { size: args[:first], number: 1 }).results.to_a
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def self.parse_message(id: nil, message: nil)
id: id,
orcid: message["orcid"],
name: message["name"],
given_names: message["givenNames"],
given_name: message["givenNames"],
family_name: message["familyName"] })
end

Expand Down
6 changes: 3 additions & 3 deletions spec/models/person_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
person = people[:data].first
expect(person.id).to eq("https://orcid.org/0000-0003-1519-3661")
expect(person.name).to eq("Peter Godfrey-Smith")
expect(person.given_names).to eq("Peter")
expect(person.given_name).to eq("Peter")
expect(person.family_name).to eq("Godfrey-Smith")
end

Expand All @@ -30,7 +30,7 @@
person = people[:data].first
expect(person.id).to eq("https://orcid.org/0000-0003-0796-7209")
expect(person.name).to eq("Peter St George-Hyslop")
expect(person.given_names).to eq("Peter")
expect(person.given_name).to eq("Peter")
expect(person.family_name).to eq(" St George-Hyslop")
end

Expand All @@ -42,7 +42,7 @@
person = people[:data].first
expect(person.id).to eq("https://orcid.org/0000-0003-0175-443X")
expect(person.name).to eq("Hajira Dambha-Miller")
expect(person.given_names).to eq("Hajira")
expect(person.given_name).to eq("Hajira")
expect(person.family_name).to eq("Dambha-Miller")
end

Expand Down

0 comments on commit 2f2e5ce

Please sign in to comment.