dataverse 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/dataverse/dataset.rb +19 -0
- data/lib/dataverse/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a08ba2d018273239e8d8f23ee61b4e8c13e7565ed4ad4cb22b95c77dc2f38d7
|
4
|
+
data.tar.gz: fb0a72b95f9a91354bada40b3dfe0c8607d2c3c2ba2470d7f523415b4c41f088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cff68b1067d06fe1b386d626e3e25eaacf77ce8ca28354bee0ad19c1283ab2da5bc5f761adb68b6165d9f0abc2c0c30fd86cd5622e5a7d7856aa527d0c2dbc5f
|
7
|
+
data.tar.gz: 34395f76c1b292a75ceb5cabac43e688a94eb688ae97d353df733c434dad5b617b087f5ede2d9ad60298d6c6f14ad4676dbb601fb9b2f0d429423dfdeffb3334
|
data/Gemfile.lock
CHANGED
data/lib/dataverse/dataset.rb
CHANGED
@@ -140,6 +140,13 @@ module Dataverse
|
|
140
140
|
.merge(version_data(version))
|
141
141
|
.merge('metadata' => metadata(version: version))
|
142
142
|
.merge('files' => files(version: version))
|
143
|
+
.tap do |h|
|
144
|
+
h['license'] = {
|
145
|
+
'label' => license_name,
|
146
|
+
'uri' => license_url,
|
147
|
+
'iconUrl' => license_icon
|
148
|
+
}
|
149
|
+
end
|
143
150
|
end
|
144
151
|
|
145
152
|
def raw_data(version: :latest, with_files: false)
|
@@ -188,6 +195,18 @@ module Dataverse
|
|
188
195
|
end
|
189
196
|
end
|
190
197
|
|
198
|
+
def license_url
|
199
|
+
fetch('termsOfUse')[/(?<=href=")[^"]*(?=")/]
|
200
|
+
end
|
201
|
+
|
202
|
+
def license_name
|
203
|
+
fetch('termsOfUse')[/[^>]*(?=<\/a>.$)/]
|
204
|
+
end
|
205
|
+
|
206
|
+
def license_icon
|
207
|
+
fetch('termsOfUse')[/(?<=src=")[^"]*(?=")/]
|
208
|
+
end
|
209
|
+
|
191
210
|
protected
|
192
211
|
|
193
212
|
def initialize(id)
|
data/lib/dataverse/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dataverse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.1.4
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Dataverse API.
|