rfcbib 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rfcbib/scrapper.rb +7 -1
- data/lib/rfcbib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad77029a892d6d83bf3bbe6c7f89846f5591466f879496ad52dffc0fe46247e2
|
4
|
+
data.tar.gz: 9bdcade50f7d7bf77a3dc7ec6255088affd70665e0edf3343e96994639d5c420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a024522ab6812e6dd9f2ac5723681a2edd7f028bd37d77ba2185ca5e1aea274bfeb3f9c72b231bfbdcdbd8302ee7494025b47eb73fa4846031a9835abf23c59a
|
7
|
+
data.tar.gz: 5888832d1edf7c8f8a5909f671c3a43f4e5b1c02b83d53cecfe7772d2769dc3769e86ec3a498c5cf5620966c346a5bd92f90b7a263cfe49ac98d9c8b0879a750
|
data/lib/rfcbib/scrapper.rb
CHANGED
@@ -146,6 +146,11 @@ module RfcBib
|
|
146
146
|
author[:role] || 'author'
|
147
147
|
end
|
148
148
|
|
149
|
+
def month(mo)
|
150
|
+
return mo if /^\d+$/.match mo
|
151
|
+
Date::MONTHNAMES.index(mo)
|
152
|
+
end
|
153
|
+
|
149
154
|
#
|
150
155
|
# Extract date from reference.
|
151
156
|
#
|
@@ -153,7 +158,8 @@ module RfcBib
|
|
153
158
|
#
|
154
159
|
def dates
|
155
160
|
return unless (date = @reference.at '//front/date')
|
156
|
-
d = [date[:year], date[:month],
|
161
|
+
d = [date[:year], month(date[:month]),
|
162
|
+
(date[:day] || "01")].compact.join '-'
|
157
163
|
date = Time.parse(d).strftime '%Y-%m-%d'
|
158
164
|
[IsoBibItem::BibliographicDate.new(type: 'published', on: date)]
|
159
165
|
end
|
data/lib/rfcbib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfcbib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|