bibtex-ruby 4.0.6 → 4.0.7

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: 9d5b733aafa646471f5a683919625cb1fe969e1d
4
- data.tar.gz: f2e777cc78da9d8c9c106c2916a90785360178d1
3
+ metadata.gz: c7a917862a039a5641b35b371a597ebea9141d47
4
+ data.tar.gz: 2a30a1a920629248546abd01669efe45444fc432
5
5
  SHA512:
6
- metadata.gz: b9235810a5401f17113735d515d2075fcd37804d091f25200305f1d46ead7638dbdc8f3d561ba7a4eaba32fc3a197ce4bae129e19e2556d9679c499bb0665425
7
- data.tar.gz: bb94548f6252a395bdc2ad7d53e74be60232287029f880a2aec7e2db3aa4f01f80fb531af0607d7052c5e173055f6d40fb3edd83e796c6ce5771954b1f643d6f
6
+ metadata.gz: a489427d5cd6f669fc5d6786645eb0aa35bd7623ee43feab48e23ccc74e1654339e7fe99d77ff585612de64ee5eb8de99d406d8acdde5a78cf6342dd67325ddb
7
+ data.tar.gz: d808da11cc305ce4ba79f48de8fe7ddf5e66d5164fc6b34cf07b6f7c0ce848bca0cdfeade47e70db7102ed38de84500bbf88655cf61675110ff86296bb81fff9
data/History.txt CHANGED
@@ -1,4 +1,4 @@
1
- 4.0.6 / 2015-01-12
1
+ 4.0.7 / 2015-01-12
2
2
  ==================
3
3
  * Ruby 2.2 support
4
4
  * Added Entry#month_numeric
data/lib/bibtex/entry.rb CHANGED
@@ -482,7 +482,9 @@ module BibTeX
482
482
  end
483
483
 
484
484
  def month=(month)
485
- fields[:month] = MONTHS_FILTER[month]
485
+ fields[:month] = month
486
+ ensure
487
+ parse_month
486
488
  end
487
489
 
488
490
  def month_numeric
@@ -493,7 +495,14 @@ module BibTeX
493
495
  end
494
496
 
495
497
  def parse_month
496
- fields[:month] = MONTHS_FILTER[fields[:month]] if has_field?(:month)
498
+ fields.delete(:month_numeric)
499
+ return unless has_field?(:month)
500
+
501
+ fields[:month] = MONTHS_FILTER[fields[:month]]
502
+
503
+ numeric = MONTHS.index(fields[:month].to_sym)
504
+ fields[:month_numeric] = Value.new(numeric.succ) if numeric
505
+
497
506
  self
498
507
  end
499
508
 
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 4
22
22
  MINOR = 0
23
- PATCH = 6
23
+ PATCH = 7
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: 4.0.6
4
+ version: 4.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil