anystyle-parser 0.6.10 → 0.6.11
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.
- checksums.yaml +4 -4
- data/anystyle-parser.gemspec +1 -1
- data/lib/anystyle/parser/parser.rb +4 -1
- data/lib/anystyle/parser/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95c193f3497526c69708baf83c595f99b8fb26fa
|
|
4
|
+
data.tar.gz: bc8578742aa785fa0b16c2a0cf98f4792ac7f492
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89382cc63e90d42ad6d16c79227574acc3bfbf8de1d9a5c1467e020e8025959fb9640da518c3aad97749e3cabbfb915541bae434f84d1c3253c81830bf2aea10
|
|
7
|
+
data.tar.gz: 91f787d5766f08fe400bdf46bccb507ca7ac11ac272d53478c768b9663267b85adc749cfd3ecf2f274e3a58a7d7de9327b46a71a99ed9d4673b29bb798076301
|
data/anystyle-parser.gemspec
CHANGED
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
|
|
18
18
|
s.required_ruby_version = '>= 1.9.3'
|
|
19
19
|
|
|
20
|
-
s.add_runtime_dependency('bibtex-ruby', '~>
|
|
20
|
+
s.add_runtime_dependency('bibtex-ruby', '~>4.0')
|
|
21
21
|
s.add_runtime_dependency('builder', '>=3.0', '<4.0')
|
|
22
22
|
s.add_runtime_dependency('wapiti', '~>0.1')
|
|
23
23
|
s.add_runtime_dependency('namae', '~>0.9')
|
|
@@ -259,11 +259,14 @@ module Anystyle
|
|
|
259
259
|
def format_bibtex(labels)
|
|
260
260
|
b = BibTeX::Bibliography.new
|
|
261
261
|
format_normalized(labels).each do |hash|
|
|
262
|
+
hash[:bibtex_type] = hash.delete :type
|
|
263
|
+
|
|
264
|
+
hash[:type] = hash.delete :genre if hash.key?(:genre)
|
|
262
265
|
hash[:address] = hash.delete :location if hash.key?(:location)
|
|
263
266
|
hash[:urldate] = hash.delete :accessed if hash.key?(:accessed)
|
|
264
267
|
|
|
265
268
|
if hash.key?(:authority)
|
|
266
|
-
if [:techreport,:thesis].include?(hash[:
|
|
269
|
+
if [:techreport,:thesis].include?(hash[:bibtex_type])
|
|
267
270
|
hash[:institution] = hash.delete :authority
|
|
268
271
|
else
|
|
269
272
|
hash[:organization] = hash.delete :authority
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anystyle-parser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sylvester Keil
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '4.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ~>
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '4.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: builder
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|