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 CHANGED
@@ -1,3 +1,10 @@
1
+ === 3.3.0 / 2013-10-24
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Added scheme and elisp extensions to coderay. (just aliass for clojure right now)
6
+ * Updated to kramdown 1.x.
7
+
1
8
  === 3.2.0 / 2013-08-19
2
9
 
3
10
  * 3 minor enhancements:
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
@@ -13,7 +13,7 @@ Hoe.spec 'zenweb' do
13
13
  dependency "makerakeworkwell", "~> 1.0"
14
14
  dependency "less", "~> 1.2"
15
15
  dependency "coderay", "~> 1.0"
16
- dependency "kramdown", "~> 0.13"
16
+ dependency "kramdown", "~> 1.0"
17
17
  end
18
18
 
19
19
  # vim: syntax=ruby
@@ -0,0 +1,11 @@
1
+ module CodeRay
2
+ module Scanners
3
+ load :clojure
4
+
5
+ class Elisp < Clojure
6
+
7
+ register_for :elisp
8
+ file_extension 'el'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module CodeRay
2
+ module Scanners
3
+ load :clojure
4
+
5
+ class Scheme < Clojure
6
+
7
+ register_for :scheme
8
+ file_extension 'scm'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ require 'coderay'
2
+
3
+ require "coderay/scanners/elisp"
4
+ require "coderay/scanners/scheme"
5
+
6
+ ::CodeRay::FileType::TypeFromExt['scm'] = :scheme
7
+ ::CodeRay::FileType::TypeFromExt['el'] = :elisp
@@ -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+)/) { "{:lang=\"#$1\"}\n~~~" }.
36
+ gsub(/^\`\`\` *(\w+)/) { "~~~ #$1" }.
36
37
  gsub(/^\`\`\`/, '~~~')
37
38
 
38
39
  config = KRAMDOWN_CONFIG.dup
data/lib/zenweb.rb CHANGED
@@ -6,7 +6,7 @@ require "time"
6
6
 
7
7
  module Zenweb
8
8
  # duh
9
- VERSION = "3.2.0"
9
+ VERSION = "3.3.0"
10
10
  end
11
11
 
12
12
  require "zenweb/site"
data/test/helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "coderay/zenweb_extensions" # lame... force load early before chdir
2
+
1
3
  class Minitest::Test
2
4
  def self.ChdirTest path
3
5
  Module.new do
@@ -6,9 +6,7 @@ require "minitest/autorun"
6
6
  require "zenweb/site"
7
7
  require "test/helper"
8
8
 
9
- class TestZenwebPageMarkdown < Minitest::Test
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: 15
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 3.2.0
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
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
19
+ MIIDPjCCAiagAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
20
20
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
21
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
21
+ GRYDY29tMB4XDTEzMDkxNjIzMDQxMloXDTE0MDkxNjIzMDQxMlowRTETMBEGA1UE
22
22
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
23
23
  JomT8ixkARkWA2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3n58i0lQkBE1EpKE0lFu/y
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-08-19 00:00:00 Z
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: 17
115
+ hash: 15
116
116
  segments:
117
+ - 1
117
118
  - 0
118
- - 13
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
- ��i�Lß�Rv<#�[�ᆝq7[�F��b��2W<�^?�
2
- e��uo��/G!<�s
1
+ �񈀫[f[����/�c���0r���M��2�Gv��U�YA��)����MW_�z�^��@kpϴ���/�}|�U�R&
2
+ !��u32��q