bibtex-ruby 5.0.0 → 5.0.1

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
  SHA256:
3
- metadata.gz: 1f116d02973cd3647ce69ab85bee28bfa5a361cb8eadc006905c4688839895b8
4
- data.tar.gz: 8770d47027cf981318066773c7f7656317e69c3e47c81422429e38b830ac5ce3
3
+ metadata.gz: d8b87649ab1cf5fb6c463ac3d0bfbc38d52063b0bbb5b9e46cb653e29edd697a
4
+ data.tar.gz: 0d08d2dcb18309792bcd1ca37918de1e212201a548c3591eab381e2aa65c1d10
5
5
  SHA512:
6
- metadata.gz: d5123a130e935e4710b6d907e9af2a9fe8e6e56f836ffd41acebc546faad2bd9f448508da7286d403f1ee5276737065fb85718609b680f32095dfa5ef6fdea43
7
- data.tar.gz: c088b05105b9371a0578ebb7502518b974103168b59bcb9d3172c1a166b9f63e100eedf003aaf1d2772086e8c00df9581555f98c5f38913a006f4a2c7e45528d
6
+ metadata.gz: 3646b9ab287939c2644a77614558b83d367806491782e973e6763e3172fcaa77a5cadfe001860ab5293c9f09ee742d25207efbd1a6bad8a7b5f59ae27f5ee863
7
+ data.tar.gz: ad1a67151f49f0112b95178b2a1f920b7163ab4a2aefddc77494df2d552cb1a038dda58ef9c14955077fa2c1aa83f2fdeabbece54adbccf8d9fd9d2e6f16b5d8
data/Gemfile CHANGED
@@ -1,36 +1,21 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'json', '~>1.8', platforms: %i[mri_18 jruby rbx]
4
+ gem 'json', '~>1.8', platforms: %i[mri_18 jruby]
5
5
 
6
- if RUBY_VERSION >= '2.0'
7
- gem 'rdf', '~>2.0.0'
8
- gem 'rdf-vocab', '~>2.0.0'
9
- else
10
- gem 'rdf', '~>1.1'
11
- end
12
-
13
- gem 'rubysl', '~>2.0', platforms: :rbx
6
+ gem 'rdf', '~>2.0.0'
7
+ gem 'rdf-vocab', '~>2.0.0'
14
8
 
15
9
  group :debug do
16
- if RUBY_VERSION >= '2.0'
17
- gem 'byebug', require: false, platforms: :mri
18
- else
19
- gem 'debugger', require: false, platforms: :mri
20
- end
21
-
10
+ gem 'byebug', require: false, platforms: :mri
22
11
  gem 'ruby-debug', require: false, platforms: :jruby
23
-
24
- gem 'rubinius-compiler', require: false, platforms: :rbx
25
- gem 'rubinius-debugger', require: false, platforms: :rbx
26
12
  end
27
13
 
28
14
  group :test do
29
15
  gem 'cucumber', '~>1.3'
30
16
  gem 'minitest', '~>4.7', require: false
31
17
  gem 'minitest-ansi'
32
- gem 'rubysl-test-unit', '~>2.0', platforms: :rbx
33
- gem 'unicode', '~>0.4', platforms: %i[rbx mswin mingw mri]
18
+ gem 'unicode', '~>0.4', platforms: %i[mswin mingw mri]
34
19
  end
35
20
 
36
21
  group :extra do
@@ -48,7 +33,6 @@ end
48
33
 
49
34
  group :coverage do
50
35
  gem 'coveralls', '~>0.7', require: false
51
- gem 'rubinius-coverage', require: false, platforms: :rbx
52
36
  gem 'simplecov', '~>0.8', require: false, platforms: [:ruby]
53
37
  end
54
38
 
@@ -58,8 +42,3 @@ group :development do
58
42
  gem 'rubocop', '~> 0.71.0', require: false
59
43
  gem 'yard'
60
44
  end
61
-
62
- group :travis do
63
- # Gem is required at runtime for RBX!
64
- gem 'racc', platforms: [:ruby]
65
- end
@@ -31,8 +31,6 @@ Gem::Specification.new do |s|
31
31
  s.test_files = Dir.glob('test/**/test*.rb')
32
32
  s.executables = []
33
33
  s.require_path = 'lib'
34
-
35
- s.has_rdoc = 'yard'
36
34
  end
37
35
 
38
36
  # vim: syntax=ruby
@@ -6,11 +6,7 @@ rescue LoadError
6
6
  end
7
7
 
8
8
  begin
9
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
10
- require 'rubinius-debugger'
11
- else
12
- require 'debugger'
13
- end
9
+ require 'debugger'
14
10
  rescue LoadError
15
11
  # ignore
16
12
  end
@@ -197,7 +197,7 @@ module BibTeX
197
197
  private
198
198
 
199
199
  def meets_condition?(condition)
200
- property, operator, value = condition.split(%r{\s*([!~/\^<>]?=|!~)\s*})
200
+ property, operator, value = condition.split(%r{\s*([!~/^<>]?=|!~|=~|<|>)\s*})
201
201
 
202
202
  if property.nil?
203
203
  true
@@ -223,14 +223,18 @@ module BibTeX
223
223
  actual.nil? || actual.to_s != value
224
224
  when '^='
225
225
  !actual.nil? && actual.to_s.match("^#{value}")
