zenweb 3.2.0 → 3.3.0
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.
- data/History.txt +7 -0
- data/Manifest.txt +3 -0
- data/Rakefile +1 -1
- data/lib/coderay/scanners/elisp.rb +11 -0
- data/lib/coderay/scanners/scheme.rb +11 -0
- data/lib/coderay/zenweb_extensions.rb +7 -0
- data/lib/zenweb/plugins/markdown.rb +2 -1
- data/lib/zenweb.rb +1 -1
- data/test/helper.rb +2 -0
- data/test/test_zenweb_plugins_markdown.rb +38 -3
- data.tar.gz.sig +0 -0
- metadata +18 -15
- metadata.gz.sig +2 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -32,6 +32,9 @@ example-site/pages/nonblogpage.html.md
|
|
32
32
|
example-site/projects/index.html.erb
|
33
33
|
example-site/projects/zenweb.html.erb
|
34
34
|
example-site/sitemap.xml.erb
|
35
|
+
lib/coderay/scanners/elisp.rb
|
36
|
+
lib/coderay/scanners/scheme.rb
|
37
|
+
lib/coderay/zenweb_extensions.rb
|
35
38
|
lib/zenweb.rb
|
36
39
|
lib/zenweb/config.rb
|
37
40
|
lib/zenweb/extensions.rb
|
data/Rakefile
CHANGED
@@ -30,9 +30,10 @@ class Zenweb::Page
|
|
30
30
|
|
31
31
|
def markdown content, no_line_numbers = false
|
32
32
|
require "kramdown"
|
33
|
+
require "coderay/zenweb_extensions"
|
33
34
|
|
34
35
|
content = content.
|
35
|
-
gsub(/^\`\`\` *(\w+)/) { "
|
36
|
+
gsub(/^\`\`\` *(\w+)/) { "~~~ #$1" }.
|
36
37
|
gsub(/^\`\`\`/, '~~~')
|
37
38
|
|
38
39
|
config = KRAMDOWN_CONFIG.dup
|
data/lib/zenweb.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -6,9 +6,7 @@ require "minitest/autorun"
|
|
6
6
|
require "zenweb/site"
|
7
7
|
require "test/helper"
|
8
8
|
|
9
|
-
class
|
10
|
-
include ChdirTest("example-site")
|
11
|
-
|
9
|
+
class MarkdownTest < Minitest::Test
|
12
10
|
attr_accessor :site, :page
|
13
11
|
|
14
12
|
def setup
|
@@ -17,6 +15,43 @@ class TestZenwebPageMarkdown < Minitest::Test
|
|
17
15
|
self.site = Zenweb::Site.new
|
18
16
|
self.page = Zenweb::Page.new site, "blog/2012-01-02-page1.html.md"
|
19
17
|
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class TestUgh < MarkdownTest
|
21
|
+
def assert_markdown_code lang, line, *exps
|
22
|
+
act = page.markdown "``` #{lang}\n#{line}\n```"
|
23
|
+
|
24
|
+
exps.each do |exp|
|
25
|
+
assert_includes act, exp
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_coderay_ruby
|
30
|
+
assert_markdown_code("ruby",
|
31
|
+
"def x\n 42\nend",
|
32
|
+
'<div><table class="CodeRay"><tr>',
|
33
|
+
'<span class="keyword">def</span>')
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_coderay_clojure
|
37
|
+
assert_markdown_code("clojure",
|
38
|
+
"(+ 1 1)",
|
39
|
+
'<pre>(<span class="keyword">+</span>',
|
40
|
+
'<span class="integer">1</span>',
|
41
|
+
'<span class="integer">1</span>)')
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_coderay_elisp
|
45
|
+
assert_markdown_code("elisp",
|
46
|
+
"(+ 1 1)",
|
47
|
+
'<pre>(<span class="keyword">+</span>',
|
48
|
+
'<span class="integer">1</span>',
|
49
|
+
'<span class="integer">1</span>)')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
class TestZenwebPageMarkdown < MarkdownTest
|
54
|
+
include ChdirTest("example-site")
|
20
55
|
|
21
56
|
def test_attr_h
|
22
57
|
assert_equal "{:blah=\"42\"}", page.attr("blah" => 42)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 3.
|
10
|
+
version: 3.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -16,9 +16,9 @@ bindir: bin
|
|
16
16
|
cert_chain:
|
17
17
|
- |
|
18
18
|
-----BEGIN CERTIFICATE-----
|
19
|
-
|
19
|
+
MIIDPjCCAiagAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
20
20
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
21
|
-
|
21
|
+
GRYDY29tMB4XDTEzMDkxNjIzMDQxMloXDTE0MDkxNjIzMDQxMlowRTETMBEGA1UE
|
22
22
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
23
23
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
24
24
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -28,15 +28,15 @@ cert_chain:
|
|
28
28
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
29
29
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
30
30
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
AQCFZ7JTzoy1gcG4d8A6dmOJy7ygtO5MFpRIz8HuKCF5566nOvpy7aHhDDzFmQuu
|
32
|
+
FX3zDU6ghx5cQIueDhf2SGOncyBmmJRRYawm3wI0o1MeN6LZJ/3cRaOTjSFy6+S6
|
33
|
+
zqDmHBp8fVA2TGJtO0BLNkbGVrBJjh0UPmSoGzWlRhEVnYC33TpDAbNA+u39UrQI
|
34
|
+
ynwhNN7YbnmSR7+JU2cUjBFv2iPBO+TGuWC+9L2zn3NHjuc6tnmSYipA9y8Hv+As
|
35
|
+
Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
|
36
|
+
xx3n58i0lQkBE1EpKE0lFu/y
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2013-
|
39
|
+
date: 2013-10-24 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
@@ -112,11 +112,11 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - ~>
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
hash:
|
115
|
+
hash: 15
|
116
116
|
segments:
|
117
|
+
- 1
|
117
118
|
- 0
|
118
|
-
|
119
|
-
version: "0.13"
|
119
|
+
version: "1.0"
|
120
120
|
type: :runtime
|
121
121
|
version_requirements: *id005
|
122
122
|
- !ruby/object:Gem::Dependency
|
@@ -228,6 +228,9 @@ files:
|
|
228
228
|
- example-site/projects/index.html.erb
|
229
229
|
- example-site/projects/zenweb.html.erb
|
230
230
|
- example-site/sitemap.xml.erb
|
231
|
+
- lib/coderay/scanners/elisp.rb
|
232
|
+
- lib/coderay/scanners/scheme.rb
|
233
|
+
- lib/coderay/zenweb_extensions.rb
|
231
234
|
- lib/zenweb.rb
|
232
235
|
- lib/zenweb/config.rb
|
233
236
|
- lib/zenweb/extensions.rb
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�[f[����/�c���0�r���M��2�Gv��U�YA��)����MW_�z�^��@kpϴ���/�}|�U�R&
|
2
|
+
!��u32��q
|