bibtex-ruby 4.1.0 → 4.1.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.

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: 8783657ade7bf716dc5e8e8efc22cc953e65ceca
4
- data.tar.gz: 27870297854e15bb45f12055bcc7a09be62eba11
3
+ metadata.gz: 0c849b77b689aae1645cf4272e18559a1ef9c76a
4
+ data.tar.gz: 12de96d63a50e28d2ec906deddefaa673b6206aa
5
5
  SHA512:
6
- metadata.gz: f43096cd39d610a93af92eba33c2e61f4c4e869cb95b83d6477dc980d74e380b0b3fadf126647691d731d653457db36974c03c88afc74b236d7d5204016a14bd
7
- data.tar.gz: dc0570d2c762ab894efcd3700cf730c5a6fde3dc43dfca13ec9eb0915c435e26ce926e3950a7f81c9cb5eb92d7079bae7a9f2f2c4b7e64fe43da91bd10f7c835
6
+ metadata.gz: 2e0412fdc08929e177c422f48b2c711c61cb458c9beb57cba535dabb83b6de8ddb68becb4b616eca2b690c83227e6a5ec1294d26b3534e7b5f5c47f61088dcbe
7
+ data.tar.gz: 98f7d60e54b71017c8fa1993f70d31487e060df98043bf2adc17cd852c5aed4ca8158234e0ba8bc1f0e69e33021ab78659106b4e05be4c68764871f379117792
data/README.md CHANGED
@@ -397,6 +397,19 @@ The duplicate methods above, for example, do something like this:
397
397
  You can use this method, for example, to match entries only by their author's
398
398
  last name and so on and so forth.
399
399
 
400
+ Since version 4.1.0, BibTeX-ruby supports parsing of names spelled in the East Asian order (last name, then first name). Names contain a Chinese, Japanese or Korean letter are currently assumed to be such names. If the name is written in comma-separated manner, it is parsed in the normal way.
401
+
402
+ b = BibTeX.parse(<<-END)
403
+ @book{key,
404
+ title = "プログラミング言語 Ruby",
405
+ author = "David Flanagan and まつもと ゆきひろ",
406
+ translator = "卜部, 昌平 and 長尾, 高弘",
407
+ year = "2009",
408
+ publisher = "O'Reilly Japan"
409
+ }
410
+ END
411
+ [*b[0].author, *b[0].translator].map(&:last) #=> [Flanagan, まつもと, 卜部, 長尾]
412
+
400
413
  ### Filters
401
414
 
402
415
  Since version 1.3.8 BibTeX-Ruby comes with a plugin framework for input
@@ -477,19 +490,20 @@ and writes the following XML to standard out:
477
490
  <bibtex:entry id='pickaxe'>
478
491
  <bibtex:book>
479
492
  <bibtex:address>Raleigh, North Carolina</bibtex:address>
480
- <bibtex:person>
481
- <bibtex:first>Dave</bibtex:first>
482
- <bibtex:last>Thomas</bibtex:last>
483
- </bibtex:person>
484
- <bibtex:person>
485
- <bibtex:first>Chad</bibtex:first>
486
- <bibtex:last>Fowler</bibtex:last>
487
- </bibtex:person>
488
- <bibtex:person>
489
- <bibtex:first>Andy</bibtex:first>
490
- <bibtex:last>Hunt</bibtex:last>
491
- </bibtex:person>
492
- <bibtex:author/>
493
+ <bibtex:author>
494
+ <bibtex:person>
495
+ <bibtex:first>Dave</bibtex:first>
496
+ <bibtex:last>Thomas</bibtex:last>
497
+ </bibtex:person>
498
+ <bibtex:person>
499
+ <bibtex:first>Chad</bibtex:first>
500
+ <bibtex:last>Fowler</bibtex:last>
501
+ </bibtex:person>
502
+ <bibtex:person>
503
+ <bibtex:first>Andy</bibtex:first>
504
+ <bibtex:last>Hunt</bibtex:last>
505
+ </bibtex:person>
506
+ </bibtex:author>
493
507
  <bibtex:publisher>The Pragmatic Bookshelf</bibtex:publisher>
494
508
  <bibtex:title>
495
509
  Programming Ruby 1.9: The Pragmatic Programmer&apos;s Guide
@@ -25,7 +25,7 @@ class BibTeX::Entry::BibTeXMLConverter
25
25
  field = REXML::Element.new("bibtex:#{key}")
26
26
 
27
27
  if options[:extended] && value.name?
28
- value.each { |n| entry.add_element(n.to_xml) }
28
+ value.each { |n| field.add_element(n.to_xml) }
29
29
  else
30
30
  field.text = value.to_s(options)
31
31
  end
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 4
22
22
  MINOR = 1
23
- PATCH = 0
23
+ PATCH = 1
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
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.1.0
4
+ version: 4.1.1
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-12-09 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode