metamatter 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/fixtures/vcr_cassettes/datacite.yml +71 -0
- data/fixtures/vcr_cassettes/lagotto_readme.yml +157 -0
- data/fixtures/vcr_cassettes/readme.yml +9 -9
- data/lib/metamatter.rb +10 -2
- data/lib/metamatter/datacite.rb +42 -0
- data/lib/metamatter/readme.rb +3 -3
- data/lib/metamatter/version.rb +1 -1
- data/metamatter.gemspec +2 -1
- data/spec/metamatter_datacite_spec.rb +24 -0
- data/spec/metamatter_readme_spec.rb +2 -2
- data/spec/metamatter_spec.rb +12 -1
- metadata +22 -5
- data/Gemfile.lock +0 -71
- data/specs/metamatter_spec.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 972f50928b3d7c41ecd8e487313a05d3bbce6cad
|
4
|
+
data.tar.gz: c017a890774836759f3f0f6781522b49eb8aa1be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 674b15bab28404a15c0a949456e17cfeba45622fcfa3bfb719dad2e0a45534af57294e0fcc2ad12fa312d82189f7269180883655c5abb6fe73b06aaafb8d7360
|
7
|
+
data.tar.gz: 599edaa533569b79c4d72fbd41d6004e10c3aa3e51af8722483d9369ae87b5934761afd0881332debd561d8617969d8c3f72839c2c05320bc8ecce4c1c91488f
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Metamatter
|
2
2
|
|
3
|
-
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.
|
3
|
+
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.19630.svg)](http://dx.doi.org/10.5281/zenodo.19630)
|
4
4
|
[![Build Status](https://travis-ci.org/arfon/metamatter.svg?branch=master)](https://travis-ci.org/arfon/metamatter)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/metamatter.svg)](http://badge.fury.io/rb/metamatter)
|
5
6
|
|
6
7
|
Minimal metadata extractor for the GitHub API. Ultimately the goal is to get this to produce output similar to that described in [this blog post](http://www.arfon.org/json-ld-for-software-discovery-reuse-and-credit). Currently none of the entities in the output have any semantic context.
|
7
8
|
|
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://search.datacite.org/api?fl=doi,creator,title,publisher,publicationYear,resourceTypeGeneral,datacentre,datacentre_symbol,prefix,relatedIdentifier&fq=has_metadata:true&q=relatedIdentifier:https://github.com/articlemetrics/lagotto&rows=1000&wt=json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.1.19
|
23
|
+
Date:
|
24
|
+
- Tue, 28 Jul 2015 11:55:37 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |
|
34
|
+
{"responseHeader":{"status":0,"QTime":1},"response":{"numFound":1,"start":0,"docs":[{"datacentre_symbol":"CERN.ZENODO","datacentre":"CERN.ZENODO - ZENODO - Research. Shared.","prefix":"10.5281","doi":"10.5281/ZENODO.20039","relatedIdentifier":["IsSupplementTo:URL:https://github.com/articlemetrics/lagotto","IsSupplementTo:DOI:10.3789/isqv25no2.2013.04","HasPart:URL:https://zenodo.org/record/20039/files/alm_report_2015-07-13.zip"],"creator":["Public Library of Science"],"publisher":"Zenodo","title":["Cumulative PLOS ALM Report - July 2015"],"publicationYear":"2015","resourceTypeGeneral":"Dataset"}]}}
|
35
|
+
http_version:
|
36
|
+
recorded_at: Tue, 28 Jul 2015 12:06:48 GMT
|
37
|
+
- request:
|
38
|
+
method: get
|
39
|
+
uri: http://search.datacite.org/api?fl=doi,creator,title,publisher,publicationYear,resourceTypeGeneral,datacentre,datacentre_symbol,prefix,relatedIdentifier&fq=has_metadata:true&q=relatedIdentifier:https://github.com/articlemetrics/lagotto&rows=1000&wt=json
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ''
|
43
|
+
headers:
|
44
|
+
Accept-Encoding:
|
45
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
46
|
+
Accept:
|
47
|
+
- "*/*"
|
48
|
+
User-Agent:
|
49
|
+
- Ruby
|
50
|
+
response:
|
51
|
+
status:
|
52
|
+
code: 200
|
53
|
+
message: OK
|
54
|
+
headers:
|
55
|
+
Server:
|
56
|
+
- nginx/1.1.19
|
57
|
+
Date:
|
58
|
+
- Tue, 28 Jul 2015 11:55:37 GMT
|
59
|
+
Content-Type:
|
60
|
+
- application/json;charset=UTF-8
|
61
|
+
Transfer-Encoding:
|
62
|
+
- chunked
|
63
|
+
Connection:
|
64
|
+
- keep-alive
|
65
|
+
body:
|
66
|
+
encoding: UTF-8
|
67
|
+
string: |
|
68
|
+
{"responseHeader":{"status":0,"QTime":0},"response":{"numFound":1,"start":0,"docs":[{"datacentre_symbol":"CERN.ZENODO","datacentre":"CERN.ZENODO - ZENODO - Research. Shared.","prefix":"10.5281","doi":"10.5281/ZENODO.20039","relatedIdentifier":["IsSupplementTo:URL:https://github.com/articlemetrics/lagotto","IsSupplementTo:DOI:10.3789/isqv25no2.2013.04","HasPart:URL:https://zenodo.org/record/20039/files/alm_report_2015-07-13.zip"],"creator":["Public Library of Science"],"publisher":"Zenodo","title":["Cumulative PLOS ALM Report - July 2015"],"publicationYear":"2015","resourceTypeGeneral":"Dataset"}]}}
|
69
|
+
http_version:
|
70
|
+
recorded_at: Tue, 28 Jul 2015 12:06:48 GMT
|
71
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,157 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/repos/articlemetrics/lagotto/readme
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.github.drax-preview+json
|
12
|
+
User-Agent:
|
13
|
+
- Octokit Ruby Gem 4.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- token <GITHUB_TOKEN>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 301
|
23
|
+
message: Moved Permanently
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- GitHub.com
|
27
|
+
Date:
|
28
|
+
- Tue, 28 Jul 2015 12:03:23 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Content-Length:
|
32
|
+
- '160'
|
33
|
+
Status:
|
34
|
+
- 301 Moved Permanently
|
35
|
+
X-Ratelimit-Limit:
|
36
|
+
- '5000'
|
37
|
+
X-Ratelimit-Remaining:
|
38
|
+
- '4994'
|
39
|
+
X-Ratelimit-Reset:
|
40
|
+
- '1438087061'
|
41
|
+
X-Oauth-Scopes:
|
42
|
+
- public_repo, user
|
43
|
+
X-Accepted-Oauth-Scopes:
|
44
|
+
- admin:repo_hook, delete_repo, read:repo_hook, repo, repo:status, repo_deployment,
|
45
|
+
write:repo_hook
|
46
|
+
Location:
|
47
|
+
- https://api.github.com/repositories/4208139/readme
|
48
|
+
X-Github-Media-Type:
|
49
|
+
- github.drax-preview; format=json
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
X-Frame-Options:
|
53
|
+
- deny
|
54
|
+
Content-Security-Policy:
|
55
|
+
- default-src 'none'
|
56
|
+
Access-Control-Allow-Credentials:
|
57
|
+
- 'true'
|
58
|
+
Access-Control-Expose-Headers:
|
59
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
60
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
61
|
+
Access-Control-Allow-Origin:
|
62
|
+
- "*"
|
63
|
+
X-Github-Request-Id:
|
64
|
+
- 92C798E7:4149:206CB3A:55B76F8A
|
65
|
+
Strict-Transport-Security:
|
66
|
+
- max-age=31536000; includeSubdomains; preload
|
67
|
+
X-Content-Type-Options:
|
68
|
+
- nosniff
|
69
|
+
Vary:
|
70
|
+
- Accept-Encoding
|
71
|
+
X-Served-By:
|
72
|
+
- 2811da37fbdda4367181b328b22b2499
|
73
|
+
body:
|
74
|
+
encoding: UTF-8
|
75
|
+
string: '{"message":"Moved Permanently","url":"https://api.github.com/repositories/4208139/readme","documentation_url":"https://developer.github.com/v3/#http-redirects"}'
|
76
|
+
http_version:
|
77
|
+
recorded_at: Tue, 28 Jul 2015 12:03:22 GMT
|
78
|
+
- request:
|
79
|
+
method: get
|
80
|
+
uri: https://api.github.com/repositories/4208139/readme
|
81
|
+
body:
|
82
|
+
encoding: US-ASCII
|
83
|
+
string: ''
|
84
|
+
headers:
|
85
|
+
Accept:
|
86
|
+
- application/vnd.github.drax-preview+json
|
87
|
+
User-Agent:
|
88
|
+
- Octokit Ruby Gem 4.0.1
|
89
|
+
Content-Type:
|
90
|
+
- application/json
|
91
|
+
Authorization:
|
92
|
+
- token <GITHUB_TOKEN>
|
93
|
+
Accept-Encoding:
|
94
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
95
|
+
response:
|
96
|
+
status:
|
97
|
+
code: 200
|
98
|
+
message: OK
|
99
|
+
headers:
|
100
|
+
Server:
|
101
|
+
- GitHub.com
|
102
|
+
Date:
|
103
|
+
- Tue, 28 Jul 2015 12:03:23 GMT
|
104
|
+
Content-Type:
|
105
|
+
- application/json; charset=utf-8
|
106
|
+
Transfer-Encoding:
|
107
|
+
- chunked
|
108
|
+
Status:
|
109
|
+
- 200 OK
|
110
|
+
X-Ratelimit-Limit:
|
111
|
+
- '5000'
|
112
|
+
X-Ratelimit-Remaining:
|
113
|
+
- '4993'
|
114
|
+
X-Ratelimit-Reset:
|
115
|
+
- '1438087061'
|
116
|
+
Cache-Control:
|
117
|
+
- private, max-age=60, s-maxage=60
|
118
|
+
Last-Modified:
|
119
|
+
- Mon, 27 Jul 2015 05:38:49 GMT
|
120
|
+
Etag:
|
121
|
+
- W/"44cdc54d39b377cefd1a817473609b39"
|
122
|
+
X-Oauth-Scopes:
|
123
|
+
- public_repo, user
|
124
|
+
X-Accepted-Oauth-Scopes:
|
125
|
+
- ''
|
126
|
+
Vary:
|
127
|
+
- Accept, Authorization, Cookie, X-GitHub-OTP
|
128
|
+
- Accept-Encoding
|
129
|
+
X-Github-Media-Type:
|
130
|
+
- github.drax-preview; format=json
|
131
|
+
X-Xss-Protection:
|
132
|
+
- 1; mode=block
|
133
|
+
X-Frame-Options:
|
134
|
+
- deny
|
135
|
+
Content-Security-Policy:
|
136
|
+
- default-src 'none'
|
137
|
+
Access-Control-Allow-Credentials:
|
138
|
+
- 'true'
|
139
|
+
Access-Control-Expose-Headers:
|
140
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
141
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
142
|
+
Access-Control-Allow-Origin:
|
143
|
+
- "*"
|
144
|
+
X-Github-Request-Id:
|
145
|
+
- 92C798E7:4146:1AA2C37:55B76F8B
|
146
|
+
Strict-Transport-Security:
|
147
|
+
- max-age=31536000; includeSubdomains; preload
|
148
|
+
X-Content-Type-Options:
|
149
|
+
- nosniff
|
150
|
+
X-Served-By:
|
151
|
+
- 474556b853193c38f1b14328ce2d1b7d
|
152
|
+
body:
|
153
|
+
encoding: UTF-8
|
154
|
+
string: '{"name":"README.md","path":"README.md","sha":"f03692a2d0fe6a3cc8099e45880662742a514040","size":2904,"url":"https://api.github.com/repos/lagotto/lagotto/contents/README.md?ref=master","html_url":"https://github.com/lagotto/lagotto/blob/master/README.md","git_url":"https://api.github.com/repos/lagotto/lagotto/git/blobs/f03692a2d0fe6a3cc8099e45880662742a514040","download_url":"https://raw.githubusercontent.com/lagotto/lagotto/master/README.md","type":"file","content":"IyBMYWdvdHRvCgpbIVtCdWlsZCBTdGF0dXNdKGh0dHBzOi8vdHJhdmlzLWNp\nLm9yZy9sYWdvdHRvL2xhZ290dG8ucG5nP2JyYW5jaD1tYXN0ZXIpXShodHRw\nczovL3RyYXZpcy1jaS5vcmcvbGFnb3R0by9sYWdvdHRvKQpbIVtDb2RlIENs\naW1hdGVdKGh0dHBzOi8vY29kZWNsaW1hdGUuY29tL2dpdGh1Yi9sYWdvdHRv\nL2xhZ290dG8ucG5nKV0oaHR0cHM6Ly9jb2RlY2xpbWF0ZS5jb20vZ2l0aHVi\nL2xhZ290dG8vbGFnb3R0bykKWyFbQ29kZSBDbGltYXRlIFRlc3QgQ292ZXJh\nZ2VdKGh0dHBzOi8vY29kZWNsaW1hdGUuY29tL2dpdGh1Yi9sYWdvdHRvL2xh\nZ290dG8vY292ZXJhZ2UucG5nKV0oaHR0cHM6Ly9jb2RlY2xpbWF0ZS5jb20v\nZ2l0aHViL2xhZ290dG8vbGFnb3R0bykKWyFbRE9JXShodHRwczovL3plbm9k\nby5vcmcvYmFkZ2UvZG9pLzEwLjUyODEvemVub2RvLjIwMDQ2LnN2ZyldKGh0\ndHA6Ly9kb2kub3JnLzEwLjUyODEvemVub2RvLjIwMD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hbmNoZXMuCgoj\nIyBMaWNlbnNlCkxhZ290dG8gaXMgcmVsZWFzZWQgdW5kZXIgdGhlIFtNSVQg\nTGljZW5zZV0oaHR0cHM6Ly9naXRodWIuY29tL2xhZ290dG8vbGFnb3R0by9i\nbG9iL21hc3Rlci9MSUNFTlNFLm1kKS4K\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/lagotto/lagotto/contents/README.md?ref=master","git":"https://api.github.com/repos/lagotto/lagotto/git/blobs/f03692a2d0fe6a3cc8099e45880662742a514040","html":"https://github.com/lagotto/lagotto/blob/master/README.md"}}'
|
155
|
+
http_version:
|
156
|
+
recorded_at: Tue, 28 Jul 2015 12:03:23 GMT
|
157
|
+
recorded_with: VCR 2.9.3
|
@@ -25,7 +25,7 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- GitHub.com
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Tue, 28 Jul 2015 11:39:00 GMT
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Transfer-Encoding:
|
@@ -35,15 +35,15 @@ http_interactions:
|
|
35
35
|
X-Ratelimit-Limit:
|
36
36
|
- '5000'
|
37
37
|
X-Ratelimit-Remaining:
|
38
|
-
- '
|
38
|
+
- '4996'
|
39
39
|
X-Ratelimit-Reset:
|
40
|
-
- '
|
40
|
+
- '1438087061'
|
41
41
|
Cache-Control:
|
42
42
|
- private, max-age=60, s-maxage=60
|
43
43
|
Last-Modified:
|
44
|
-
-
|
44
|
+
- Tue, 28 Jul 2015 11:38:45 GMT
|
45
45
|
Etag:
|
46
|
-
- W/"
|
46
|
+
- W/"edf7abd3e13a076caaacfece92f50b19"
|
47
47
|
X-Oauth-Scopes:
|
48
48
|
- public_repo, user
|
49
49
|
X-Accepted-Oauth-Scopes:
|
@@ -67,16 +67,16 @@ http_interactions:
|
|
67
67
|
Access-Control-Allow-Origin:
|
68
68
|
- "*"
|
69
69
|
X-Github-Request-Id:
|
70
|
-
-
|
70
|
+
- 92C798E7:4CC8:1D8021B:55B769D4
|
71
71
|
Strict-Transport-Security:
|
72
72
|
- max-age=31536000; includeSubdomains; preload
|
73
73
|
X-Content-Type-Options:
|
74
74
|
- nosniff
|
75
75
|
X-Served-By:
|
76
|
-
-
|
76
|
+
- bd82876e9bf04990f289ba22f246ee9b
|
77
77
|
body:
|
78
78
|
encoding: UTF-8
|
79
|
-
string: '{"name":"README.md","path":"README.md","sha":"
|
79
|
+
string: '{"name":"README.md","path":"README.md","sha":"717f270417906ca0e466ddfa511b2babb3bb8129","size":2158,"url":"https://api.github.com/repos/arfon/metamatter/contents/README.md?ref=master","html_url":"https://github.com/arfon/metamatter/blob/master/README.md","git_url":"https://api.github.com/repos/arfon/metamatter/git/blobs/717f270417906ca0e466ddfa511b2babb3bb8129","download_url":"https://raw.githubusercontent.com/arfon/metamatter/master/README.md","type":"file","content":"IyBNZXRhbWF0dGVyCgpbIVtET0ldKGh0dHBzOi8vemVub2RvLm9yZy9iYWRn\nZS9kb2kvMTAuNTI4MS96ZW5vZG8uMTk2MzAuc3ZnKV0oaHR0cDovL2R4LmRv\naS5vcmcvMTAuNTI4MS96ZW5vZG8uMTk2MzApClshW0J1aWxkIFN0YXR1c10o\naHR0cHM6Ly90cmF2aXMtY2kub3JnL2FyZm9uL21ldGFtYXR0ZXIuc3ZnP2Jy\nYW5jaD1tYXN0ZXIpXShodHRwczovL3RyYXZpcy1jaS5vcmcvYXJmb24vbWV0\nYW1hdHRlcikKWyFbR2VtIFZlcnNpb25dKGh0dHBzOi8vYmFkZ2UuZnVyeS5p\nby9yYi9tZXRhbWF0dGVyLnN2ZyldKGh0dHA6Ly9iYWRnZS5mdXJ5LmlvL3Ji\nL21ldGFtYXR0ZXIpCgpNaW5pbWFsIG1ldGFkYXRhIGV4dHJhY3RvciBmb3Ig\ndGhlIEdpdEh1YiBBUEkuIFVsdGltYXRlbHkgdGhlIGdvYWwgaXMgdG8gZ2V0\nIHRoaXMgdG8gcHJvZHVjZSBvd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iAgImxpY2Vuc2UiOiB7CiAgICAi\nbmFtZSI6ICJNSVQgTGljZW5zZSIsCiAgICAidXJsIjogImh0dHBzOi8vYXBp\nLmdpdGh1Yi5jb20vbGljZW5zZXMvbWl0IgogIH0sCiAgImRvaSI6ICJodHRw\nOi8vZHguZG9pLm9yZy8xMC41MjgxL3plbm9kby4xOTYzMCIKfQoKYGBgCg==\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/arfon/metamatter/contents/README.md?ref=master","git":"https://api.github.com/repos/arfon/metamatter/git/blobs/717f270417906ca0e466ddfa511b2babb3bb8129","html":"https://github.com/arfon/metamatter/blob/master/README.md"}}'
|
80
80
|
http_version:
|
81
|
-
recorded_at:
|
81
|
+
recorded_at: Tue, 28 Jul 2015 11:39:00 GMT
|
82
82
|
recorded_with: VCR 2.9.3
|
data/lib/metamatter.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'octokit'
|
2
2
|
|
3
|
-
require_relative 'metamatter/classification'
|
4
3
|
require_relative 'metamatter/authors'
|
4
|
+
require_relative 'metamatter/classification'
|
5
|
+
require_relative 'metamatter/datacite'
|
5
6
|
require_relative 'metamatter/helpers'
|
6
7
|
require_relative 'metamatter/license'
|
7
8
|
require_relative 'metamatter/readme'
|
@@ -66,7 +67,14 @@ module Metamatter
|
|
66
67
|
#
|
67
68
|
# Returns a DOI string or nil
|
68
69
|
def doi
|
69
|
-
|
70
|
+
# Try README first
|
71
|
+
if readme_doi = Metamatter::Readme.new(self).doi
|
72
|
+
return readme_doi
|
73
|
+
elsif datacite_doi = Metamatter::Datacite.new(self).doi
|
74
|
+
return datacite_doi.first
|
75
|
+
else
|
76
|
+
return nil
|
77
|
+
end
|
70
78
|
end
|
71
79
|
|
72
80
|
# Private: The GitHub Repository response
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Metamatter
|
5
|
+
class Datacite
|
6
|
+
attr_accessor :repository
|
7
|
+
|
8
|
+
def initialize(repository)
|
9
|
+
@repository = repository
|
10
|
+
end
|
11
|
+
|
12
|
+
def doi
|
13
|
+
docs = datacite_response["response"]["docs"]
|
14
|
+
return nil if docs.empty?
|
15
|
+
detected_dois = Array(docs).map do |doc|
|
16
|
+
doi = doc.fetch("doi", nil)
|
17
|
+
end.compact
|
18
|
+
|
19
|
+
log_dois(detected_dois) if detected_dois.size > 1
|
20
|
+
return detected_dois
|
21
|
+
end
|
22
|
+
|
23
|
+
def log_dois(dois)
|
24
|
+
puts "Warning: More than one DOI from Datacite search returned"
|
25
|
+
puts "Search string: #{url}"
|
26
|
+
dois.each { |doi| puts doi }
|
27
|
+
end
|
28
|
+
|
29
|
+
def datacite_response
|
30
|
+
begin
|
31
|
+
response = HTTParty.get(url).body
|
32
|
+
return JSON.parse(response)
|
33
|
+
rescue => e
|
34
|
+
return {}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def url
|
39
|
+
"http://search.datacite.org/api?q=relatedIdentifier:https://github.com/#{repository.name_with_owner}&fl=doi,creator,title,publisher,publicationYear,resourceTypeGeneral,datacentre,datacentre_symbol,prefix,relatedIdentifier&fq=is_active:true&fq=has_metadata:true&rows=1000&wt=json"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/metamatter/readme.rb
CHANGED
@@ -20,11 +20,11 @@ module Metamatter
|
|
20
20
|
end
|
21
21
|
|
22
22
|
# Find the Zenodo DOI if it's there
|
23
|
-
# Returns a DOI URL
|
23
|
+
# Returns a DOI URL 10.5281/zenodo.9789 or nil
|
24
24
|
def doi
|
25
25
|
if has_zenodo_badge?
|
26
|
-
match = contents.match(
|
27
|
-
return
|
26
|
+
match = contents.match(/\d{2}.\d{4}\/zenodo.\d*/)[0]
|
27
|
+
return match
|
28
28
|
else
|
29
29
|
return nil
|
30
30
|
end
|
data/lib/metamatter/version.rb
CHANGED
data/metamatter.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Metamatter::VERSION
|
9
9
|
spec.authors = ["Arfon Smith"]
|
10
10
|
spec.email = ["arfon.smith@gmail.com"]
|
11
|
-
spec.summary = "A
|
11
|
+
spec.summary = "A RubyGem for extracting minmal metadata from a GitHub repository"
|
12
12
|
spec.homepage = "https://github.com/arfon/metamatter"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "algorithmia", "~> 0.2.0"
|
21
|
+
spec.add_dependency "httparty", "~> 0.13"
|
21
22
|
spec.add_dependency "octokit", "~> 4.0"
|
22
23
|
spec.add_dependency "thor", "~> 0.19"
|
23
24
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe Metamatter::Datacite do
|
4
|
+
subject(:repository) { Metamatter::Repository.new('articlemetrics/lagotto') }
|
5
|
+
subject(:datacite_search) { Metamatter::Datacite.new(repository) }
|
6
|
+
|
7
|
+
it "knows the correct Datacite search URL" do
|
8
|
+
search_url = "http://search.datacite.org/api?q=relatedIdentifier:https://github.com/articlemetrics/lagotto&fl=doi,creator,title,publisher,publicationYear,resourceTypeGeneral,datacentre,datacentre_symbol,prefix,relatedIdentifier&fq=is_active:true&fq=has_metadata:true&rows=1000&wt=json"
|
9
|
+
expect(datacite_search.url).to eql(search_url)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "can query the Datacite API" do
|
13
|
+
VCR.use_cassette('datacite') do
|
14
|
+
expect(datacite_search.datacite_response).to_not be_nil
|
15
|
+
expect(datacite_search.datacite_response.to_s).to match(/10.5281\/ZENODO.20039/)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it "can return a Datacite DOI" do
|
20
|
+
VCR.use_cassette('datacite') do
|
21
|
+
expect(datacite_search.doi).to eql(["10.5281/ZENODO.20039"])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -6,7 +6,7 @@ describe Metamatter::Readme do
|
|
6
6
|
|
7
7
|
it "can return the README contents" do
|
8
8
|
VCR.use_cassette('readme') do
|
9
|
-
expect(readme.contents.size).to eql(
|
9
|
+
expect(readme.contents.size).to eql(2158)
|
10
10
|
expect(readme.contents).to match(/Minimal metadata extractor/)
|
11
11
|
end
|
12
12
|
end
|
@@ -19,7 +19,7 @@ describe Metamatter::Readme do
|
|
19
19
|
|
20
20
|
it "knows what the DOI is" do
|
21
21
|
VCR.use_cassette('readme') do
|
22
|
-
expect(readme.doi).to eql("
|
22
|
+
expect(readme.doi).to eql("10.5281/zenodo.19630")
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/spec/metamatter_spec.rb
CHANGED
@@ -28,7 +28,18 @@ describe Metamatter do
|
|
28
28
|
|
29
29
|
it "can return #doi" do
|
30
30
|
VCR.use_cassette('readme') do
|
31
|
-
expect(subject.doi).to eql("
|
31
|
+
expect(subject.doi).to eql("10.5281/zenodo.19630")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Zenodo DOI (from badge) is 10.5281/zenodo.20046
|
36
|
+
# Datacite DOI is 10.5281/ZENODO.20039
|
37
|
+
it "can return the Datacite DOI when there are both Zenodo and Datacite entries" do
|
38
|
+
repository = Metamatter::Repository.new('articlemetrics/lagotto')
|
39
|
+
VCR.use_cassette('datacite') do
|
40
|
+
VCR.use_cassette('lagotto_readme') do
|
41
|
+
expect(repository.doi).to eql("10.5281/zenodo.20046")
|
42
|
+
end
|
32
43
|
end
|
33
44
|
end
|
34
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metamatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arfon Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: algorithmia
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.13'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.13'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: octokit
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,18 +161,20 @@ files:
|
|
147
161
|
- ".gitignore"
|
148
162
|
- ".travis.yml"
|
149
163
|
- Gemfile
|
150
|
-
- Gemfile.lock
|
151
164
|
- LICENSE
|
152
165
|
- README.md
|
153
166
|
- Rakefile
|
154
167
|
- bin/metamatter
|
155
168
|
- fixtures/vcr_cassettes/algorithmia.yml
|
156
169
|
- fixtures/vcr_cassettes/authors.yml
|
170
|
+
- fixtures/vcr_cassettes/datacite.yml
|
171
|
+
- fixtures/vcr_cassettes/lagotto_readme.yml
|
157
172
|
- fixtures/vcr_cassettes/license.yml
|
158
173
|
- fixtures/vcr_cassettes/readme.yml
|
159
174
|
- lib/metamatter.rb
|
160
175
|
- lib/metamatter/authors.rb
|
161
176
|
- lib/metamatter/classification.rb
|
177
|
+
- lib/metamatter/datacite.rb
|
162
178
|
- lib/metamatter/helpers.rb
|
163
179
|
- lib/metamatter/license.rb
|
164
180
|
- lib/metamatter/readme.rb
|
@@ -166,11 +182,11 @@ files:
|
|
166
182
|
- metamatter.gemspec
|
167
183
|
- spec/metamatter_authors_spec.rb
|
168
184
|
- spec/metamatter_classification_spec.rb
|
185
|
+
- spec/metamatter_datacite_spec.rb
|
169
186
|
- spec/metamatter_license_spec.rb
|
170
187
|
- spec/metamatter_readme_spec.rb
|
171
188
|
- spec/metamatter_spec.rb
|
172
189
|
- spec/spec_helper.rb
|
173
|
-
- specs/metamatter_spec.rb
|
174
190
|
homepage: https://github.com/arfon/metamatter
|
175
191
|
licenses:
|
176
192
|
- MIT
|
@@ -194,10 +210,11 @@ rubyforge_project:
|
|
194
210
|
rubygems_version: 2.2.2
|
195
211
|
signing_key:
|
196
212
|
specification_version: 4
|
197
|
-
summary: A
|
213
|
+
summary: A RubyGem for extracting minmal metadata from a GitHub repository
|
198
214
|
test_files:
|
199
215
|
- spec/metamatter_authors_spec.rb
|
200
216
|
- spec/metamatter_classification_spec.rb
|
217
|
+
- spec/metamatter_datacite_spec.rb
|
201
218
|
- spec/metamatter_license_spec.rb
|
202
219
|
- spec/metamatter_readme_spec.rb
|
203
220
|
- spec/metamatter_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
metamatter (0.0.2)
|
5
|
-
algorithmia (~> 0.2.0)
|
6
|
-
octokit (~> 4.0)
|
7
|
-
thor (~> 0.19)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
addressable (2.3.8)
|
13
|
-
algorithmia (0.2.0)
|
14
|
-
httparty (~> 0.13.1)
|
15
|
-
json (~> 1.8)
|
16
|
-
rake (~> 10.4)
|
17
|
-
coderay (1.1.0)
|
18
|
-
crack (0.4.2)
|
19
|
-
safe_yaml (~> 1.0.0)
|
20
|
-
diff-lcs (1.2.5)
|
21
|
-
faraday (0.9.1)
|
22
|
-
multipart-post (>= 1.2, < 3)
|
23
|
-
httparty (0.13.5)
|
24
|
-
json (~> 1.8)
|
25
|
-
multi_xml (>= 0.5.2)
|
26
|
-
json (1.8.3)
|
27
|
-
method_source (0.8.2)
|
28
|
-
multi_xml (0.5.5)
|
29
|
-
multipart-post (2.0.0)
|
30
|
-
octokit (4.0.1)
|
31
|
-
sawyer (~> 0.6.0, >= 0.5.3)
|
32
|
-
pry (0.10.1)
|
33
|
-
coderay (~> 1.1.0)
|
34
|
-
method_source (~> 0.8.1)
|
35
|
-
slop (~> 3.4)
|
36
|
-
rake (10.4.2)
|
37
|
-
rspec (3.3.0)
|
38
|
-
rspec-core (~> 3.3.0)
|
39
|
-
rspec-expectations (~> 3.3.0)
|
40
|
-
rspec-mocks (~> 3.3.0)
|
41
|
-
rspec-core (3.3.2)
|
42
|
-
rspec-support (~> 3.3.0)
|
43
|
-
rspec-expectations (3.3.1)
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.3.0)
|
46
|
-
rspec-mocks (3.3.2)
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.3.0)
|
49
|
-
rspec-support (3.3.0)
|
50
|
-
safe_yaml (1.0.4)
|
51
|
-
sawyer (0.6.0)
|
52
|
-
addressable (~> 2.3.5)
|
53
|
-
faraday (~> 0.8, < 0.10)
|
54
|
-
slop (3.6.0)
|
55
|
-
thor (0.19.1)
|
56
|
-
vcr (2.9.3)
|
57
|
-
webmock (1.21.0)
|
58
|
-
addressable (>= 2.3.6)
|
59
|
-
crack (>= 0.3.2)
|
60
|
-
|
61
|
-
PLATFORMS
|
62
|
-
ruby
|
63
|
-
|
64
|
-
DEPENDENCIES
|
65
|
-
bundler (~> 1.6)
|
66
|
-
metamatter!
|
67
|
-
pry (~> 0.10)
|
68
|
-
rake (~> 10.0)
|
69
|
-
rspec (~> 3.3)
|
70
|
-
vcr (~> 2.9)
|
71
|
-
webmock (~> 1.21)
|
data/specs/metamatter_spec.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require_relative 'helper'
|
2
|
-
|
3
|
-
describe Metamatter do
|
4
|
-
|
5
|
-
subject { Metamatter::Repository.new('arfon/metamatter') }
|
6
|
-
|
7
|
-
it "knows what it's name and owner is" do
|
8
|
-
expect(subject.name_with_owner).to eql('arfon/metamatter')
|
9
|
-
expect(subject.owner).to eql('arfon')
|
10
|
-
expect(subject.name).to eql('metamatter')
|
11
|
-
end
|
12
|
-
end
|