gentle-scholar 3.0.0 → 3.0.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 +4 -4
- data/.travis.yml +1 -1
- data/lib/gentle-scholar/publication.rb +1 -1
- data/lib/gentle-scholar/version.rb +2 -2
- data/spec/publication_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39fd52981f178a0a3f999c6233eff7f3315c4086
|
|
4
|
+
data.tar.gz: c8c108724dd80598e5d5517d2cbcb921b135ea56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e3a7881e85d3800c812278143a32c08e3683dbddbe7dd8d2e40d85f1b58e9cdb65c2dffbb122ebb5e17229b768d2e63f6f4ca05d800aa2e82b18870b615cfb7
|
|
7
|
+
data.tar.gz: 14efda784ad413758ef199a693859b25ab86757771141e2e6b46f23b13394d77637faaa05f50190fb755cc8086618c84a23fd1882d2dcfd4b307bc877520014b
|
data/.travis.yml
CHANGED
|
@@ -90,7 +90,7 @@ module GentleScholar
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def self.extract_table_item(name, doc)
|
|
93
|
-
elem = doc.xpath("//div[@class='gs_scl' and contains(
|
|
93
|
+
elem = doc.xpath("//div[@class='gs_scl' and contains(div,'#{name}')]")
|
|
94
94
|
begin
|
|
95
95
|
elem.empty? ? nil : elem.xpath('div[@class="gsc_value"]').text
|
|
96
96
|
rescue => e
|
data/spec/publication_spec.rb
CHANGED
|
@@ -78,6 +78,13 @@ describe 'Publication', 'A single publication listing' do
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
describe 'when it has keywords in its text' do
|
|
82
|
+
it 'should extract journal names containing the word "Journal"' do
|
|
83
|
+
jpub = GentleScholar::Publication.extract_from_http('6WjiSOwAAAAJ:2osOgNQ5qMEC')
|
|
84
|
+
jpub[:journal].must_equal 'International Journal of Information Management'
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
81
88
|
describe 'when it is an unpublished paper (missing attributes)' do
|
|
82
89
|
before do
|
|
83
90
|
doc = GentleScholar::Publication.text_to_document(UNPUB_PAPER)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gentle-scholar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Soumya Ray
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-09-
|
|
11
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|