bibtex-ruby 3.0.1 → 3.1.0
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/Gemfile +29 -17
- data/History.txt +5 -0
- data/Manifest +8 -0
- data/README.md +33 -31
- data/bibtex-ruby.gemspec +2 -3
- data/features/issues/non_ascii_default_keys.feature +3 -3
- data/features/support/env.rb +12 -10
- data/lib/bibtex.rb +14 -4
- data/lib/bibtex/bibliography.rb +10 -12
- data/lib/bibtex/bibliography/rdf_converter.rb +27 -0
- data/lib/bibtex/compatibility.rb +1 -1
- data/lib/bibtex/elements.rb +2 -2
- data/lib/bibtex/entry.rb +9 -233
- data/lib/bibtex/entry/bibtexml_converter.rb +44 -0
- data/lib/bibtex/entry/citeproc_converter.rb +110 -0
- data/lib/bibtex/entry/rdf_converter.rb +543 -0
- data/lib/bibtex/lexer.rb +1 -1
- data/lib/bibtex/names.rb +2 -2
- data/lib/bibtex/value.rb +1 -1
- data/lib/bibtex/version.rb +7 -7
- data/test/bibtex/entry/test_rdf_converter.rb +317 -0
- data/test/bibtex/test_bibliography.rb +1 -1
- data/test/bibtex/test_entry.rb +2 -1
- data/test/bibtex/test_names.rb +1 -1
- data/test/bibtex/test_utilities.rb +8 -8
- data/test/helper.rb +16 -8
- data/test/test_bibtex.rb +1 -1
- data/test/test_export.rb +5 -5
- metadata +20 -28
data/test/helper.rb
CHANGED
@@ -1,28 +1,36 @@
|
|
1
1
|
begin
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
require 'simplecov'
|
3
|
+
rescue LoadError
|
4
|
+
# ignore
|
5
|
+
end
|
6
|
+
|
7
|
+
begin
|
8
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
9
|
+
require 'rubinius-debugger'
|
5
10
|
else
|
6
|
-
|
7
|
-
end
|
11
|
+
require 'debugger'
|
12
|
+
end
|
8
13
|
rescue LoadError
|
9
14
|
# ignore
|
10
15
|
end
|
11
16
|
|
12
17
|
require 'minitest/autorun'
|
13
|
-
require 'minitest/
|
18
|
+
require 'minitest/ansi'
|
19
|
+
|
20
|
+
Minitest::ANSI.use!
|
21
|
+
|
14
22
|
require 'tempfile'
|
15
23
|
|
16
24
|
require 'bibtex'
|
17
25
|
|
18
26
|
module BibTeX
|
19
27
|
module Test
|
20
|
-
|
28
|
+
|
21
29
|
class << self
|
22
30
|
def fixtures(name)
|
23
31
|
File.expand_path("../fixtures/#{name}.bib", __FILE__)
|
24
32
|
end
|
25
33
|
end
|
26
|
-
|
34
|
+
|
27
35
|
end
|
28
36
|
end
|
data/test/test_bibtex.rb
CHANGED
data/test/test_export.rb
CHANGED
@@ -10,7 +10,7 @@ module BibTeX
|
|
10
10
|
# b2 = Bibliography.new(YAML.load(b1.to_yaml))
|
11
11
|
# assert_equal b1, b2
|
12
12
|
# end
|
13
|
-
|
13
|
+
|
14
14
|
def test_yaml
|
15
15
|
bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), :debug => false)
|
16
16
|
yaml = YAML.load(bib.to_yaml)
|
@@ -19,15 +19,15 @@ module BibTeX
|
|
19
19
|
assert_equal(%w[ dragon pickaxe rails], yaml.map { |y| y[:key] }.sort)
|
20
20
|
assert_equal('{The Facets of Ruby}', yaml[0][:series])
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def test_json
|
24
24
|
bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), :debug => false)
|
25
|
-
json =
|
25
|
+
json = JSON.parse(bib.to_json)
|
26
26
|
refute_nil(json)
|
27
27
|
assert_equal(3, json.length)
|
28
28
|
assert_equal(%w[ dragon pickaxe rails], json.map { |y| y['key'] }.sort)
|
29
29
|
assert_equal('{The Facets of Ruby}', json[0]['series'])
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibtex-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: latex-decode
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.0.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.0.6
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: multi_json
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.3'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.3'
|
41
27
|
description: |
|
42
28
|
BibTeX-Ruby is the Rubyist's swiss-army-knife for all things BibTeX. It
|
43
29
|
includes a parser for all common BibTeX objects (@string, @preamble,
|
@@ -88,10 +74,14 @@ files:
|
|
88
74
|
- features/support/env.rb
|
89
75
|
- lib/bibtex.rb
|
90
76
|
- lib/bibtex/bibliography.rb
|
77
|
+
- lib/bibtex/bibliography/rdf_converter.rb
|
91
78
|
- lib/bibtex/bibtex.y
|
92
79
|
- lib/bibtex/compatibility.rb
|
93
80
|
- lib/bibtex/elements.rb
|
94
81
|
- lib/bibtex/entry.rb
|
82
|
+
- lib/bibtex/entry/bibtexml_converter.rb
|
83
|
+
- lib/bibtex/entry/citeproc_converter.rb
|
84
|
+
- lib/bibtex/entry/rdf_converter.rb
|
95
85
|
- lib/bibtex/error.rb
|
96
86
|
- lib/bibtex/extensions.rb
|
97
87
|
- lib/bibtex/filters.rb
|
@@ -108,6 +98,7 @@ files:
|
|
108
98
|
- lib/bibtex/value.rb
|
109
99
|
- lib/bibtex/version.rb
|
110
100
|
- test/benchmark.rb
|
101
|
+
- test/bibtex/entry/test_rdf_converter.rb
|
111
102
|
- test/bibtex/test_bibliography.rb
|
112
103
|
- test/bibtex/test_elements.rb
|
113
104
|
- test/bibtex/test_entry.rb
|
@@ -144,32 +135,33 @@ require_paths:
|
|
144
135
|
- lib
|
145
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
137
|
requirements:
|
147
|
-
- -
|
138
|
+
- - ">="
|
148
139
|
- !ruby/object:Gem::Version
|
149
140
|
version: '0'
|
150
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
142
|
requirements:
|
152
|
-
- -
|
143
|
+
- - ">="
|
153
144
|
- !ruby/object:Gem::Version
|
154
145
|
version: '0'
|
155
146
|
requirements: []
|
156
147
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.2.1
|
158
149
|
signing_key:
|
159
150
|
specification_version: 4
|
160
151
|
summary: A BibTeX parser, converter and API for Ruby.
|
161
152
|
test_files:
|
162
|
-
- test/bibtex/
|
163
|
-
- test/bibtex/test_elements.rb
|
164
|
-
- test/bibtex/test_entry.rb
|
165
|
-
- test/bibtex/test_filters.rb
|
153
|
+
- test/bibtex/test_value.rb
|
166
154
|
- test/bibtex/test_lexer.rb
|
167
|
-
- test/bibtex/test_name_parser.rb
|
168
155
|
- test/bibtex/test_names.rb
|
169
156
|
- test/bibtex/test_parser.rb
|
170
|
-
- test/bibtex/
|
157
|
+
- test/bibtex/test_bibliography.rb
|
158
|
+
- test/bibtex/test_filters.rb
|
171
159
|
- test/bibtex/test_utilities.rb
|
172
|
-
- test/bibtex/
|
160
|
+
- test/bibtex/test_string.rb
|
161
|
+
- test/bibtex/test_entry.rb
|
162
|
+
- test/bibtex/test_name_parser.rb
|
163
|
+
- test/bibtex/test_elements.rb
|
164
|
+
- test/bibtex/entry/test_rdf_converter.rb
|
173
165
|
- test/test_bibtex.rb
|
174
166
|
- test/test_export.rb
|
175
167
|
has_rdoc: yard
|