bibtex-ruby 4.0.15 → 4.0.16
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/bibliography.rb +1 -1
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_bibliography.rb +12 -3
- 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: 6763b2b25cc0a95b714e3878ce24cd2fccdab8de
|
4
|
+
data.tar.gz: d2118d74180e0cddb911a4e8e5f4e34292462098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07cc756523db9c07be8262b955705e2fe95a136694be08c076393c8607da9a3df67afde0828421dcc06bc20e93b4a38e6713d44d746d8c4a66cfd9022e5791a6
|
7
|
+
data.tar.gz: e6fa9083cadcfbc7e2f1c919e18385b8f061c6e2576a9307066bf591fd4fee7ab34816766eada8de9e8c59f67b5245de025f3ea0720ff98e23ae3f2812940d50
|
data/lib/bibtex/bibliography.rb
CHANGED
@@ -527,7 +527,7 @@ module BibTeX
|
|
527
527
|
# digest = digest[0] if digest.is_a?(Array)
|
528
528
|
|
529
529
|
digest.gsub(/\s+/, '').downcase
|
530
|
-
digest = block.call(
|
530
|
+
digest = block.call(digest, entry) unless block.nil?
|
531
531
|
digest
|
532
532
|
|
533
533
|
}.values.select { |d| d.length > 1 }
|
data/lib/bibtex/version.rb
CHANGED
@@ -288,17 +288,21 @@ module BibTeX
|
|
288
288
|
@book{b1,
|
289
289
|
title = {FOO},
|
290
290
|
year = {2013},
|
291
|
-
author = {Doe, John}
|
291
|
+
author = {Doe, John},
|
292
|
+
pages = {1-2}}
|
292
293
|
@book{b2,
|
293
294
|
title = {BAR},
|
294
295
|
year = {2013},
|
295
|
-
author = {Doe, John}
|
296
|
+
author = {Doe, John},
|
297
|
+
pages = {1-3},
|
298
|
+
}
|
296
299
|
END
|
297
300
|
@b = BibTeX.parse <<-END
|
298
301
|
@book{b3,
|
299
302
|
title = {FOO},
|
300
303
|
year = {2013},
|
301
|
-
author = {Doe,
|
304
|
+
author = {Doe, John},
|
305
|
+
pages = {1-2}}
|
302
306
|
END
|
303
307
|
end
|
304
308
|
|
@@ -311,6 +315,11 @@ module BibTeX
|
|
311
315
|
assert @a.length > @a.uniq!(:author).length
|
312
316
|
end
|
313
317
|
|
318
|
+
describe 'with block' do
|
319
|
+
it 'removes duplicate entries and returns the bibliography' do
|
320
|
+
assert @a.length > @a.uniq!(:author){|d,e| d+'|'+e.pages_from}.length
|
321
|
+
end
|
322
|
+
end
|
314
323
|
end
|
315
324
|
|
316
325
|
describe 'given a filter' 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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: latex-decode
|