bibtex-ruby 4.0.13 → 4.0.14

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: fb05bf37b0f9e4eadc96d0404d5ebf5ca6c46905
4
- data.tar.gz: b3812e113a592625e5a64105b3dee8d63edcc69d
3
+ metadata.gz: 42b1b49cba84e92eadd848953ae3a0ab9a00b560
4
+ data.tar.gz: 499dd1a7ff7a5802b901c7f7abc1b36f39976160
5
5
  SHA512:
6
- metadata.gz: 85082f87ba838a46906bfca9dbb7f4bc06ecfa08a7aff0dc892c3da904c7914bf240340ce63bb8b5ecb3758a9affe2c279ce20d352e30a33c233494d25fb7f41
7
- data.tar.gz: c9a396ce76e4f039e32e4d1b0c6f5276e3d2d3f3a6e4f01ccf112c4cf16da438f137a25d2c69027d5a569b5f827584c7d452031ed4d8460bc4b8bd0892cc51fb
6
+ metadata.gz: 8e880db605c9d1911febd478ecc9302c85e3922f251c5dcb3259180964db418012618f5c2f421630e01684017159ddc0a8b92339551b99743266dfba711775a5
7
+ data.tar.gz: f4f208069de8b1f912239b17f9476a41349b0207fcbfaaad1a1a09f85818dbc8fe9bd788f8ee5bcfc37d0e797c572b68e89e57c86049e9079000b643ae4f19f9
data/lib/bibtex/bibtex.y CHANGED
@@ -1,17 +1,17 @@
1
1
  #--
2
2
  # BibTeX-Ruby
3
3
  # Copyright (C) 2010-2011 Sylvester Keil <http://sylvester.keil.or.at>
4
- #
4
+ #
5
5
  # This program is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
7
7
  # the Free Software Foundation, either version 3 of the License, or
8
8
  # (at your option) any later version.
9
- #
9
+ #
10
10
  # This program is distributed in the hope that it will be useful,
11
11
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
  # GNU General Public License for more details.
14
- #
14
+ #
15
15
  # You should have received a copy of the GNU General Public License
16
16
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
  #++
@@ -46,10 +46,10 @@ rule
46
46
  | entry { result = val[0] }
47
47
 
48
48
  comment : COMMENT LBRACE content RBRACE { result = BibTeX::Comment.new(val[2]) }
49
-
49
+
50
50
  content : /* empty */ { result = '' }
51
51
  | CONTENT { result = val[0] }
52
-
52
+
53
53
  preamble : PREAMBLE LBRACE string_value RBRACE { result = BibTeX::Preamble.new(val[2]) }
54
54
 
55
55
  string : STRING LBRACE string_assignment RBRACE { result = BibTeX::String.new(val[2][0],val[2][1]); }
@@ -71,7 +71,7 @@ rule
71
71
 
72
72
  opt_key : { missing_key }
73
73
  | KEY
74
-
74
+
75
75
  assignments : assignment { result = val[0] }
76
76
  | assignments COMMA assignment { result.merge!(val[2]) }
77
77
 
@@ -88,48 +88,48 @@ require 'bibtex/lexer'
88
88
  ---- inner
89
89
 
90
90
  attr_reader :lexer, :options
91
-
91
+
92
92
  @defaults = {
93
93
  :include => [:errors],
94
94
  :allow_missing_keys => false,
95
95
  :debug => false
96
96
  }.freeze
97
-
97
+
98
98
  class << self
99
99
  attr_reader :defaults
100
100
  end
101
-
101
+
102
102
  def initialize(options = {})
103
103
  @options = Parser.defaults.merge(options)
104
104
  @lexer = Lexer.new(@options)
105
105
  end
106
106
 
107
107
  def parse(input)
108
- @yydebug = debug?
108
+ @yydebug = debug?
109
109
 
110
- lexer.analyse(input)
110
+ lexer.analyse(input)
111
111
  do_parse
112
112
  #yyparse(@lexer,:each)
113
113
  end
114
-
114
+
115
115
  def next_token
116
116
  lexer.next_token
117
117
  end
118
-
118
+
119
119
  def debug?
120
120
  options[:debug] || ENV['DEBUG']
121
121
  end
122
-
122
+
123
123
  def allow_missing_keys?
124
124
  options[:allow_missing_keys]
125
125
  end
126
-
126
+
127
127
  def missing_key
128
128
  unless allow_missing_keys?
129
129
  raise ParseError, "Failed to parse BibTeX entry: cite-key missing"
130
130
  end
131
131
  end
132
-
132
+
133
133
  def on_error(tid, val, vstack)
134
134
  message =
135
135
  "Failed to parse BibTeX on value #{val.inspect} (#{token_to_str(tid) || '?'}) #{ vstack.inspect}"
@@ -4,6 +4,7 @@ class BibTeX::Entry::CiteProcConverter
4
4
  isbn ISBN
5
5
  booktitle container-title
6
6
  journal container-title
7
+ journaltitle container-title
7
8
  series collection-title
8
9
  address publisher-place
9
10
  pages page
@@ -92,7 +93,7 @@ class BibTeX::Entry::CiteProcConverter
92
93
  end
93
94
 
94
95
  def techreport
95
- return unless bibtex.type == :techreport
96
+ return unless [:techreport, :report].include?(bibtex.type)
96
97
  hash['number'] = bibtex[:number].to_s if bibtex.field? :number
97
98
  end
98
99
 
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 4
22
22
  MINOR = 0
23
- PATCH = 13
23
+ PATCH = 14
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.0.13
4
+ version: 4.0.14
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-05-10 00:00:00.000000000 Z
11
+ date: 2015-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.4.6
148
+ rubygems_version: 2.4.7
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: A BibTeX parser, converter and API for Ruby.