rbbt-sources 3.2.0 → 3.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d0830b8d8d26a21d37daf89ef7fcc0738cd05a6445608bc8c9de0284fc9e4c9
4
- data.tar.gz: 9351cb34b08a7de18d3754c8ed2ed3924f1713fefe228f39887b6943cd042d45
3
+ metadata.gz: 973d827d476c42023692f813a588ad500da04dd27f6903e1da9c74673985b40e
4
+ data.tar.gz: ed995de19a62f17908c2b7ed3f327782c75ece60aa0f7c5f373cc9309228c8b5
5
5
  SHA512:
6
- metadata.gz: 14b92f24a7278439d7026aeb70ad6aa2c5177f27d161f628c458d33cf45f7815349e54f3dc47dcc580e3a0da0f4c6fa759f22209338acba07671eb2dcef33d6a
7
- data.tar.gz: 7d909c93f08ba0a6b7810dc77dd1ce9759d563ee4faf3078d4276df203e8b125c316f48465442628cb9a3249915dbda1d2c9e1d161b14d6b82a324568c8f0bb3
6
+ metadata.gz: cff68ce8c57381ec1581a6df61b56d40384b108030f87858ea1a735a82b8922b9d71a8b8a42930846f30186610058cbf738dccfb788ebf49e3f4d5e1b000809f
7
+ data.tar.gz: 771625cad70732c54cc2a1b798f6c0ac44004e73a9435e6699a7988a0904e987fecd9e375e6f888061b0f88a4c03ff3200322c59ca75a7f8f83dcdad8b19b156
@@ -69,11 +69,11 @@ module PubMed
69
69
 
70
70
  XML_KEYS.each do |p|
71
71
  name, key = p
72
- node = article.search(key).first
72
+ nodes = article.search(key)
73
73
 
74
- next if node.nil?
74
+ next if nodes.nil? || nodes.empty?
75
75
 
76
- info[name] = node.content
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.0
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-06-21 00:00:00.000000000 Z
11
+ date: 2022-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbbt-util