inkcite 1.1.1 → 1.1.2
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/bin/release-major +1 -0
- data/bin/release-minor +1 -0
- data/bin/release-patch +1 -0
- data/lib/inkcite/renderer/footnote.rb +4 -0
- data/lib/inkcite/version.rb +1 -1
- data/test/renderer/footnote_spec.rb +5 -5
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 182fcefd2da0130e3ae5239e44f335ddfbcf91bb
|
4
|
+
data.tar.gz: 824f616001add49b5617caec3371b50d422c113d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d9756a8f8f57101227f7bb7cda12c778dffeb62562435d655d177b6ac3ab396a97aa5bddc33864bd7c26539f942242a0f1a66c8cf75efac7b5af13ef90f87b
|
7
|
+
data.tar.gz: 9fb13a190e39c1a7d2a16012ebaf60137d4565ed50fd703f363ec8e153632d4ddd335b4786ba4921268c4943204c44cc3dd6215135659147f578e21ab65c39d2
|
data/bin/release-major
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
gem bump --version major --release
|
data/bin/release-minor
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
gem bump --version minor --release
|
data/bin/release-patch
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
gem bump --version patch --release
|
@@ -108,6 +108,10 @@ module Inkcite
|
|
108
108
|
|
109
109
|
end
|
110
110
|
|
111
|
+
# For the emailed version, append a line break between each footnote so that we don't
|
112
|
+
# end up with lines that exceed the allowed limit in certain versions of Outlook.
|
113
|
+
tmpl << "\n" if ctx.email?
|
114
|
+
|
111
115
|
# First, collect all symbols in the natural order they are defined
|
112
116
|
# in the email.
|
113
117
|
footnotes = ctx.footnotes.select(&:symbol?)
|
data/lib/inkcite/version.rb
CHANGED
@@ -30,15 +30,15 @@ describe Inkcite::Renderer::Footnote do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'renders using the {footnotes} tag' do
|
33
|
-
Inkcite::Renderer.render('yadda yadda({footnote text="EPA-estimated fuel economy."})<br><br>{footnotes}', @view).must_equal("yadda yadda(1)<br><br><sup>1</sup> EPA-estimated fuel economy.<br><br
|
33
|
+
Inkcite::Renderer.render('yadda yadda({footnote text="EPA-estimated fuel economy."})<br><br>{footnotes}', @view).must_equal("yadda yadda(1)<br><br><sup>1</sup> EPA-estimated fuel economy.<br><br>\n")
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'sorts symbols before numeric footnotes' do
|
37
|
-
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."})({footnote symbol="†" text="See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend."})({footnote text="Actual mileage may vary."})<br><br>{footnotes}', @view).must_equal("(1)(†)(2)<br><br><sup>†</sup> See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend.<br><br
|
37
|
+
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."})({footnote symbol="†" text="See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend."})({footnote text="Actual mileage may vary."})<br><br>{footnotes}', @view).must_equal("(1)(†)(2)<br><br><sup>†</sup> See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend.<br><br>\n<sup>1</sup> EPA-estimated fuel economy.<br><br>\n<sup>2</sup> Actual mileage may vary.<br><br>\n")
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'sorts symbols in the order they are defined' do
|
41
|
-
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."})({footnote symbol="†" text="See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend."})({footnote symbol="*" text="Actual mileage may vary."})<br><br>{footnotes}', @view).must_equal("(1)(†)(*)<br><br><sup>†</sup> See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend.<br><br
|
41
|
+
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."})({footnote symbol="†" text="See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend."})({footnote symbol="*" text="Actual mileage may vary."})<br><br>{footnotes}', @view).must_equal("(1)(†)(*)<br><br><sup>†</sup> See Blackmur, especially chapters 3 and 4, for an insightful analysis of this trend.<br><br>\n<sup>*</sup> Actual mileage may vary.<br><br>\n<sup>1</sup> EPA-estimated fuel economy.<br><br>\n")
|
42
42
|
end
|
43
43
|
|
44
44
|
it 'can have a reusable, readable ID assigned to it' do
|
@@ -46,11 +46,11 @@ describe Inkcite::Renderer::Footnote do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'can have a custom template' do
|
49
|
-
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."}) {footnotes tmpl="<p><sup>$symbol$</sup> $text$</p>"}', @view).must_equal("(1) <p><sup>1</sup> EPA-estimated fuel economy.</p
|
49
|
+
Inkcite::Renderer.render('({footnote text="EPA-estimated fuel economy."}) {footnotes tmpl="<p><sup>$symbol$</sup> $text$</p>"}', @view).must_equal("(1) <p><sup>1</sup> EPA-estimated fuel economy.</p>\n")
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'can be defined silently' do
|
53
|
-
Inkcite::Renderer.render('{footnote hidden=1 text="EPA-estimated fuel economy."}{footnotes}', @view).must_equal("<sup>1</sup> EPA-estimated fuel economy.<br><br
|
53
|
+
Inkcite::Renderer.render('{footnote hidden=1 text="EPA-estimated fuel economy."}{footnotes}', @view).must_equal("<sup>1</sup> EPA-estimated fuel economy.<br><br>\n")
|
54
54
|
end
|
55
55
|
|
56
56
|
it 'converts "\n" within footnotes template to new-lines' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inkcite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey D. Hoffman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -225,6 +225,9 @@ files:
|
|
225
225
|
- assets/init/source.html
|
226
226
|
- assets/init/source.txt
|
227
227
|
- bin/inkcite
|
228
|
+
- bin/release-major
|
229
|
+
- bin/release-minor
|
230
|
+
- bin/release-patch
|
228
231
|
- inkcite.gemspec
|
229
232
|
- lib/inkcite.rb
|
230
233
|
- lib/inkcite/cli/base.rb
|