theoj 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/theoj/submission.rb +6 -1
- data/lib/theoj/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21d76f6633f14e9e22090bfd9eb08ab9cd5ccb7a9d2d6fbd44faca24a25fe431
|
4
|
+
data.tar.gz: dfb1f9b6a104c863b0d44cf56c3b04b07a475819bd9c35a8efb498bec7babf95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a504520a70a9020bab23d881496a04585b305f8ca368652fd5929d762a48d64a74d09f16bd0db89216c04e084a485692f0192575e7daba3c3d54d3ca085b89f2
|
7
|
+
data.tar.gz: 6a3d7e059fe578e4c5b3ecb6a0b325a8136de07df7684fc3b4a82c6c538d7eedf1de9f265bb16742f4ad7f76747921fcd06efc48e035e63272c67c92a305aaf9
|
data/CHANGELOG.md
CHANGED
data/lib/theoj/submission.rb
CHANGED
@@ -2,6 +2,7 @@ require "json"
|
|
2
2
|
require "date"
|
3
3
|
require "base64"
|
4
4
|
require "faraday"
|
5
|
+
require "commonmarker"
|
5
6
|
|
6
7
|
module Theoj
|
7
8
|
class Submission
|
@@ -96,7 +97,7 @@ module Theoj
|
|
96
97
|
|
97
98
|
def all_metadata
|
98
99
|
metadata = {
|
99
|
-
title: paper.title,
|
100
|
+
title: plaintext(paper.title),
|
100
101
|
tags: paper.tags,
|
101
102
|
languages: paper.languages,
|
102
103
|
authors: paper.authors.collect { |a| a.to_h },
|
@@ -184,6 +185,10 @@ module Theoj
|
|
184
185
|
"#{metadata[:citation_author]}, (#{metadata[:year]}). #{metadata[:title]}. #{metadata[:journal_name]}, #{metadata[:volume]}(#{metadata[:issue]}), #{metadata[:review_issue_id]}, https://doi.org/#{metadata[:doi]}"
|
185
186
|
end
|
186
187
|
|
188
|
+
def plaintext(t)
|
189
|
+
CommonMarker.render_doc(t, :DEFAULT).to_plaintext.strip.gsub(" ", " ")
|
190
|
+
end
|
191
|
+
|
187
192
|
def format_date(date_string)
|
188
193
|
Date.parse(date_string.to_s).strftime("%Y-%m-%d")
|
189
194
|
rescue Date::Error
|
data/lib/theoj/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theoj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juanjo Bazán
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.5.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday-retry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: openjournals-nameable
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: 1.5.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: commonmarker
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.23'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.23'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rake
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|