asciidoctor-bibliography 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 241505801324d38d708ac52fdf8c24755dd16ef5
4
- data.tar.gz: 0a7ac064f2d07b664df8ad1405a00dc6613e5533
2
+ SHA256:
3
+ metadata.gz: 0aebe410aec21707e9acf513afd0913792a76cd806cff5eb24312ab294e08c4d
4
+ data.tar.gz: fdffc4aee122f017599de6c51db1b53fd5fd9f006014dea11a420a21c3e85155
5
5
  SHA512:
6
- metadata.gz: c2f0719e9e1219b3d09073d430d498b142472dff3dda41543f8df80c6293ff65739c9c260ba95a92464d39c1d4a6ce5a140120009cdaef41fd15e422173a9855
7
- data.tar.gz: e33ccc4676b4d5087e1ac4b38573ff3d1f7cad8b5a0ed799e5060ff968795989b965c4c9087ac4769aea48f6c77fce7ab856c15a92c652711f73e67a3d48f869
6
+ metadata.gz: 210e7f614e817d141c7c7ffe92a3163a1e70a219a5bdc65e5f663ce3d1d53702bbc49ec1f51f95091b99d9e8f668f64854f980e7ce2eb4660bff031b451cfa7f
7
+ data.tar.gz: c78c2e60e930cd7b0737f9fa0e6d74314b407c641b6b7d9ade6df8e8ab10a98059f444e607305de5ada16334e9d65c9ebe12e10f6282d3efbd604561ec23fe8f
@@ -35,18 +35,16 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
35
35
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
36
36
 
37
37
  spec.add_dependency "asciidoctor", "~> 1.5.6"
38
+ spec.add_dependency "bibtex-ruby", "~> 4.4.4"
38
39
  spec.add_dependency "citeproc-ruby", "~> 1.1.7"
39
40
  spec.add_dependency "csl-styles", "~> 1.0.1"
40
41
  spec.add_dependency "latex-decode", "~> 0.2.2"
41
- spec.add_dependency "bibtex-ruby", "~> 4.4.4"
42
-
43
42
  spec.add_dependency "nokogiri", "~> 1.8.1"
44
43
 
45
- spec.add_development_dependency "bundler"
46
- spec.add_development_dependency "byebug"
47
- spec.add_development_dependency "rspec"
48
- spec.add_development_dependency "rake"
49
- spec.add_development_dependency "simplecov"
50
- spec.add_development_dependency "yard"
51
- spec.add_development_dependency "rubocop"
44
+ spec.add_development_dependency "byebug", "~> 10.0.1"
45
+ spec.add_development_dependency "rake", "~> 12.3.0"
46
+ spec.add_development_dependency "rspec", "~> 3.7.0"
47
+ spec.add_development_dependency "rubocop", "~> 0.54.0"
48
+ spec.add_development_dependency "simplecov", "~> 0.16.1"
49
+ spec.add_development_dependency "yard", "~> 0.9.12"
52
50
  end
@@ -1,3 +1,3 @@
1
1
  module AsciidoctorBibliography
2
- VERSION = "0.7.2".freeze
2
+ VERSION = "0.7.3".freeze
3
3
  end
@@ -23,8 +23,8 @@ module CiteProc
23
23
  # end
24
24
 
25
25
  def apply_vertical_align
26
- output.replace "^#{output}^" if options[:vertical_align] == "sup"
27
- output.replace "~#{output}~" if options[:vertical_align] == "sub"
26
+ output.replace "^#{output}^" if options[:"vertical-align"] == "sup"
27
+ output.replace "~#{output}~" if options[:"vertical-align"] == "sub"
28
28
  end
29
29
 
30
30
  def apply_suffix
@@ -3,11 +3,52 @@
3
3
  require "asciidoctor-bibliography"
4
4
  require_relative "../../../citation_helper"
5
5
 
6
- describe "custom :adoc citeproc format" do
7
- let(:options) { { "bibliography-style" => "ieee", "bibliography-database" => "database.bib" } }
8
6
 
