Skip to content

Commit fb282f0

Browse files
author
Martin Fenner
committed
updated specs
1 parent 6c7fc60 commit fb282f0

27 files changed

+514
-881
lines changed

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PATH
22
remote: .
33
specs:
4-
orcid_client (0.9.3)
4+
orcid_client (0.9.4)
55
activesupport (>= 4.2.5, < 6)
6-
bolognese (~> 1.3, >= 1.3.19)
6+
bolognese (~> 1.3, >= 1.9.8)
77
builder (~> 3.2, >= 3.2.2)
88
dotenv (~> 2.1, >= 2.1.1)
99
maremma (>= 4.4)
@@ -24,7 +24,7 @@ GEM
2424
benchmark_methods (0.7)
2525
bibtex-ruby (6.0.0)
2626
latex-decode (~> 0.0)
27-
bolognese (1.9.7)
27+
bolognese (1.9.9)
2828
activesupport (>= 4.2.5)
2929
benchmark_methods (~> 0.7)
3030
bibtex-ruby (>= 5.1.0)
@@ -40,7 +40,7 @@ GEM
4040
json-ld-preloaded (~> 3.1, >= 3.1.3)
4141
jsonlint (~> 0.3.0)
4242
loofah (~> 2.0, >= 2.0.3)
43-
maremma (>= 4.7, < 5)
43+
maremma (>= 4.9.4, < 5)
4444
namae (~> 1.0)
4545
nokogiri (~> 1.11.2)
4646
oj (~> 3.10)
@@ -56,7 +56,7 @@ GEM
5656
citeproc (~> 1.0, >= 1.0.9)
5757
csl (~> 1.5)
5858
colorize (0.8.1)
59-
concurrent-ruby (1.1.8)
59+
concurrent-ruby (1.1.9)
6060
crack (0.4.5)
6161
rexml
6262
crass (1.0.6)
@@ -111,10 +111,10 @@ GEM
111111
optimist (~> 3)
112112
latex-decode (0.3.2)
113113
link_header (0.0.8)
114-
loofah (2.9.1)
114+
loofah (2.10.0)
115115
crass (~> 1.0.2)
116116
nokogiri (>= 1.5.9)
117-
maremma (4.7.4)
117+
maremma (4.9.4)
118118
activesupport (>= 4.2.5)
119119
addressable (>= 2.3.6)
120120
builder (~> 3.2, >= 3.2.2)

lib/orcid_client/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ module Base
1818

1919
# default values for some ENV variables
2020
ENV['ORCID_API_URL'] ||= "https://api.sandbox.orcid.org"
21-
ENV['API_URL'] ||= "https://api.datacite.org"
21+
ENV['API_URL'] ||= "https://api.stage.datacite.org"
2222
end
2323
end

lib/orcid_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module OrcidClient
2-
VERSION = "0.9.3"
2+
VERSION = "0.9.4"
33
end

lib/orcid_client/work.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(doi:, orcid:, orcid_token:, **options)
2323
@doi = doi
2424
@orcid = orcid
2525
@orcid_token = orcid_token
26-
@sandbox = options.fetch(:sandbox, nil) || ENV['API_URL'] == "https://api.test.datacite.org"
26+
@sandbox = options.fetch(:sandbox, nil) || ENV['API_URL'] == "https://api.stage.datacite.org"
2727
@put_code = options.fetch(:put_code, nil)
2828
end
2929

orcid_client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020

2121
# Declary dependencies here, rather than in the Gemfile
2222
s.add_dependency 'activesupport', '>= 4.2.5', '< 6'
23-
s.add_dependency 'bolognese', '~> 1.3', '>= 1.3.19'
23+
s.add_dependency 'bolognese', '~> 1.3', '>= 1.9.8'
2424
s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
2525
s.add_dependency 'dotenv', '~> 2.1', '>= 2.1.1'
2626
s.add_dependency 'maremma', '>= 4.4'

spec/api_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
require 'spec_helper'
22

33
describe OrcidClient, vcr: true do
4-
let(:doi) { "10.5281/zenodo.59983"}
4+
let(:doi) { "10.5438/h5xp-x178"}
55
let(:orcid) { "0000-0001-6528-2027" }
66
let(:orcid_token) { ENV["ORCID_TOKEN"] }
77
let(:notification_access_token) { ENV["NOTIFICATION_ACCESS_TOKEN"] }
8-
let(:put_code) { "921977" }
8+
let(:put_code) { "1256188" }
99
let(:fixture_path) { "spec/fixtures/" }
1010

1111
subject { OrcidClient::Work.new(doi: doi, orcid: orcid, orcid_token: orcid_token, put_code: put_code) }
@@ -31,7 +31,7 @@
3131
it 'should get works' do
3232
response = subject.get_works(sandbox: true)
3333
works = response.body.fetch("data", {}).fetch("group", {})
34-
expect(works.length).to eq(22)
34+
expect(works.length).to eq(23)
3535
work = works.first
3636
expect(work["external-ids"]).to eq("external-id" => [{"external-id-normalized"=>{"transient"=>true, "value"=>"10.5256/f1000research.67475.r16884"}, "external-id-normalized-error"=>nil, "external-id-relationship"=>"self", "external-id-type"=>"doi", "external-id-url"=>nil, "external-id-value"=>"10.5256/f1000research.67475.r16884"}])
3737
end

spec/author_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'spec_helper'
22

33
describe OrcidClient, vcr: true do
4-
let(:doi) { "10.5281/zenodo.59983"}
4+
let(:doi) { "10.5438/h5xp-x178"}
55
let(:orcid) { "0000-0001-6528-2027" }
66
let(:orcid_token) { ENV['ORCID_TOKEN'] }
77
let(:notification_access_token) { ENV['NOTIFICATION_ACCESS_TOKEN'] }

spec/fixtures/vcr_cassettes/OrcidClient/works/get/should_get_works.yml

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/vcr_cassettes/OrcidClient/works/post/should_create_work.yml

Lines changed: 47 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/vcr_cassettes/OrcidClient_Notification/data.yml

Lines changed: 30 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)