rbbt-sources 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/sources/pubmed.rb +3 -3
- data/test/rbbt/sources/test_pubmed.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 973d827d476c42023692f813a588ad500da04dd27f6903e1da9c74673985b40e
|
4
|
+
data.tar.gz: ed995de19a62f17908c2b7ed3f327782c75ece60aa0f7c5f373cc9309228c8b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cff68ce8c57381ec1581a6df61b56d40384b108030f87858ea1a735a82b8922b9d71a8b8a42930846f30186610058cbf738dccfb788ebf49e3f4d5e1b000809f
|
7
|
+
data.tar.gz: 771625cad70732c54cc2a1b798f6c0ac44004e73a9435e6699a7988a0904e987fecd9e375e6f888061b0f88a4c03ff3200322c59ca75a7f8f83dcdad8b19b156
|
data/lib/rbbt/sources/pubmed.rb
CHANGED
@@ -69,11 +69,11 @@ module PubMed
|
|
69
69
|
|
70
70
|
XML_KEYS.each do |p|
|
71
71
|
name, key = p
|
72
|
-
|
72
|
+
nodes = article.search(key)
|
73
73
|
|
74
|
-
next if
|
74
|
+
next if nodes.nil? || nodes.empty?
|
75
75
|
|
76
|
-
info[name] =
|
76
|
+
info[name] = nodes.collect{|n| n.content } * "\n\n"
|
77
77
|
end
|
78
78
|
|
79
79
|
bibentry = nil
|
@@ -12,6 +12,12 @@ class TestPubMed < Test::Unit::TestCase
|
|
12
12
|
pmids = ['16438716', 17204154]
|
13
13
|
assert(PubMed.get_article(pmids)[pmid].title == "Discovering semantic features in the literature: a foundation for building functional associations.")
|
14
14
|
end
|
15
|
+
|
16
|
+
def test_get_multi_abstract
|
17
|
+
pmid = "32141403"
|
18
|
+
|
19
|
+
assert PubMed.get_article(pmid).abstract.include?("This study shows PCOS patients are at increased risk of incident schizophrenia, and the metformin treatment has a protective effect against incident schizophrenia.")
|
20
|
+
end
|
15
21
|
|
16
22
|
def test_full_text
|
17
23
|
pmid = '16438716'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-sources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|