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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86137a1e1827cc8ee352d3aae5e6fd893fd5f7b6
4
- data.tar.gz: 47e1c39fa9345b0a019d73bfa23c2d997c48feb0
3
+ metadata.gz: 6763b2b25cc0a95b714e3878ce24cd2fccdab8de
4
+ data.tar.gz: d2118d74180e0cddb911a4e8e5f4e34292462098
5
5
  SHA512:
6
- metadata.gz: 3f7234eaccbcbee6060f48e24eea3839e8d912b180066371f423ae3da3fda057eb057717be9ed7ec2a7260913ae6fb3535e560f57732db49977c19c47a92646c
7
- data.tar.gz: 739dfad11b02764e517f035c6ed4b053d81bbac2973f1d6a08ec594947eeeb730c4fe08451bf76940304ad1a48e8e7211fd486951ee5d0370add860a13275cbf
6
+ metadata.gz: 07cc756523db9c07be8262b955705e2fe95a136694be08c076393c8607da9a3df67afde0828421dcc06bc20e93b4a38e6713d44d746d8c4a66cfd9022e5791a6
7
+ data.tar.gz: e6fa9083cadcfbc7e2f1c919e18385b8f061c6e2576a9307066bf591fd4fee7ab34816766eada8de9e8c59f67b5245de025f3ea0720ff98e23ae3f2812940d50
@@ -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(disgest, entry) unless block.nil?
530
+ digest = block.call(digest, entry) unless block.nil?
531
531
  digest
532
532
 
533
533
  }.values.select { |d| d.length > 1 }
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 4
22
22
  MINOR = 0
23
- PATCH = 15
23
+ PATCH = 16
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
@@ -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, Jane}}
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.15
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-04 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode