bibtex-ruby 4.4.7 → 5.0.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.

Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +23 -24
  3. data/History.txt +4 -0
  4. data/Rakefile +23 -25
  5. data/bibtex-ruby.gemspec +1 -1
  6. data/examples/bib2html.rb +5 -6
  7. data/examples/bib2yaml.rb +2 -2
  8. data/features/step_definitions/bibtex_steps.rb +3 -6
  9. data/features/step_definitions/name_steps.rb +1 -2
  10. data/lib/bibtex.rb +11 -13
  11. data/lib/bibtex/bibliography.rb +45 -58
  12. data/lib/bibtex/compatibility.rb +3 -5
  13. data/lib/bibtex/elements.rb +49 -42
  14. data/lib/bibtex/entry.rb +80 -84
  15. data/lib/bibtex/entry/citeproc_converter.rb +47 -52
  16. data/lib/bibtex/entry/rdf_converter.rb +97 -63
  17. data/lib/bibtex/error.rb +10 -11
  18. data/lib/bibtex/extensions.rb +2 -5
  19. data/lib/bibtex/filters.rb +4 -9
  20. data/lib/bibtex/filters/latex.rb +0 -2
  21. data/lib/bibtex/filters/linebreaks.rb +0 -2
  22. data/lib/bibtex/lexer.rb +81 -81
  23. data/lib/bibtex/names.rb +24 -28
  24. data/lib/bibtex/replaceable.rb +15 -17
  25. data/lib/bibtex/utilities.rb +5 -10
  26. data/lib/bibtex/value.rb +28 -34
  27. data/lib/bibtex/version.rb +6 -6
  28. data/test/benchmark.rb +20 -22
  29. data/test/bibtex/entry/test_rdf_converter.rb +3 -5
  30. data/test/bibtex/test_bibliography.rb +22 -35
  31. data/test/bibtex/test_elements.rb +7 -15
  32. data/test/bibtex/test_entry.rb +78 -87
  33. data/test/bibtex/test_filters.rb +8 -7
  34. data/test/bibtex/test_lexer.rb +10 -13
  35. data/test/bibtex/test_name_parser.rb +6 -9
  36. data/test/bibtex/test_names.rb +50 -55
  37. data/test/bibtex/test_parser.rb +30 -34
  38. data/test/bibtex/test_string.rb +8 -9
  39. data/test/bibtex/test_utilities.rb +6 -9
  40. data/test/bibtex/test_value.rb +41 -43
  41. data/test/helper.rb +3 -6
  42. data/test/macruby.rb +12 -13
  43. data/test/profile.rb +16 -16
  44. data/test/test_bibtex.rb +10 -15
  45. data/test/test_export.rb +5 -13
  46. metadata +4 -4
data/test/test_export.rb CHANGED
@@ -4,30 +4,22 @@ require 'yaml'
4
4
 
5
5
  module BibTeX
6
6
  class TestString < Minitest::Unit::TestCase
7
-
8
- # def test_yaml_roundtrip
9
- # b1 = BibTeX.open(Test.fixtures(:bibdesk))
10
- # b2 = Bibliography.new(YAML.load(b1.to_yaml))
11
- # assert_equal b1, b2
12
- # end
13
-
14
7
  def test_yaml
15
- bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), :debug => false)
16
- yaml = YAML.load(bib.to_yaml)
8
+ bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), debug: false)
9
+ yaml = YAML.load(bib.to_yaml) # rubocop:disable Security/YAMLLoad
17
10
  refute_nil(yaml)
18
11
  assert_equal(3, yaml.length)
19
- assert_equal(%w[ dragon pickaxe rails], yaml.map { |y| y[:bibtex_key] }.sort)
12
+ assert_equal(%w[dragon pickaxe rails], yaml.map { |y| y[:bibtex_key] }.sort)
20
13
  assert_equal('{The Facets of Ruby}', yaml[0][:series])
21
14
  end
22
15
 
23
16
  def test_json
24
- bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), :debug => false)
17
+ bib = BibTeX::Bibliography.open(Test.fixtures(:bibdesk), debug: false)
25
18
  json = JSON.parse(bib.to_json)
26
19
  refute_nil(json)
27
20
  assert_equal(3, json.length)
28
- assert_equal(%w[ dragon pickaxe rails], json.map { |y| y['bibtex_key'] }.sort)
21
+ assert_equal(%w[dragon pickaxe rails], json.map { |y| y['bibtex_key'] }.sort)
29
22
  assert_equal('{The Facets of Ruby}', json[0]['series'])
30
23
  end
31
-
32
24
  end
33
25
  end
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.4.7
4
+ version: 5.0.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: 2018-06-01 00:00:00.000000000 Z
11
+ date: 2019-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode
@@ -137,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: 2.3.0
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -158,9 +158,9 @@ test_files:
158
158
  - test/bibtex/test_lexer.rb
159
159
  - test/bibtex/test_name_parser.rb
160
160
  - test/bibtex/test_names.rb
161
+ - test/bibtex/test_parser.rb
161
162
  - test/bibtex/test_string.rb
162
163
  - test/bibtex/test_utilities.rb
163
164
  - test/bibtex/test_value.rb
164
- - test/bibtex/test_parser.rb
165
165
  - test/test_bibtex.rb
166
166
  - test/test_export.rb