bibtex-ruby 2.2.0 → 2.2.1

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.

data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bibtex-ruby (2.2.0)
4
+ bibtex-ruby (2.2.1)
5
5
  latex-decode (>= 0.0.6)
6
6
  multi_json (~> 1.3)
7
7
 
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ 2.2.1 / 2013-13-01
2
+ ==================
3
+
4
+ * Fixes BibTeX/Citeproc type issue (thanks to @plessl)
5
+
1
6
  2.2.0 / 2012-12-02
2
7
  ==================
3
8
 
data/README.md CHANGED
@@ -540,7 +540,7 @@ To execute the test suite continuously while you're working run:
540
540
  Credits
541
541
  -------
542
542
 
543
- Copyright 2011-2012 [Sylvester Keil](http://sylvester.keil.or.at/).
543
+ Copyright 2011-2013 [Sylvester Keil](http://sylvester.keil.or.at/).
544
544
 
545
545
  Kudos to all [contributors](https://github.com/inukshuk/bibtex-ruby/contributors)
546
546
  who have made BibTeX-Ruby possible.
data/lib/bibtex.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # BibTeX-Ruby
3
- # Copyright (C) 2010-2012 Sylvester Keil <sylvester.keil.or.at>
3
+ # Copyright (C) 2010-2013 Sylvester Keil <sylvester.keil.or.at>
4
4
  #
5
5
  # This program is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -317,7 +317,7 @@ module BibTeX
317
317
 
318
318
  # group names together
319
319
  names.each do |name|
320
- group = groups[name.sort_order(:initials => true).gsub(/\s+/, '').downcase]
320
+ group = groups[name.sort_order(:initials => true).downcase]
321
321
  group[:names] << name
322
322
 
323
323
  if group[:prototype].nil? || group[:prototype].first.to_s.length < name.first.to_s.length
data/lib/bibtex/entry.rb CHANGED
@@ -165,7 +165,7 @@ module BibTeX
165
165
  def merge(other, filter = field_names)
166
166
  dup.merge!(other, filter)
167
167
  end
168
-
168
+
169
169
  def merge!(other, filter = field_names)
170
170
  raise InvalidArgument, "failed to merge entries: type mismatch: #{type} #{other.type}" unless
171
171
  type == other.type
@@ -177,10 +177,10 @@ module BibTeX
177
177
  add name, value.dup
178
178
  end
179
179
  end
180
-
180
+
181
181
  self
182
182
  end
183
-
183
+
184
184
  # Generate Accessors for required fields (#52)
185
185
 
186
186
  REQUIRED_FIELDS.values.flatten.uniq.each do |name|
@@ -467,11 +467,11 @@ module BibTeX
467
467
  def digest(filter = [])
468
468
  names = field_names(filter)
469
469
  digest = type.to_s
470
-
470
+
471
471
  names.zip(values_at(*names)).each do |key, value|
472
472
  digest << "|#{key}:#{value}"
473
473
  end
474
-
474
+
475
475
  digest = yield(digest, self) if block_given?
476
476
  digest
477
477
  end
@@ -690,13 +690,19 @@ module BibTeX
690
690
  parse_names
691
691
  parse_month
692
692
 
693
- hash = { 'id' => key.to_s, 'type' => CSL_TYPES[type].to_s }
693
+ hash = {}
694
694
 
695
695
  each_pair do |k,v|
696
696
  hash[CSL_FILTER[k].to_s] = v.to_citeproc(options) unless DATE_FIELDS.include?(k)
697
697
  end
698
698
 
699
+ hash['id'] = key.to_s
700
+
701
+ hash['bibtex-type'] = hash['type'] if hash.key?('type')
702
+ hash['type'] = CSL_TYPES[type].to_s
703
+
699
704
  hash['issued'] = citeproc_date
705
+
700
706
  hash
701
707
  end
702
708
 
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 2
22
22
  MINOR = 2
23
- PATCH = 0
23
+ PATCH = 1
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibtex-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-02 00:00:00.000000000 Z
12
+ date: 2013-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: latex-decode
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  segments:
164
164
  - 0
165
- hash: 3526166777560005
165
+ hash: -596806330285965397
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements:
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  segments:
173
173
  - 0
174
- hash: 3526166777560005
174
+ hash: -596806330285965397
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 1.8.24