bibtex-ruby 2.3.2 → 2.3.3

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
  SHA1:
3
- metadata.gz: 13f5a6e49da0980f96a20784a742f01ae4fafe4b
4
- data.tar.gz: baa4de1ff88bb81052315b43c5aa33a9648a913e
3
+ metadata.gz: 931aa894b951ef65ed67c281d1e27cb72edc4c88
4
+ data.tar.gz: 252445f34c09dcced26ab3ea44bd58468f5eb92a
5
5
  SHA512:
6
- metadata.gz: d5b4d2995d894866934d33d8f50a54d76b07af12b8bdf31d3dabca259bc31d161c898632c97f1a9e14dd0324f7434ff5f5abe368084fd6b7343ce6d09387f40c
7
- data.tar.gz: e6dbfa8a60924376cef6311590fd4b0db448cbd7fa31612ce6ad20ab2848d4746df0e26e979c8f6f49653e87d70bb54403c1d0ef8b90809ae3be6ab1c30f0d8e
6
+ metadata.gz: 43b2c3ef955acf21dc10bc70e885adc32f185f5b864620ae3db71203b8c5daee21e19c3b1105e55e4a57297bfc148548dc6b662d126ecea741a9fd09a240a520
7
+ data.tar.gz: c82a84bee43eb3172a2f8090fffdd39c3d388b1afee759ad9bb943256546c8ccf01bce21818d218906c5813eb3ef4cb2c30ad760eee944b316dca87b55c91d34
data/Gemfile CHANGED
@@ -20,7 +20,7 @@ group :extra do
20
20
  gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
21
21
  gem 'guard-minitest'
22
22
  gem 'guard-cucumber'
23
- gem 'redcarpet'
23
+ gem 'redcarpet', :platforms => [:rbx, :mri_20, :mri_19]
24
24
  end
25
25
 
26
26
  group :profile do
@@ -1,35 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bibtex-ruby (2.3.2)
4
+ bibtex-ruby (2.3.3)
5
5
  latex-decode (>= 0.0.6)
6
6
  multi_json (~> 1.3)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.3.4)
11
+ addressable (2.3.5)
12
12
  builder (3.2.2)
13
13
  coderay (1.0.9)
14
14
  columnize (0.3.6)
15
- cucumber (1.3.2)
15
+ cucumber (1.3.5)
16
16
  builder (>= 2.1.2)
17
17
  diff-lcs (>= 1.1.3)
18
18
  gherkin (~> 2.12.0)
19
- multi_json (~> 1.3)
20
- debugger (1.6.0)
19
+ multi_json (~> 1.7.5)
20
+ multi_test (>= 0.0.2)
21
+ debugger (1.6.1)
21
22
  columnize (>= 0.3.1)
22
23
  debugger-linecache (~> 1.2.0)
23
- debugger-ruby_core_source (~> 1.2.1)
24
+ debugger-ruby_core_source (~> 1.2.3)
24
25
  debugger-linecache (1.2.0)
25
- debugger-ruby_core_source (1.2.2)
26
+ debugger-ruby_core_source (1.2.3)
26
27
  diff-lcs (1.2.4)
27
- ffi (1.8.1)
28
+ ffi (1.9.0)
28
29
  formatador (0.2.4)
29
30
  gherkin (2.12.0)
30
31
  multi_json (~> 1.3)
31
32
  gnuplot (2.6.2)
32
- guard (1.8.0)
33
+ guard (1.8.1)
33
34
  formatador (>= 0.2.4)
34
35
  listen (>= 1.0.0)
35
36
  lumberjack (>= 1.0.2)
@@ -38,28 +39,30 @@ GEM
38
39
  guard-cucumber (1.4.0)
39
40
  cucumber (>= 1.2.0)
40
41
  guard (>= 1.1.0)
41
- guard-minitest (0.5.0)
42
- guard (>= 0.4)
42
+ guard-minitest (1.0.1)
43
+ guard (>= 1.8)
44
+ minitest (>= 2.1)
43
45
  latex-decode (0.1.1)
44
46
  unicode (~> 0.4)
45
47
  linecache (0.46)
46
48
  rbx-require-relative (> 0.0.4)
47
- listen (1.1.6)
49
+ listen (1.2.2)
48
50
  rb-fsevent (>= 0.9.3)
49
51
  rb-inotify (>= 0.9)
50
52
  rb-kqueue (>= 0.2)
51
- lumberjack (1.0.3)
52
- method_source (0.8.1)
53
- minitest (4.4.0)
53
+ lumberjack (1.0.4)
54
+ method_source (0.8.2)
55
+ minitest (4.7.5)
54
56
  minitest-colorize (0.0.5)
55
57
  minitest (>= 2.0)
56
- multi_json (1.7.6)
58
+ multi_json (1.7.7)
59
+ multi_test (0.0.2)
57
60
  pry (0.9.12.2)
58
61
  coderay (~> 1.0.5)
59
62
  method_source (~> 0.8)
60
63
  slop (~> 3.4)
61
64
  racc (1.4.9)
62
- rake (10.0.4)
65
+ rake (10.1.0)
63
66
  rb-fsevent (0.9.3)
64
67
  rb-inotify (0.9.0)
65
68
  ffi (>= 0.5.0)
@@ -68,7 +71,7 @@ GEM
68
71
  rbx-require-relative (0.0.9)
69
72
  rdf (0.3.11.1)
70
73
  addressable (>= 2.2.6)
71
- redcarpet (2.3.0)
74
+ redcarpet (3.0.0)
72
75
  ruby-debug (0.10.4)
