toccatore 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 42293b18d16efba366c96b902b4afdbda27e1c0c
4
- data.tar.gz: 449ce93c8348885f619907c0eda997e3c51d079a
3
+ metadata.gz: 18794a290d5b37831e228d170849338b67e48cc9
4
+ data.tar.gz: d7a8d75e76ac3611375895cfa5baf552daf1579c
5
5
  SHA512:
6
- metadata.gz: 3f1992999cb94249db3d154025c587b6158449bb68111f3ac87e463cdb98025ebbddaa09a9945b0fadd43f5323f3bc92119738b1dee09d01b681a4a8fa37462e
7
- data.tar.gz: 4eb82b6dd46ae1e7be78b87e44087d3c1ac41bc0fe64c5220e62a63a5117965e13d005b2c63ef7edbee62341f24c4d29b2a2bae146cb614fcc138257a1e0d8cf
6
+ metadata.gz: 394448d66f7e3673579d8ac0d0c93403ccd3d5e9549106dd50e4248c51d9a2f120842f4a5e6402e68c5d85283f3041667511e9273a4d1a4e90b53059c6b7c7e4
7
+ data.tar.gz: 4e3b4fa820d446eb2a7558adcf314a371a2bac1af8f2ed1f08aef1a93f27cffa5f1f8ebf74264124d4db3ad86bab1bde53c2b3d00ff7525fb0303f5ab3ce9775
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- toccatore (0.2.2)
4
+ toccatore (0.2.3)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  dotenv (~> 2.1, >= 2.1.1)
7
7
  gender_detector (~> 1.0)
@@ -20,7 +20,7 @@ module Toccatore
20
20
  doi = item.fetch("doi")
21
21
  related_identifiers = item.fetch("relatedIdentifier", [])
22
22
  skip_doi = related_identifiers.any? do |related_identifier|
23
- ["IsIdenticalTo", "IsPartOf"].include?(related_identifier.split(':', 3).first)
23
+ ["IsIdenticalTo", "IsPartOf", "IsPreviousVersionOf"].include?(related_identifier.split(':', 3).first)
24
24
  end
25
25
  name_identifiers = item.fetch("nameIdentifier", [])
26
26
 
@@ -1,3 +1,3 @@
1
1
  module Toccatore
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -0,0 +1 @@
1
+ {"responseHeader":{"status":0,"QTime":3},"response":{"numFound":1,"start":0,"docs":[{"minted":"2016-12-09T04:46:31Z","datacentre_symbol":"FIGSHARE.ARS","xml":"PHJlc291cmNlIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC0zL21ldGFkYXRhLnhzZCI+PGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuNjA4NC9tOS5maWdzaGFyZS4zNTA1Nzk5LnY1PC9pZGVudGlmaWVyPjxjcmVhdG9ycz48Y3JlYXRvcj48Y3JlYXRvck5hbWU+WGluIEh1aTwvY3JlYXRvck5hbWU+PC9jcmVhdG9yPjxjcmVhdG9yPjxjcmVhdG9yTmFtZT5LeWxlIE5pZW1leWVyPC9jcmVhdG9yTmFtZT48bmFtZUlkZW50aWZpZXIgbmFtZUlkZW50aWZpZXJTY2hlbWU9Ik9SQ0lEIiBzY2hlbWVVUkk9Imh0dHA6Ly9vcmNpZC5vcmciPjAwMDAtMDAwMy00NDI1LTcwOTc8L25hbWVJZGVudGlmaWVyPjwvY3JlYXRvcj48Y3JlYXRvcj48Y3JlYXRvck5hbWU+S3lsZSBCcmFkeTwvY3JlYXRvck5hbWU+PC9jcmVhdG9yPjxjcmVhdG9yPjxjcmVhdG9yTmFtZT5DaGloLUplbiBTdW5nPC9jcmVhdG9yTmFtZT48L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I+Rmlnc2hhcmU8L3B1Ymxpc2hlcj48cHVibGljYXRpb25ZZWFyPjIwMTY8L3B1YmxpY2F0aW9uWWVhcj48ZGF0ZXM+PGRhdGUgZGF0ZVR5cGU9IkNyZWF0ZWQiPjIwMTYtMTItMDk8L2RhdGU+PGRhdGUgZGF0ZVR5cGU9IlVwZGF0ZWQiPjIwMTYtMTItMDk8L2RhdGU+PC9kYXRlcz48cmVzb3VyY2VUeXBlIHJlc291cmNlVHlwZUdlbmVyYWw9IkNvbGxlY3Rpb24iPkZpbGVzZXQ8L3Jlc291cmNlVHlwZT48c2l6ZXM+PHNpemU+MjQ1MTkzMSBCeXRlczwvc2l6ZT48L3NpemVzPjxyZWxhdGVkSWRlbnRpZmllcnM+PHJlbGF0ZWRJZGVudGlmaWVyIHJlbGF0ZWRJZGVudGlmaWVyVHlwZT0iRE9JIiByZWxhdGlvblR5cGU9IklzUHJldmlvdXNWZXJzaW9uT2YiPjEwLjYwODQvbTkuZmlnc2hhcmUuMzUwNTc5OTwvcmVsYXRlZElkZW50aWZpZXI+PC9yZWxhdGVkSWRlbnRpZmllcnM+PHJpZ2h0c0xpc3Q+PHJpZ2h0cyByaWdodHNVUkk9Imh0dHBzOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS80LjAvIj5DQy1CWTwvcmlnaHRzPjwvcmlnaHRzTGlzdD48L3Jlc291cmNlPg==","updated":"2016-12-09T04:49:10Z","doi":"10.6084/M9.FIGSHARE.3505799.V5","publisher":"Figshare","creator":["Xin Hui","Kyle Niemeyer","Kyle Brady","Chih-Jen Sung"],"title":["Data and plotting scripts for \"Reduced chemistry for butanol isomers at engine-relevant conditions\""],"resourceTypeGeneral":"Collection","relatedIdentifier":["IsPreviousVersionOf:DOI:10.6084/m9.figshare.3505799"],"nameIdentifier":["ORCID:0000-0003-4425-7097"],"publicationYear":"2016"}]}}
@@ -117,6 +117,12 @@ describe Toccatore::OrcidUpdate, vcr: true do
117
117
  expect(subject.parse_data(result)).to eq([])
118
118
  end
119
119
 
120
+ it "should report if there are works ignored because of an IsPreviousVersionOf relation" do
121
+ body = File.read(fixture_path + 'orcid_update_is_previous.json')
122
+ result = OpenStruct.new(body: { "data" => JSON.parse(body) })
123
+ expect(subject.parse_data(result)).to eq([])
124
+ end
125
+
120
126
  it "should report if there are works because of an IsIdenticalTo relation and delete action" do
121
127
  body = File.read(fixture_path + 'orcid_update_is_identical.json')
122
128
  result = OpenStruct.new(body: { "data" => JSON.parse(body) })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toccatore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -262,6 +262,7 @@ files:
262
262
  - spec/fixtures/orcid_update.json
263
263
  - spec/fixtures/orcid_update_is_identical.json
264
264
  - spec/fixtures/orcid_update_is_part.json
265
+ - spec/fixtures/orcid_update_is_previous.json
265
266
  - spec/fixtures/orcid_update_nil.json
266
267
  - spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_delete.yml
267
268
  - spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_fail.yml