bibtex-ruby 3.1.3 → 3.1.4

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 776c0bde07264d1b4f928d73c70575ccda925aeb
4
- data.tar.gz: 87529a9bf231b57e3cbd6f63c1f96de3ad8bc1f7
3
+ metadata.gz: 317de5c4dd2012e6f142328bbb333a691947fd9b
4
+ data.tar.gz: 29835b159b2edf43445c70bec6798f0fddc234c8
5
5
  SHA512:
6
- metadata.gz: f0cdb11eba57bd1ddf8509a9f92c2e4bbdaa448ad0f8164b54990e70951d84693a233a61a2e200c9dcc8d4eb8f42b48e2efa52789fcd55ce75aa2635e8bf9eab
7
- data.tar.gz: 49f8e36b32eb635b1c7a5367942378b802b7ce66aa004b2c69a491285afcec9fd9e6aa4d74afcc39cb9d938ee3659fd90450d327ab982b12b34427930bdc3bd6
6
+ metadata.gz: d20eef168fa79d500bb09fc1851eea6db8b110e7d74d0c1590e9639d166f767ec566e664142f588b6ddaec80f8c4968a1b2d5e6641d198205655288a85197092
7
+ data.tar.gz: 99c2fc3003f9c4629a7a7ecee5b04ae3416b6cd294c3f31093876565405b5982966a779561c1c03ac17ae815ba66fbeb6ad13bb4cde83727af958276b7cafda4
data/Guardfile CHANGED
@@ -8,8 +8,10 @@ guard 'cucumber' do
8
8
  end
9
9
 
10
10
  guard 'minitest' do
11
+ ignore(%r|swp$|)
12
+
11
13
  # with Minitest::Unit
12
- watch(%r|^test/(.*)\/?test_(.*)\.rb|)
14
+ watch(%r|^test/(.*)/?test_(.*)\.rb|)
13
15
  watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
14
16
  watch(%r|^test/helper\.rb|) { 'test' }
15
17
 
@@ -1,3 +1,9 @@
1
+ 3.1.4 / 2014-03-15
2
+ ==================
3
+
4
+ * Add more name fields
5
+ * Improve CiteProc export
6
+
1
7
  3.1.3 / 2014-02-10
2
8
  ==================
3
9
 
@@ -49,7 +49,7 @@ module BibTeX
49
49
  }.freeze
50
50
 
51
51
 
52
- NAME_FIELDS = [:author,:editor,:translator].freeze
52
+ NAME_FIELDS = [:author,:editor,:translator,:director,:producer,:composer].freeze
53
53
  DATE_FIELDS = [:year,:month].freeze
54
54
 
55
55
  MONTHS = [:jan,:feb,:mar,:apr,:may,:jun,:jul,:aug,:sep,:oct,:nov,:dec].freeze
@@ -109,6 +109,14 @@ module BibTeX
109
109
  self
110
110
  end
111
111
 
112
+ def update(fields)
113
+ fields.each do |name, value|
114
+ add name, value
115
+ end
116
+
117
+ self
118
+ end
119
+
112
120
  # Generate accessors for required fields (#52)
113
121
  REQUIRED_FIELDS.values.flatten.uniq.each do |name|
114
122
  define_method(name) do
@@ -105,6 +105,10 @@ class BibTeX::Entry::CiteProcConverter
105
105
  if bibtex.field?(:month)
106
106
  parts.push BibTeX::Entry::MONTHS.find_index(bibtex[:month].to_s.intern)
107
107
  parts[1] = parts[1] + 1 unless parts[1].nil?
108
+
109
+ if bibtex.field?(:day)
110
+ parts.push bibtex[:day]
111
+ end
108
112
  end
109
113
 
110
114
  hash['issued'] = { 'date-parts' => [parts.compact.map(&:to_i)] }
@@ -20,7 +20,7 @@ module BibTeX
20
20
  module Version
21
21
  MAJOR = 3
22
22
  MINOR = 1
23
- PATCH = 3
23
+ PATCH = 4
24
24
  BUILD = nil
25
25
 
26
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').freeze
@@ -321,6 +321,11 @@ module BibTeX
321
321
  e = @entry.to_citeproc
322
322
  assert_equal({ 'literal' => 'Test' }, e['issued'])
323
323
  end
324
+
325
+ it 'combines year, month and day in issued date' do
326
+ @entry.update :year => 2005, :month => 5, :day => 31
327
+ assert_equal [[2005, 5, 31]], @entry.to_citeproc['issued']['date-parts']
328
+ end
324
329
  end
325
330
 
326
331
  describe 'given a filter object or a filter name' do
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: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-10 00:00:00.000000000 Z
11
+ date: 2014-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: latex-decode
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.2.1
148
+ rubygems_version: 2.2.2
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: A BibTeX parser, converter and API for Ruby.