9
- it "adds space between first and second field" do
10
- expect(formatted_bibliography("cite:[Gettier63]", options: options)).
11
- to eq "[1] E. L. Gettier, “Is justified true belief knowledge?,” _analysis_, vol. 23, no. 6, pp. 121–123, 1963."
7
+ describe CiteProc::Ruby::Formats::Adoc do
8
+ before { processor.import(BibTeX.open("spec/fixtures/database.bib").to_citeproc) }
9
+
10
+ context "using apa citations" do
11
+ let(:processor) { CiteProc::Processor.new(style: "apa", format: "adoc") }
12
+ let(:year) { processor.engine.style.citation.children["layout"].children[0].children[1] }
13
+ let(:rendered_citation) { processor.render(:citation, id: "Gettier63") }
14
+
15
+ describe ".apply_font_style" do
16
+ it "makes journal italic" do
17
+ year["font-style"] = "italic"
18
+ expect(rendered_citation).to eq("(Gettier, _1963_)")
19
+ end
20
+ end
21
+
22
+ describe ".apply_font_weight" do
23
+ it "makes journal bold" do
24
+ year["font-weight"] = "bold"
25
+ expect(rendered_citation).to eq("(Gettier, *1963*)")
26
+ end
27
+ end
28
+
29
+ describe ".apply_vertical_align" do
30
+ it "makes journal supscript " do
31
+ year["vertical-align"] = "sup"
32
+ expect(rendered_citation).to eq("(Gettier, ^1963^)")
33
+ end
34
+
35
+ it "makes journal subscript " do
36
+ year["vertical-align"] = "sub"
37
+ expect(rendered_citation).to eq("(Gettier, ~1963~)")
38
+ end
39
+ end
40
+ end
41
+
42
+ context "using ieee bibliography" do
43
+ let(:processor) { CiteProc::Processor.new(style: "ieee", format: "adoc") }
44
+ let(:rendered_bibliography) { processor.render(:bibliography, id: "Gettier63").first }
45
+
46
+ describe ".apply_suffix" do
47
+ before { processor.import(BibTeX.open("spec/fixtures/database.bib").to_citeproc) }
48
+ it "adds space between first and second field" do
49
+ processor.items["Gettier63"].merge("citation-number": "0")
50
+ expect(rendered_bibliography).to match(/^\[0\] E. L. Gettier/)
51
+ end
52
+ end
12
53
  end
13
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-bibliography
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-16 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -25,61 +25,61 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.5.6
27
27
  - !ruby/object:Gem::Dependency
28
- name: citeproc-ruby
28
+ name: bibtex-ruby
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.7
33
+ version: 4.4.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.7
40
+ version: 4.4.4
41
41
  - !ruby/object:Gem::Dependency
42
- name: csl-styles
42
+ name: citeproc-ruby
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.1
47
+ version: 1.1.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.1
54
+ version: 1.1.7
55
55
  - !ruby/object:Gem::Dependency
56
- name: latex-decode
56
+ name: csl-styles
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.2
61
+ version: 1.0.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.2
68
+ version: 1.0.1
69
69
  - !ruby/object:Gem::Dependency
70
- name: bibtex-ruby
70
+ name: latex-decode
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 4.4.4
75
+ version: 0.2.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 4.4.4
82
+ version: 0.2.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: nokogiri
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -95,103 +95,89 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.8.1
97
97
  - !ruby/object:Gem::Dependency
98
- name: bundler
98
+ name: byebug
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 10.0.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 10.0.1
111
111
  - !ruby/object:Gem::Dependency
112
- name: byebug
112
+ name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 12.3.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 12.3.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 3.7.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 3.7.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: rake
140
+ name: rubocop
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 0.54.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 0.54.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: 0.16.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 0.16.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: yard
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: rubocop
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
171
+ - - "~>"
186
172
  - !ruby/object:Gem::Version
187
- version: '0'
173
+ version: 0.9.12
188
174
  type: :development
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
- - - ">="
178
+ - - "~>"
193
179
  - !ruby/object:Gem::Version
194
- version: '0'
180
+ version: 0.9.12
195
181
  description: |
196
182
  asciidoctor-bibliography lets you handle citations and bibliography the "asciidoctor-way"!
197
183
 
@@ -340,8 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
326
  - !ruby/object:Gem::Version
341
327
  version: '0'
342
328
  requirements: []
343
- rubyforge_project:
344
- rubygems_version: 2.6.14
329
+ rubygems_version: 3.0.3
345
330
  signing_key:
346
331
  specification_version: 4
347
332
  summary: Citations and bibliography the "asciidoctor-way"