datacite 0.6.0 → 0.7.0
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/.rubocop.yml +28 -9
- data/Gemfile +10 -10
- data/Gemfile.lock +24 -24
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/datacite.gemspec +17 -17
- data/lib/datacite/autogenerate_doi_request_body.rb +1 -1
- data/lib/datacite/client.rb +6 -6
- data/lib/datacite/register_doi_request_body.rb +1 -1
- data/lib/datacite/response.rb +1 -1
- data/lib/datacite/version.rb +1 -1
- data/lib/datacite.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66112a3d3c17ff31745747464ca733f9154f41e1b135a9494a85f5a3c113c3d1
|
|
4
|
+
data.tar.gz: 77b577598b0e2ce56ef4123c6f8353d1079c254c43b2613898702e25f40a971b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18f4f54d95b7cfc2678a2068fd2a084c48d12707f451d5b8d5f84a9978a6a6d9d9739d3a21e5284cc25de3637124a46d597ab00b9e998e496afbaca11849d7d7
|
|
7
|
+
data.tar.gz: 90eb6d4920b6f4006c4bf0a2e0ffbca77c8fdc3abc0160400a5a7ba3ab2124075f6f12401a8e64b5e16318551bdac633bc2e91a95e996cc71483050d4f2d1c84
|
data/.rubocop.yml
CHANGED
|
@@ -3,7 +3,7 @@ plugins:
|
|
|
3
3
|
- rubocop-rspec
|
|
4
4
|
|
|
5
5
|
AllCops:
|
|
6
|
-
TargetRubyVersion: 3.
|
|
6
|
+
TargetRubyVersion: 3.4
|
|
7
7
|
|
|
8
8
|
Metrics/BlockLength:
|
|
9
9
|
Exclude:
|
|
@@ -16,14 +16,6 @@ RSpec/MultipleExpectations:
|
|
|
16
16
|
RSpec/MultipleMemoizedHelpers:
|
|
17
17
|
Enabled: false
|
|
18
18
|
|
|
19
|
-
Style/StringLiterals:
|
|
20
|
-
Enabled: true
|
|
21
|
-
EnforcedStyle: double_quotes
|
|
22
|
-
|
|
23
|
-
Style/StringLiteralsInInterpolation:
|
|
24
|
-
Enabled: true
|
|
25
|
-
EnforcedStyle: double_quotes
|
|
26
|
-
|
|
27
19
|
Layout/LineLength:
|
|
28
20
|
Max: 120
|
|
29
21
|
|
|
@@ -335,3 +327,30 @@ Style/SendWithLiteralMethodName: # new in 1.64
|
|
|
335
327
|
Enabled: true
|
|
336
328
|
Style/SuperArguments: # new in 1.64
|
|
337
329
|
Enabled: true
|
|
330
|
+
|
|
331
|
+
Gemspec/AttributeAssignment: # new in 1.77
|
|
332
|
+
Enabled: true
|
|
333
|
+
Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
|
|
334
|
+
Enabled: true
|
|
335
|
+
Lint/UselessDefaultValueArgument: # new in 1.76
|
|
336
|
+
Enabled: true
|
|
337
|
+
Lint/UselessOr: # new in 1.76
|
|
338
|
+
Enabled: true
|
|
339
|
+
Naming/PredicateMethod: # new in 1.76
|
|
340
|
+
Enabled: true
|
|
341
|
+
Style/ArrayIntersectWithSingleElement: # new in 1.81
|
|
342
|
+
Enabled: true
|
|
343
|
+
Style/CollectionQuerying: # new in 1.77
|
|
344
|
+
Enabled: true
|
|
345
|
+
Style/ComparableBetween: # new in 1.74
|
|
346
|
+
Enabled: true
|
|
347
|
+
Style/EmptyStringInsideInterpolation: # new in 1.76
|
|
348
|
+
Enabled: true
|
|
349
|
+
Style/HashFetchChain: # new in 1.75
|
|
350
|
+
Enabled: true
|
|
351
|
+
Style/ItBlockParameter: # new in 1.75
|
|
352
|
+
Enabled: true
|
|
353
|
+
Style/RedundantArrayFlatten: # new in 1.76
|
|
354
|
+
Enabled: true
|
|
355
|
+
RSpec/IncludeExamples: # new in 3.6
|
|
356
|
+
Enabled: true
|
data/Gemfile
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
4
|
|
|
5
5
|
# Specify your gem's dependencies in datacite.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
8
|
# Specify development dependencies here
|
|
9
|
-
gem
|
|
10
|
-
gem
|
|
11
|
-
gem
|
|
12
|
-
gem
|
|
13
|
-
gem
|
|
14
|
-
gem
|
|
15
|
-
gem
|
|
16
|
-
gem
|
|
17
|
-
gem
|
|
9
|
+
gem 'base64'
|
|
10
|
+
gem 'byebug'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'rubocop', '~> 1.7'
|
|
14
|
+
gem 'rubocop-rake'
|
|
15
|
+
gem 'rubocop-rspec'
|
|
16
|
+
gem 'simplecov'
|
|
17
|
+
gem 'webmock', '~> 3.13'
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
datacite (0.
|
|
4
|
+
datacite (0.7.0)
|
|
5
5
|
dry-monads (~> 1.3)
|
|
6
6
|
faraday (~> 2.0)
|
|
7
7
|
zeitwerk (~> 2.4)
|
|
@@ -13,7 +13,7 @@ GEM
|
|
|
13
13
|
public_suffix (>= 2.0.2, < 7.0)
|
|
14
14
|
ast (2.4.3)
|
|
15
15
|
base64 (0.3.0)
|
|
16
|
-
bigdecimal (3.
|
|
16
|
+
bigdecimal (3.3.1)
|
|
17
17
|
byebug (12.0.0)
|
|
18
18
|
concurrent-ruby (1.3.5)
|
|
19
19
|
crack (1.0.0)
|
|
@@ -25,48 +25,48 @@ GEM
|
|
|
25
25
|
concurrent-ruby (~> 1.0)
|
|
26
26
|
logger
|
|
27
27
|
zeitwerk (~> 2.6)
|
|
28
|
-
dry-monads (1.
|
|
28
|
+
dry-monads (1.9.0)
|
|
29
29
|
concurrent-ruby (~> 1.0)
|
|
30
30
|
dry-core (~> 1.1)
|
|
31
31
|
zeitwerk (~> 2.6)
|
|
32
|
-
faraday (2.
|
|
32
|
+
faraday (2.14.0)
|
|
33
33
|
faraday-net_http (>= 2.0, < 3.5)
|
|
34
34
|
json
|
|
35
35
|
logger
|
|
36
|
-
faraday-net_http (3.4.
|
|
36
|
+
faraday-net_http (3.4.1)
|
|
37
37
|
net-http (>= 0.5.0)
|
|
38
|
-
hashdiff (1.2.
|
|
39
|
-
json (2.
|
|
38
|
+
hashdiff (1.2.1)
|
|
39
|
+
json (2.15.1)
|
|
40
40
|
language_server-protocol (3.17.0.5)
|
|
41
41
|
lint_roller (1.1.0)
|
|
42
42
|
logger (1.7.0)
|
|
43
43
|
net-http (0.6.0)
|
|
44
44
|
uri
|
|
45
45
|
parallel (1.27.0)
|
|
46
|
-
parser (3.3.
|
|
46
|
+
parser (3.3.9.0)
|
|
47
47
|
ast (~> 2.4.1)
|
|
48
48
|
racc
|
|
49
|
-
prism (1.
|
|
49
|
+
prism (1.6.0)
|
|
50
50
|
public_suffix (6.0.2)
|
|
51
51
|
racc (1.8.1)
|
|
52
52
|
rainbow (3.1.1)
|
|
53
53
|
rake (13.3.0)
|
|
54
|
-
regexp_parser (2.
|
|
55
|
-
rexml (3.4.
|
|
54
|
+
regexp_parser (2.11.3)
|
|
55
|
+
rexml (3.4.4)
|
|
56
56
|
rspec (3.13.1)
|
|
57
57
|
rspec-core (~> 3.13.0)
|
|
58
58
|
rspec-expectations (~> 3.13.0)
|
|
59
59
|
rspec-mocks (~> 3.13.0)
|
|
60
|
-
rspec-core (3.13.
|
|
60
|
+
rspec-core (3.13.6)
|
|
61
61
|
rspec-support (~> 3.13.0)
|
|
62
62
|
rspec-expectations (3.13.5)
|
|
63
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
64
64
|
rspec-support (~> 3.13.0)
|
|
65
|
-
rspec-mocks (3.13.
|
|
65
|
+
rspec-mocks (3.13.6)
|
|
66
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
67
67
|
rspec-support (~> 3.13.0)
|
|
68
|
-
rspec-support (3.13.
|
|
69
|
-
rubocop (1.
|
|
68
|
+
rspec-support (3.13.6)
|
|
69
|
+
rubocop (1.81.1)
|
|
70
70
|
json (~> 2.3)
|
|
71
71
|
language_server-protocol (~> 3.17.0.2)
|
|
72
72
|
lint_roller (~> 1.1.0)
|
|
@@ -74,16 +74,16 @@ GEM
|
|
|
74
74
|
parser (>= 3.3.0.2)
|
|
75
75
|
rainbow (>= 2.2.2, < 4.0)
|
|
76
76
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
77
|
-
rubocop-ast (>= 1.
|
|
77
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
78
78
|
ruby-progressbar (~> 1.7)
|
|
79
79
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
80
|
-
rubocop-ast (1.
|
|
80
|
+
rubocop-ast (1.47.1)
|
|
81
81
|
parser (>= 3.3.7.2)
|
|
82
82
|
prism (~> 1.4)
|
|
83
83
|
rubocop-rake (0.7.1)
|
|
84
84
|
lint_roller (~> 1.1)
|
|
85
85
|
rubocop (>= 1.72.1)
|
|
86
|
-
rubocop-rspec (3.
|
|
86
|
+
rubocop-rspec (3.7.0)
|
|
87
87
|
lint_roller (~> 1.1)
|
|
88
88
|
rubocop (~> 1.72, >= 1.72.1)
|
|
89
89
|
ruby-progressbar (1.13.0)
|
|
@@ -91,12 +91,12 @@ GEM
|
|
|
91
91
|
docile (~> 1.1)
|
|
92
92
|
simplecov-html (~> 0.11)
|
|
93
93
|
simplecov_json_formatter (~> 0.1)
|
|
94
|
-
simplecov-html (0.13.
|
|
94
|
+
simplecov-html (0.13.2)
|
|
95
95
|
simplecov_json_formatter (0.1.4)
|
|
96
|
-
unicode-display_width (3.
|
|
97
|
-
unicode-emoji (~> 4.
|
|
98
|
-
unicode-emoji (4.0
|
|
99
|
-
uri (1.0.
|
|
96
|
+
unicode-display_width (3.2.0)
|
|
97
|
+
unicode-emoji (~> 4.1)
|
|
98
|
+
unicode-emoji (4.1.0)
|
|
99
|
+
uri (1.0.4)
|
|
100
100
|
webmock (3.25.1)
|
|
101
101
|
addressable (>= 2.8.0)
|
|
102
102
|
crack (>= 0.3.2)
|
|
@@ -124,4 +124,4 @@ DEPENDENCIES
|
|
|
124
124
|
webmock (~> 3.13)
|
|
125
125
|
|
|
126
126
|
BUNDLED WITH
|
|
127
|
-
2.
|
|
127
|
+
2.7.2
|
data/Rakefile
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
5
|
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
|
7
7
|
|
|
8
|
-
require
|
|
8
|
+
require 'rubocop/rake_task'
|
|
9
9
|
|
|
10
10
|
RuboCop::RakeTask.new
|
|
11
11
|
|
data/bin/console
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
require
|
|
5
|
-
require
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'datacite'
|
|
6
6
|
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
|
@@ -11,5 +11,5 @@ require "datacite"
|
|
|
11
11
|
# require "pry"
|
|
12
12
|
# Pry.start
|
|
13
13
|
|
|
14
|
-
require
|
|
14
|
+
require 'irb'
|
|
15
15
|
IRB.start(__FILE__)
|
data/datacite.gemspec
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative
|
|
3
|
+
require_relative 'lib/datacite/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = 'datacite'
|
|
7
7
|
spec.version = Datacite::VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email = [
|
|
8
|
+
spec.authors = ['Justin Coyne']
|
|
9
|
+
spec.email = ['jcoyne@justincoyne.com']
|
|
10
10
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.description =
|
|
13
|
-
spec.homepage =
|
|
14
|
-
spec.required_ruby_version =
|
|
11
|
+
spec.summary = 'A Ruby client library for the DataCite REST API '
|
|
12
|
+
spec.description = 'See https://support.datacite.org/docs/api'
|
|
13
|
+
spec.homepage = 'https://github.com/sul-dlss/datacite-ruby'
|
|
14
|
+
spec.required_ruby_version = '>= 3.4'
|
|
15
15
|
|
|
16
|
-
spec.metadata[
|
|
16
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
17
17
|
|
|
18
|
-
spec.metadata[
|
|
19
|
-
spec.metadata[
|
|
18
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
19
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
20
20
|
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
|
21
21
|
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
|
@@ -24,12 +24,12 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
25
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
26
26
|
end
|
|
27
|
-
spec.bindir =
|
|
27
|
+
spec.bindir = 'exe'
|
|
28
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
|
-
spec.require_paths = [
|
|
29
|
+
spec.require_paths = ['lib']
|
|
30
30
|
|
|
31
|
-
spec.add_dependency
|
|
32
|
-
spec.add_dependency
|
|
33
|
-
spec.add_dependency
|
|
34
|
-
spec.metadata[
|
|
31
|
+
spec.add_dependency 'dry-monads', '~> 1.3'
|
|
32
|
+
spec.add_dependency 'faraday', '~> 2.0'
|
|
33
|
+
spec.add_dependency 'zeitwerk', '~> 2.4'
|
|
34
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
35
35
|
end
|
data/lib/datacite/client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require 'faraday'
|
|
4
|
+
require 'dry/monads'
|
|
5
5
|
|
|
6
6
|
module Datacite
|
|
7
7
|
# The connection to DataCite API
|
|
@@ -11,7 +11,7 @@ module Datacite
|
|
|
11
11
|
# @param [String] username
|
|
12
12
|
# @param [String] password
|
|
13
13
|
# @param [String] host
|
|
14
|
-
def initialize(username: nil, password: nil, host:
|
|
14
|
+
def initialize(username: nil, password: nil, host: 'api.test.datacite.org')
|
|
15
15
|
@conn = Faraday.new(
|
|
16
16
|
url: "https://#{host}",
|
|
17
17
|
headers: headers
|
|
@@ -85,14 +85,14 @@ module Datacite
|
|
|
85
85
|
|
|
86
86
|
# @returns [Dry::Monads::Result]
|
|
87
87
|
def register(request_body)
|
|
88
|
-
response = conn.post(
|
|
88
|
+
response = conn.post('/dois', request_body)
|
|
89
89
|
response.success? ? Success(Response.new(response)) : Failure(response)
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def headers
|
|
93
93
|
{
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
'Content-Type' => 'application/vnd.api+json',
|
|
95
|
+
'User-Agent' => "Datacite Ruby client version #{Datacite::VERSION}"
|
|
96
96
|
}
|
|
97
97
|
end
|
|
98
98
|
|
data/lib/datacite/response.rb
CHANGED
data/lib/datacite/version.rb
CHANGED
data/lib/datacite.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: datacite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
10
|
+
date: 2025-10-22 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: dry-monads
|
|
@@ -85,7 +84,6 @@ metadata:
|
|
|
85
84
|
homepage_uri: https://github.com/sul-dlss/datacite-ruby
|
|
86
85
|
source_code_uri: https://github.com/sul-dlss/datacite-ruby
|
|
87
86
|
rubygems_mfa_required: 'true'
|
|
88
|
-
post_install_message:
|
|
89
87
|
rdoc_options: []
|
|
90
88
|
require_paths:
|
|
91
89
|
- lib
|
|
@@ -93,15 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
93
91
|
requirements:
|
|
94
92
|
- - ">="
|
|
95
93
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '3.
|
|
94
|
+
version: '3.4'
|
|
97
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
96
|
requirements:
|
|
99
97
|
- - ">="
|
|
100
98
|
- !ruby/object:Gem::Version
|
|
101
99
|
version: '0'
|
|
102
100
|
requirements: []
|
|
103
|
-
rubygems_version: 3.
|
|
104
|
-
signing_key:
|
|
101
|
+
rubygems_version: 3.6.2
|
|
105
102
|
specification_version: 4
|
|
106
103
|
summary: A Ruby client library for the DataCite REST API
|
|
107
104
|
test_files: []
|