bibtex-ruby 3.1.5 → 3.1.6

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: a9c5960eac9a590e5f05b0a5527dd2ad0943d6ae
4
- data.tar.gz: adb8c68069904a0d342bfdbad92bc1f0d8525cea
3
+ metadata.gz: 817e4bd6a66bba45eefcef6103c6ece1d8a1f9df
4
+ data.tar.gz: 9b69db7b3a997f2420fbb2d79be549289631b00e
5
5
  SHA512:
6
- metadata.gz: bfb4aa621fcef9031ad62dece59b9c2efe4c506d4f20253f69e78fbc82487e7a43cae2bec14fa02fa7979ac26771b7fc78428e5da8ddfcd7de1a28fc4e54f2eb
7
- data.tar.gz: 423c6b640f45762e512bb90ee9baa00f11247cfe7a1a5b04c0aa87d148a7e47bf1805d42fab8a3bdb30ced56916e1502e6798d9fba019b33698237fda5889a8e
6
+ metadata.gz: e2b0ebcfaa88d4394471204ad951255cab24b195eb55bf70cebdd55200fc5377c651b9573e734272b736478df5069818ed37f9e8682942ab5bd953b475e4e4f8
7
+ data.tar.gz: 93d6bfa04a79ff16ffdd818bdba9271b7afb1faea41c5963b0dc1a9fbabb141361738b393712c527ddbdde83e17599c25d71f2bd3e33d007e9172a4a7fd1a647
@@ -1,3 +1,9 @@
1
+ 3.1.6 / 2014-06-17
2
+ ==================
3
+
4
+ * Allow semicolons in keys
5
+ * Bugfixes
6
+
1
7
  3.1.5 / 2014-03-25
2
8
  ==================
3
9
 
@@ -309,9 +309,10 @@ module BibTeX
309
309
  end
310
310
  end
311
311
 
312
- def respond_to?(method)
312
+ def respond_to?(method, include_all=false)
313
313
  provides?(method.to_sym) || method.to_s.match(/=$/) ||
314
- method =~ /^(?:convert|from)_([a-z]+)(!)?$/ || (has_parent? && parent.respond_to?(method)) || super
314
+ method =~ /^(?:convert|from)_([a-z]+)(!)?$/ ||
315
+ (has_parent? && parent.respond_to?(method, include_all)) || super
315
316
  end
316
317
 
317
318
  # Returns a copy of the Entry with all the field names renamed.
@@ -59,8 +59,8 @@ module BibTeX
59
59
  :string => /string/io,
60
60
  :comment => /comment\b/io,
61
61
  :preamble => /preamble\b/io,
62
- :key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+&\*-]+,/io,
63
- :optional_key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+&\*-]*,/io
62
+ :key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*-]+,/io,
63
+ :optional_key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*-]*,/io
64
64
  }.freeze
65
65
 
66
66
  MODE = Hash.new(:meta).merge({
@@ -171,6 +171,7 @@ module BibTeX
171
171
  token = token.dup.to_s
172
172
  token.gsub!(/([[:upper:]])([[:upper:]])/, '\1 \2')
173
173
  token.gsub!(/\b([[:upper:]])\b[^[:alpha:]-]*/, '\1.')
174
+ token.gsub!(/\b([[:upper:]]\.)([[:upper:]][[:lower:]]+)/, '\1 \2')
174
175
  token
175
176
  end
176
177
 
@@ -274,7 +274,7 @@ module BibTeX
274
274
  end
275
275
  end
276
276
 
277
- def respond_to? (method)
277
+ def respond_to? (method, include_all=false)
278
278
  method =~ /^(?:convert|from)_([a-z]+)(!)?$/ || super
279
279
  end
280
280
 
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 3
22
22
  MINOR = 1
23
- PATCH = 5
23
+ PATCH = 6
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
@@ -55,6 +55,13 @@ module BibTeX
55
55
  assert bib[:"foo+bar"]
56
56
  end
57
57
 
58
+ it 'allows semicolons in keys' do
59
+ input = "@Misc{Gomez;,title = {Foobar}}"
60
+ bib = Parser.new(:debug => false, :strict => false).parse(input)
61
+ assert_equal "Gomez;", bib.first.key
62
+ assert bib[:"Gomez;"]
63
+ end
64
+
58
65
  it 'fails when there is no cite-key' do
59
66
  input = "@misc{title = {Crime and Punishment}}"
60
67
  assert_raises ParseError 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: 3.1.5
4
+ version: 3.1.6
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-03-25 00:00:00.000000000 Z
11
+ date: 2014-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode