toccatore 0.3.3 → 0.3.4
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/Gemfile.lock +1 -1
- data/lib/toccatore/cli.rb +1 -0
- data/lib/toccatore/datacite_related.rb +1 -1
- data/lib/toccatore/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- data/spec/datacite_related_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14d61cfc855fd0511c6edcf78f76a3ba92adad8d
|
|
4
|
+
data.tar.gz: 32b946eb6a965502362b03978fe9fd31f62dbd5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f6dd4249013ab2d738848542df78755526978ba0043ac75991e855dd3389f68fc54fa119d6cc4cee20c654f7dbccd8b15b3945aaa4f6b553d4ceb1b6985cbec
|
|
7
|
+
data.tar.gz: d588055da5420519137cdebbaf9bcaeff3abe9842991ee410caa88be0e0939aecf651e415d839b833d00114b9bbda78b19ae0e8b0b9d3b03f49ead2c42277bd8
|
data/Gemfile.lock
CHANGED
data/lib/toccatore/cli.rb
CHANGED
|
@@ -39,6 +39,7 @@ module Toccatore
|
|
|
39
39
|
method_option :q, type: :string
|
|
40
40
|
method_option :related_identifier, type: :string
|
|
41
41
|
method_option :doi, type: :string
|
|
42
|
+
method_option :jsonapi, :type => :boolean, :force => false
|
|
42
43
|
def datacite_related
|
|
43
44
|
datacite_related = Toccatore::DataciteRelated.new
|
|
44
45
|
datacite_related.queue_jobs(datacite_related.unfreeze(options))
|
|
@@ -60,7 +60,7 @@ module Toccatore
|
|
|
60
60
|
host = options[:push_url].presence || "https://bus.eventdata.crossref.org"
|
|
61
61
|
push_url = host + "/events"
|
|
62
62
|
|
|
63
|
-
if
|
|
63
|
+
if options[:jsonapi]
|
|
64
64
|
data = { "data" => {
|
|
65
65
|
"id" => item["id"],
|
|
66
66
|
"type" => "events",
|
data/lib/toccatore/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
|
@@ -136,7 +136,7 @@ describe Toccatore::DataciteRelated, vcr: true do
|
|
|
136
136
|
body = File.read(fixture_path + 'datacite_related.json')
|
|
137
137
|
result = OpenStruct.new(body: { "data" => JSON.parse(body) })
|
|
138
138
|
result = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
|
|
139
|
-
options = { push_url: ENV['LAGOTTO_URL'], access_token: ENV['LAGOTTO_TOKEN'] }
|
|
139
|
+
options = { push_url: ENV['LAGOTTO_URL'], access_token: ENV['LAGOTTO_TOKEN'], jsonapi: true }
|
|
140
140
|
expect { subject.push_data(result, options) }.to output(/https:\/\/doi.org\/10.15468\/dl.mb4das references https:\/\/doi.org\/10.3897\/phytokeys.12.2849 pushed to Event Data service.\n/).to_stdout
|
|
141
141
|
end
|
|
142
142
|
end
|