bibtex-ruby 4.0.14 → 4.0.15
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 +4 -4
- data/Gemfile +8 -2
- data/lib/bibtex/elements.rb +9 -1
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_bibliography.rb +5 -2
- data/test/helper.rb +9 -3
- 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: 86137a1e1827cc8ee352d3aae5e6fd893fd5f7b6
|
4
|
+
data.tar.gz: 47e1c39fa9345b0a019d73bfa23c2d997c48feb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7234eaccbcbee6060f48e24eea3839e8d912b180066371f423ae3da3fda057eb057717be9ed7ec2a7260913ae6fb3535e560f57732db49977c19c47a92646c
|
7
|
+
data.tar.gz: 739dfad11b02764e517f035c6ed4b053d81bbac2973f1d6a08ec594947eeeb730c4fe08451bf76940304ad1a48e8e7211fd486951ee5d0370add860a13275cbf
|
data/Gemfile
CHANGED
@@ -7,8 +7,14 @@ gem 'json', '~>1.8', :platforms => [:mri_18, :jruby, :rbx]
|
|
7
7
|
gem 'rubysl', '~>2.0', :platforms => :rbx
|
8
8
|
|
9
9
|
group :debug do
|
10
|
-
|
11
|
-
|
10
|
+
if RUBY_VERSION >= '2.0'
|
11
|
+
gem 'byebug', :require => false, :platforms => :mri
|
12
|
+
else
|
13
|
+
gem 'debugger', :require => false, :platforms => :mri
|
14
|
+
end
|
15
|
+
|
16
|
+
gem 'ruby-debug', :require => false, :platforms => :jruby
|
17
|
+
|
12
18
|
gem 'rubinius-debugger', :require => false, :platforms => :rbx
|
13
19
|
gem 'rubinius-compiler', :require => false, :platforms => :rbx
|
14
20
|
end
|
data/lib/bibtex/elements.rb
CHANGED
@@ -199,7 +199,15 @@ module BibTeX
|
|
199
199
|
if operator.nil? && value.nil?
|
200
200
|
respond_to?(:provides?) && provides?(property)
|
201
201
|
else
|
202
|
-
|
202
|
+
|
203
|
+
# Hack: we need to get rid of #type returning the bibtex_type,
|
204
|
+
# because type is a valid BibTeX property. This mitigates the
|
205
|
+
# issue but is no fix!
|
206
|
+
if property == 'type'
|
207
|
+
actual = respond_to?(:fields) ? fields[:type] : nil
|
208
|
+
else
|
209
|
+
actual = respond_to?(property) ? send(property) : nil
|
210
|
+
end
|
203
211
|
|
204
212
|
case operator
|
205
213
|
when '!=', '/='
|
data/lib/bibtex/version.rb
CHANGED
@@ -65,7 +65,8 @@ module BibTeX
|
|
65
65
|
title={{Programming collective intelligence}},
|
66
66
|
author={Segaran, T.},
|
67
67
|
year={2007},
|
68
|
-
publisher={O'Reilly}
|
68
|
+
publisher={O'Reilly},
|
69
|
+
type={interview}
|
69
70
|
}
|
70
71
|
@string{ foo = "foobar" }
|
71
72
|
@misc{flanagan-1,
|
@@ -199,6 +200,7 @@ module BibTeX
|
|
199
200
|
|
200
201
|
it 'supports queries by type string and conditions' do
|
201
202
|
assert_equal 1, @bib['@book[keywords=ruby]'].length
|
203
|
+
assert_equal 1, @bib['@*[type=interview]'].length
|
202
204
|
end
|
203
205
|
|
204
206
|
it 'supports queries with negative conditions' do
|
@@ -232,7 +234,8 @@ module BibTeX
|
|
232
234
|
title = {{Programming collective intelligence}},
|
233
235
|
author = {Segaran, T.},
|
234
236
|
year = {2007},
|
235
|
-
publisher = {O'Reilly}
|
237
|
+
publisher = {O'Reilly},
|
238
|
+
type={interview}
|
236
239
|
}
|
237
240
|
END
|
238
241
|
assert_equal 1, @bib[entry].length
|
data/test/helper.rb
CHANGED
@@ -6,10 +6,16 @@ rescue LoadError
|
|
6
6
|
end
|
7
7
|
|
8
8
|
begin
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
case
|
10
|
+
when RUBY_PLATFORM < 'java'
|
11
|
+
require 'debug'
|
12
|
+
Debugger.start
|
13
|
+
when defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
14
|
+
require 'rubinius/debugger'
|
15
|
+
when defined?(RUBY_VERSION) && RUBY_VERSION < '2.0'
|
12
16
|
require 'debugger'
|
17
|
+
else
|
18
|
+
require 'byebug'
|
13
19
|
end
|
14
20
|
rescue LoadError
|
15
21
|
# ignore
|
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.15
|
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-10-04 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.5.1
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: A BibTeX parser, converter and API for Ruby.
|