bibtex-ruby 4.0.12 → 4.0.13
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/value.rb +3 -3
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_entry.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb05bf37b0f9e4eadc96d0404d5ebf5ca6c46905
|
4
|
+
data.tar.gz: b3812e113a592625e5a64105b3dee8d63edcc69d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85082f87ba838a46906bfca9dbb7f4bc06ecfa08a7aff0dc892c3da904c7914bf240340ce63bb8b5ecb3758a9affe2c279ce20d352e30a33c233494d25fb7f41
|
7
|
+
data.tar.gz: c9a396ce76e4f039e32e4d1b0c6f5276e3d2d3f3a6e4f01ccf112c4cf16da438f137a25d2c69027d5a569b5f827584c7d452031ed4d8460bc4b8bd0892cc51fb
|
data/lib/bibtex/value.rb
CHANGED
@@ -166,14 +166,14 @@ module BibTeX
|
|
166
166
|
# Value.new('foo').to_s #=> "foo"
|
167
167
|
# Value.new(:foo).to_s #=> "foo"
|
168
168
|
# Value.new('foo').to_s(:quotes => '"') #=> "\"foo\""
|
169
|
+
# Value.new(:foo).to_s(:quotes => '"') #=> "foo"
|
169
170
|
# Value.new('foo').to_s(:quotes => ['"','"']) #=> "\"foo\""
|
170
171
|
# Value.new('foo').to_s(:quotes => ['{','}']) #=> "{foo}"
|
171
172
|
# Value.new(:foo, 'bar').to_s #=> "foo # \"bar\""
|
172
173
|
# Value.new('foo', 'bar').to_s #=> "\"foo\" # \"bar\""
|
173
174
|
# Value.new('\"u').to_s(:filter => :latex) #=> "ü"
|
174
175
|
#
|
175
|
-
# Returns a the Value as a string. @see #value;
|
176
|
-
# that single symbols are returned as String, too.
|
176
|
+
# Returns a the Value as a string. @see #value;
|
177
177
|
# If the Value is atomic and the option :quotes is given, the string
|
178
178
|
# will be quoted using the quote symbols specified.
|
179
179
|
#
|
@@ -181,7 +181,7 @@ module BibTeX
|
|
181
181
|
# the filter(s) specified.
|
182
182
|
def to_s(options = {})
|
183
183
|
return convert(options.delete(:filter)).to_s(options) if options.has_key?(:filter)
|
184
|
-
return value.to_s unless options.has_key?(:quotes) && atomic?
|
184
|
+
return value.to_s unless options.has_key?(:quotes) && atomic? && !symbol?
|
185
185
|
q = Array(options[:quotes])
|
186
186
|
[q[0], value, q[-1]].compact.join
|
187
187
|
end
|
data/lib/bibtex/version.rb
CHANGED
data/test/bibtex/test_entry.rb
CHANGED
@@ -178,6 +178,12 @@ module BibTeX
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
181
|
+
it 'prints parsed months as symbols' do
|
182
|
+
@entry.month = :aug
|
183
|
+
assert_match(/month = aug/, @entry.content)
|
184
|
+
assert_match(/month = aug/, @entry.to_s)
|
185
|
+
end
|
186
|
+
|
181
187
|
[[:jan,1], [:feb,2], [:sep,9]].each do |m|
|
182
188
|
it 'should convert numbers' do
|
183
189
|
@entry.month = m[1]
|
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.13
|
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-
|
11
|
+
date: 2015-05-10 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.
|
148
|
+
rubygems_version: 2.4.6
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: A BibTeX parser, converter and API for Ruby.
|