226
- when '~='
226
+ when '~=', '=~'
227
227
  !actual.nil? && actual.to_s.match(value)
228
228
  when '!~'
229
229
  actual.nil? || !actual.to_s.match(value)
230
- when '<='
231
- !actual.nil? && actual.to_i <= value.to_i
232
- when '>='
233
- !actual.nil? && actual.to_i >= value.to_i
230
+ when '<=', '>=', '<', '>'
231
+ if actual.nil?
232
+ false
233
+ elsif actual =~ /^\d+$/ && value.to_s =~ /^\d+$/
234
+ actual.to_i.send operator, value.to_i
235
+ else
236
+ actual.send operator, value.to_s
237
+ end
234
238
  else
235
239
  !actual.nil? && actual.to_s == value
236
240
  end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.14
3
+ # This file is automatically generated by Racc 1.4.15
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -207,21 +207,21 @@ racc_action_default = [
207
207
 
208
208
  racc_goto_table = [
209
209
  9, 10, 21, 19, 30, 31, 27, 3, 44, 7,
210
- 12, 22, 1, 59, 36, 30, 55, 38, 35, 2,
211
- 8, 18, 41, 11, 20, nil, nil, 30, 58, 28,
210
+ 12, 22, 1, 18, 36, 30, 55, 38, 35, 8,
211
+ 59, 2, 41, 11, 20, nil, nil, 30, 58, 28,
212
212
  nil, nil, 30, 53, nil, nil, 38, 52, nil, nil,
213
213
  39, nil, nil, 57 ]
214
214
 
215
215
  racc_goto_check = [
216
216
  6, 7, 7, 11, 14, 9, 6, 3, 12, 3,
217
- 10, 10, 1, 13, 9, 14, 12, 7, 11, 2,
218
- 4, 5, 9, 8, 8, nil, nil, 14, 12, 8,
217
+ 10, 10, 1, 5, 9, 14, 12, 7, 11, 4,
218
+ 13, 2, 9, 8, 8, nil, nil, 14, 12, 8,
219
219
  nil, nil, 14, 9, nil, nil, 7, 11, nil, nil,
220
220
  8, nil, nil, 6 ]
221
221
 
222
222
  racc_goto_pointer = [
223
- nil, 12, 19, 7, 16, 16, -4, -3, 19, -6,
224
- 6, -2, -26, -43, -6, nil ]
223
+ nil, 12, 21, 7, 15, 8, -4, -3, 19, -6,
224
+ 6, -2, -26, -36, -6, nil ]
225
225
 
226
226
  racc_goto_default = [
227
227
  nil, nil, nil, nil, nil, nil, 46, 33, nil, 13,
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 5
22
22
  MINOR = 0
23
- PATCH = 0
23
+ PATCH = 1
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
@@ -632,6 +632,26 @@ module BibTeX
632
632
  assert @e.meet? ['author ~= [a-z]*']
633
633
 
634
634
  assert @e.meet? ['author ^= P\w+']
635
+
636
+ @e.date = '2019-11-18'
637
+
638
+ assert @e.meet? ['date = 2019-11-18']
639
+ assert @e.meet? ['date >= 2019-10-18']
640
+ assert @e.meet? ['date <= 2019-12-18']
641
+ assert @e.meet? ['date > 2019-10-18']
642
+ assert @e.meet? ['date < 2019-12-18']
643
+
644
+ refute @e.meet? ['date >= 2019-12-18']
645
+ refute @e.meet? ['date <= 2019-10-18']
646
+ refute @e.meet? ['date > 2019-12-18']
647
+ refute @e.meet? ['date < 2019-10-18']
648
+ refute @e.meet? ['date > 2019-11-18']
649
+ refute @e.meet? ['date < 2019-11-18']
650
+
651
+ @e['x'] = '019'
652
+
653
+ assert @e.meet? ['x < 20']
654
+ assert @e.meet? ['x >= 19']
635
655
  end
636
656
  end
637
657
 
@@ -9,10 +9,6 @@ begin
9
9
  if RUBY_PLATFORM < 'java'
10
10
  require 'debug'
11
11
  Debugger.start
12
- elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
13
- require 'rubinius/debugger'
14
- elsif defined?(RUBY_VERSION) && RUBY_VERSION < '2.0'
15
- require 'debugger'
16
12
  else
17
13
  require 'byebug'
18
14
  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: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-12 00:00:00.000000000 Z
11
+ date: 2019-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode
@@ -144,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.7.4
147
+ rubygems_version: 3.0.6
149
148
  signing_key:
150
149
  specification_version: 4
151
150
  summary: A BibTeX parser, converter and API for Ruby.
@@ -153,7 +152,6 @@ test_files:
153
152
  - test/bibtex/entry/test_rdf_converter.rb
154
153
  - test/bibtex/test_bibliography.rb
155
154
  - test/bibtex/test_elements.rb
156
- - test/bibtex/test_entry.rb
157
155
  - test/bibtex/test_filters.rb
158
156
  - test/bibtex/test_lexer.rb
159
157
  - test/bibtex/test_name_parser.rb
@@ -162,5 +160,6 @@ test_files:
162
160
  - test/bibtex/test_string.rb
163
161
  - test/bibtex/test_utilities.rb
164
162
  - test/bibtex/test_value.rb
163
+ - test/bibtex/test_entry.rb
165
164
  - test/test_bibtex.rb
166
165
  - test/test_export.rb