bibtex-ruby 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bibtex-ruby might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/bibtex/entry.rb +1 -1
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_entry.rb +10 -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: 9de82cd417f354a88a91476f719c5e74d7a50770
|
4
|
+
data.tar.gz: 169a387d3f991820f7acd9b12f56d8419e4cd624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ae3525c8dc076d32f4bad9283dfb8a813ff182419ad98af8499057bfd5b4c2d5a42595977972ae862c8a5ad272d75e9981d186f5de16829e9faccbf8d5ccb00
|
7
|
+
data.tar.gz: dba0dc62e3b76afe70c0afe4adea9f32a6a772df365e32c21e581aa9cfcb954a78b6f114bea0df7040f37e9c152624614419a1c0f8b2df2df105b099e34f36e4
|
data/lib/bibtex/entry.rb
CHANGED
data/lib/bibtex/version.rb
CHANGED
data/test/bibtex/test_entry.rb
CHANGED
@@ -531,6 +531,8 @@ module BibTeX
|
|
531
531
|
@e2 = Entry.new(:bibtex_type => 'book', :title => 'The Raven', :editor => 'John Hopkins', :year => 1996)
|
532
532
|
@e3 = Entry.new(:bibtex_type => 'book', :author => 'Poe, Edgar A.', :title => 'The Raven', :editor => 'John Hopkins')
|
533
533
|
@e4 = Entry.new(:bibtex_type => 'book', :author => 'Poe, Edgar A.', :title => 'The Raven', :editor => 'John Hopkins', :date => '2003-09')
|
534
|
+
@e5 = Entry.new(:bibtex_type => 'book', :author => 'Poe, Edgar A.', :title => 'The Raven', :editor => 'John Hopkins', :year => 'n.d.')
|
535
|
+
@e6 = Entry.new(:bibtex_type => 'book', :author => 'Poe, Edgar A.', :title => 'The Raven', :editor => 'John Hopkins', :year => '[2009]')
|
534
536
|
}
|
535
537
|
|
536
538
|
it 'should return "unknown-a" for an empty Entry' do
|
@@ -553,9 +555,17 @@ module BibTeX
|
|
553
555
|
@e3.key.must_be :==, 'poe-a'
|
554
556
|
end
|
555
557
|
|
558
|
+
it 'skips the year if not numeric' do
|
559
|
+
@e5.key.must_be :==, 'poe-a'
|
560
|
+
end
|
561
|
+
|
556
562
|
it 'extracts the year from the date field if present' do
|
557
563
|
@e4.key.must_be :==, 'poe2003a'
|
558
564
|
end
|
565
|
+
|
566
|
+
it 'extracts the year from as a number' do
|
567
|
+
@e6.key.must_be :==, 'poe2009a'
|
568
|
+
end
|
559
569
|
end
|
560
570
|
|
561
571
|
describe 'when the entry is added to a Bibliography' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibtex-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: latex-decode
|