73
76
  columnize (>= 0.1)
74
77
  ruby-debug-base (~> 0.10.4.0)
@@ -79,10 +82,10 @@ GEM
79
82
  multi_json (~> 1.0)
80
83
  simplecov-html (~> 0.7.1)
81
84
  simplecov-html (0.7.1)
82
- slop (3.4.5)
85
+ slop (3.4.6)
83
86
  thor (0.18.1)
84
87
  unicode (0.4.4)
85
- yard (0.8.6.1)
88
+ yard (0.8.7)
86
89
 
87
90
  PLATFORMS
88
91
  ruby
@@ -98,7 +101,6 @@ DEPENDENCIES
98
101
  minitest-colorize
99
102
  racc
100
103
  rake
101
- rb-fsevent
102
104
  rdf (~> 0.3)
103
105
  redcarpet
104
106
  ruby-debug
@@ -1,3 +1,9 @@
1
+ 2.3.3 / 2013-07-29
2
+ ==================
3
+
4
+ * Fixed #duplicates? method (thanks to @mfenner)
5
+ * Fixed issue with JSON export (thanks to @noahdesu)
6
+
1
7
  2.3.1 / 2013-07-04
2
8
  ==================
3
9
 
data/README.md CHANGED
@@ -134,7 +134,7 @@ conveniently access an entry's fields, similar to **ActiveRecord::Base**.
134
134
  Therefore, it is equally possible to access the 'author' field above as
135
135
  `b[:pickaxe].author`.
136
136
 
137
- BibTeX-Ruby wraps all values of fields in an entry are wrapped in Value
137
+ BibTeX-Ruby wraps all values of fields in an entry in Value
138
138
  objects. This is necessary to transparently handle different types of values
139
139
  (e.g., strings, dates, names etc.). These Value objects are designed to be
140
140
  hardly discernible from regular Ruby strings, however, if you ever run into a
@@ -513,6 +513,10 @@ module BibTeX
513
513
  arguments = [:year, :title] if arguments.empty?
514
514
 
515
515
  group_by(*arguments) { |digest|
516
+
517
+ # 1.8 compatibility
518
+ digest = digest[0] if digest.is_a?(Array)
519
+
516
520
  digest.gsub(/\s+/, '').downcase
517
521
  }.values.select { |d| d.length > 1 }
518
522
  end
@@ -520,7 +524,7 @@ module BibTeX
520
524
  alias duplicates select_duplicates_by
521
525
 
522
526
  def duplicates?
523
- !select_duplicates_by?.empty?
527
+ !select_duplicates_by.empty?
524
528
  end
525
529
 
526
530
 
@@ -151,6 +151,10 @@ module BibTeX
151
151
  end
152
152
 
153
153
  def to_json(options = {})
154
+ # Some JSON implementations pass an argument
155
+ # to this method.
156
+ options = {} unless options.is_a?(::Hash)
157
+
154
158
  MultiJson.dump(to_hash(options))
155
159
  end
156
160
 
@@ -20,9 +20,9 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 2
22
22
  MINOR = 3
23
- PATCH = 2
23
+ PATCH = 3
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
27
27
  end
28
- end
28
+ end
@@ -267,6 +267,18 @@ module BibTeX
267
267
 
268
268
  end
269
269
 
270
+ describe 'duplicates' do
271
+
272
+ it 'understands select_duplicates_by' do
273
+ assert_equal 1, @bib.select_duplicates_by.length
274
+ end
275
+
276
+ it 'understands duplicates?' do
277
+ assert @bib.duplicates?
278
+ end
279
+
280
+ end
281
+
270
282
  describe 'given a filter' do
271
283
  before do
272
284
  @filter = Object
@@ -1,10 +1,9 @@
1
1
  begin
2
- if RUBY_VERSION > '1.8'
2
+ if RUBY_VERSION >= '1.9'
3
3
  require 'debugger'
4
4
  require 'simplecov'
5
5
  else
6
- require 'ruby-debug'
7
- Debugger.start
6
+ # require 'debug'
8
7
  end
9
8
  rescue LoadError
10
9
  # ignore
@@ -26,4 +25,4 @@ module BibTeX
26
25
  end
27
26
 
28
27
  end
29
- end
28
+ 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: 2.3.2
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-08 00:00:00.000000000 Z
11
+ date: 2013-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode
@@ -158,17 +158,17 @@ signing_key:
158
158
  specification_version: 4
159
159
  summary: A BibTeX parser, converter and API for Ruby.
160
160
  test_files:
161
- - test/bibtex/test_bibliography.rb
162
- - test/bibtex/test_elements.rb
163
- - test/bibtex/test_entry.rb
164
- - test/bibtex/test_filters.rb
161
+ - test/bibtex/test_value.rb
165
162
  - test/bibtex/test_lexer.rb
166
- - test/bibtex/test_name_parser.rb
167
163
  - test/bibtex/test_names.rb
168
164
  - test/bibtex/test_parser.rb
169
- - test/bibtex/test_string.rb
165
+ - test/bibtex/test_bibliography.rb
166
+ - test/bibtex/test_filters.rb
170
167
  - test/bibtex/test_utilities.rb
171
- - test/bibtex/test_value.rb
168
+ - test/bibtex/test_string.rb
169
+ - test/bibtex/test_entry.rb
170
+ - test/bibtex/test_name_parser.rb
171
+ - test/bibtex/test_elements.rb
172
172
  - test/test_bibtex.rb
173
173
  - test/test_export.rb
174
174
  has_rdoc: yard