mojombo-jekyll 0.4.1 → 0.5.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 +19 -1
- data/README.textile +75 -5
- data/Rakefile +91 -0
- data/VERSION.yml +2 -2
- data/bin/jekyll +60 -56
- data/lib/jekyll.rb +48 -32
- data/lib/jekyll/albino.rb +9 -5
- data/lib/jekyll/converters/mephisto.rb +8 -8
- data/lib/jekyll/converters/mt.rb +8 -8
- data/lib/jekyll/converters/textpattern.rb +4 -4
- data/lib/jekyll/converters/typo.rb +8 -8
- data/lib/jekyll/converters/wordpress.rb +1 -2
- data/lib/jekyll/convertible.rb +33 -22
- data/lib/jekyll/core_ext.rb +5 -5
- data/lib/jekyll/filters.rb +10 -6
- data/lib/jekyll/layout.rb +9 -6
- data/lib/jekyll/page.rb +13 -10
- data/lib/jekyll/post.rb +58 -27
- data/lib/jekyll/site.rb +121 -50
- data/lib/jekyll/tags/highlight.rb +12 -9
- data/lib/jekyll/tags/include.rb +5 -5
- data/test/helper.rb +17 -6
- data/test/source/_posts/2008-02-02-not-published.textile +8 -0
- data/test/source/_posts/2008-02-02-published.textile +8 -0
- data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
- data/test/source/_posts/2009-01-27-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-category.textile +7 -0
- data/test/test_filters.rb +31 -27
- data/test/test_generated_site.rb +32 -16
- data/test/test_post.rb +134 -102
- data/test/test_site.rb +52 -28
- data/test/test_tags.rb +17 -13
- metadata +25 -67
- data/test/test_jekyll.rb +0 -0
data/test/test_site.rb
CHANGED
@@ -1,33 +1,57 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/helper'
|
2
2
|
|
3
3
|
class TestSite < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
4
|
+
context "creating sites" do
|
5
|
+
setup do
|
6
|
+
stub(Jekyll).configuration do
|
7
|
+
Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
|
8
|
+
end
|
9
|
+
@site = Site.new(Jekyll.configuration)
|
10
|
+
end
|
11
|
+
|
12
|
+
should "reset data before processing" do
|
13
|
+
clear_dest
|
14
|
+
@site.process
|
15
|
+
before_posts = @site.posts.length
|
16
|
+
before_layouts = @site.layouts.length
|
17
|
+
before_categories = @site.categories.length
|
18
|
+
|
19
|
+
@site.process
|
20
|
+
assert_equal before_posts, @site.posts.length
|
21
|
+
assert_equal before_layouts, @site.layouts.length
|
22
|
+
assert_equal before_categories, @site.categories.length
|
23
|
+
end
|
24
|
+
|
25
|
+
should "read layouts" do
|
26
|
+
@site.read_layouts
|
27
|
+
assert_equal ["default", "simple"].sort, @site.layouts.keys.sort
|
28
|
+
end
|
29
|
+
|
30
|
+
should "read posts" do
|
31
|
+
@site.read_posts('')
|
32
|
+
posts = Dir[source_dir('_posts', '*')]
|
33
|
+
assert_equal posts.size - 1, @site.posts.size
|
34
|
+
end
|
35
|
+
|
36
|
+
should "deploy payload" do
|
37
|
+
clear_dest
|
38
|
+
@site.process
|
39
|
+
|
40
|
+
posts = Dir[source_dir("**", "_posts", "*")]
|
41
|
+
categories = %w(bar baz category foo z_category publish_test).sort
|
42
|
+
|
43
|
+
assert_equal posts.size - 1, @site.posts.size
|
44
|
+
assert_equal categories, @site.categories.keys.sort
|
45
|
+
assert_equal 4, @site.categories['foo'].size
|
46
|
+
end
|
47
|
+
|
48
|
+
should "filter entries" do
|
49
|
+
ent1 = %w[foo.markdown bar.markdown baz.markdown #baz.markdown#
|
50
|
+
.baz.markdow foo.markdown~]
|
51
|
+
ent2 = %w[.htaccess _posts bla.bla]
|
52
|
+
|
53
|
+
assert_equal %w[foo.markdown bar.markdown baz.markdown], @site.filter_entries(ent1)
|
54
|
+
assert_equal ent2, @site.filter_entries(ent2)
|
55
|
+
end
|
32
56
|
end
|
33
57
|
end
|
data/test/test_tags.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/helper'
|
2
2
|
|
3
3
|
class TestTags < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
context "tagging" do
|
5
|
+
setup do
|
6
|
+
@content = <<CONTENT
|
7
7
|
---
|
8
8
|
layout: post
|
9
9
|
title: This is a test
|
10
10
|
|
11
11
|
---
|
12
12
|
This document results in a markdown error with maruku
|
13
|
+
|
13
14
|
{% highlight ruby %}
|
14
15
|
puts "hi"
|
15
16
|
|
@@ -17,15 +18,18 @@ puts "bye"
|
|
17
18
|
{% endhighlight %}
|
18
19
|
|
19
20
|
CONTENT
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
end
|
22
|
+
|
23
|
+
should "render markdown with pygments line handling" do
|
24
|
+
stub(Jekyll).configuration do
|
25
|
+
Jekyll::DEFAULTS.merge({'pygments' => true})
|
26
|
+
end
|
27
|
+
site = Site.new(Jekyll.configuration)
|
28
|
+
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
|
29
|
+
|
30
|
+
result = Liquid::Template.parse(@content).render({}, info)
|
31
|
+
result = site.markdown(result)
|
32
|
+
assert_no_match(/markdown\-html\-error/,result)
|
33
|
+
end
|
29
34
|
end
|
30
|
-
|
31
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mojombo-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,11 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-07 00:00:00 -07:00
|
13
13
|
default_executable: jekyll
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: RedCloth
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
@@ -23,6 +24,7 @@ dependencies:
|
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: liquid
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
@@ -32,6 +34,7 @@ dependencies:
|
|
32
34
|
version:
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: classifier
|
37
|
+
type: :runtime
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
@@ -41,6 +44,7 @@ dependencies:
|
|
41
44
|
version:
|
42
45
|
- !ruby/object:Gem::Dependency
|
43
46
|
name: maruku
|
47
|
+
type: :runtime
|
44
48
|
version_requirement:
|
45
49
|
version_requirements: !ruby/object:Gem::Requirement
|
46
50
|
requirements:
|
@@ -50,6 +54,7 @@ dependencies:
|
|
50
54
|
version:
|
51
55
|
- !ruby/object:Gem::Dependency
|
52
56
|
name: directory_watcher
|
57
|
+
type: :runtime
|
53
58
|
version_requirement:
|
54
59
|
version_requirements: !ruby/object:Gem::Requirement
|
55
60
|
requirements:
|
@@ -59,6 +64,7 @@ dependencies:
|
|
59
64
|
version:
|
60
65
|
- !ruby/object:Gem::Dependency
|
61
66
|
name: open4
|
67
|
+
type: :runtime
|
62
68
|
version_requirement:
|
63
69
|
version_requirements: !ruby/object:Gem::Requirement
|
64
70
|
requirements:
|
@@ -72,16 +78,16 @@ executables:
|
|
72
78
|
- jekyll
|
73
79
|
extensions: []
|
74
80
|
|
75
|
-
extra_rdoc_files:
|
76
|
-
|
81
|
+
extra_rdoc_files:
|
82
|
+
- README.textile
|
77
83
|
files:
|
78
84
|
- History.txt
|
79
85
|
- README.textile
|
86
|
+
- Rakefile
|
80
87
|
- VERSION.yml
|
81
88
|
- bin/jekyll
|
82
|
-
- lib/jekyll
|
89
|
+
- lib/jekyll.rb
|
83
90
|
- lib/jekyll/albino.rb
|
84
|
-
- lib/jekyll/converters
|
85
91
|
- lib/jekyll/converters/csv.rb
|
86
92
|
- lib/jekyll/converters/mephisto.rb
|
87
93
|
- lib/jekyll/converters/mt.rb
|
@@ -95,82 +101,29 @@ files:
|
|
95
101
|
- lib/jekyll/page.rb
|
96
102
|
- lib/jekyll/post.rb
|
97
103
|
- lib/jekyll/site.rb
|
98
|
-
- lib/jekyll/tags
|
99
104
|
- lib/jekyll/tags/highlight.rb
|
100
105
|
- lib/jekyll/tags/include.rb
|
101
|
-
- lib/jekyll.rb
|
102
|
-
- test/dest
|
103
|
-
- test/dest/2008
|
104
|
-
- test/dest/2008/10
|
105
|
-
- test/dest/2008/10/18
|
106
|
-
- test/dest/2008/10/18/foo-bar.html
|
107
|
-
- test/dest/2008/11
|
108
|
-
- test/dest/2008/11/21
|
109
|
-
- test/dest/2008/11/21/complex.html
|
110
|
-
- test/dest/2008/12
|
111
|
-
- test/dest/2008/12/13
|
112
|
-
- test/dest/2008/12/13/include.html
|
113
|
-
- test/dest/_posts
|
114
|
-
- test/dest/_posts/2008-10-18-foo-bar.html
|
115
|
-
- test/dest/_posts/2008-11-21-complex.html
|
116
|
-
- test/dest/_posts/2008-12-03-permalinked-post.html
|
117
|
-
- test/dest/_posts/2008-12-13-include.html
|
118
|
-
- test/dest/category
|
119
|
-
- test/dest/category/2008
|
120
|
-
- test/dest/category/2008/09
|
121
|
-
- test/dest/category/2008/09/23
|
122
|
-
- test/dest/category/2008/09/23/categories.html
|
123
|
-
- test/dest/category/_posts
|
124
|
-
- test/dest/category/_posts/2008-9-23-categories.html
|
125
|
-
- test/dest/css
|
126
|
-
- test/dest/css/screen.css
|
127
|
-
- test/dest/foo
|
128
|
-
- test/dest/foo/2008
|
129
|
-
- test/dest/foo/2008/12
|
130
|
-
- test/dest/foo/2008/12/12
|
131
|
-
- test/dest/foo/2008/12/12/topical-post.html
|
132
|
-
- test/dest/foo/_posts
|
133
|
-
- test/dest/foo/_posts/bar
|
134
|
-
- test/dest/foo/_posts/bar/2008-12-12-topical-post.html
|
135
|
-
- test/dest/index.html
|
136
|
-
- test/dest/my_category
|
137
|
-
- test/dest/my_category/permalinked-post
|
138
|
-
- test/dest/z_category
|
139
|
-
- test/dest/z_category/2008
|
140
|
-
- test/dest/z_category/2008/09
|
141
|
-
- test/dest/z_category/2008/09/23
|
142
|
-
- test/dest/z_category/2008/09/23/categories.html
|
143
|
-
- test/dest/z_category/_posts
|
144
|
-
- test/dest/z_category/_posts/2008-9-23-categories.html
|
145
106
|
- test/helper.rb
|
146
|
-
- test/source
|
147
|
-
- test/source/_includes
|
148
107
|
- test/source/_includes/sig.markdown
|
149
|
-
- test/source/_layouts
|
150
108
|
- test/source/_layouts/default.html
|
151
109
|
- test/source/_layouts/simple.html
|
152
|
-
- test/source/_posts
|
110
|
+
- test/source/_posts/2008-02-02-not-published.textile
|
111
|
+
- test/source/_posts/2008-02-02-published.textile
|
153
112
|
- test/source/_posts/2008-10-18-foo-bar.textile
|
154
113
|
- test/source/_posts/2008-11-21-complex.textile
|
155
114
|
- test/source/_posts/2008-12-03-permalinked-post.textile
|
156
115
|
- test/source/_posts/2008-12-13-include.markdown
|
157
|
-
- test/source/
|
158
|
-
- test/source/
|
116
|
+
- test/source/_posts/2009-01-27-array-categories.textile
|
117
|
+
- test/source/_posts/2009-01-27-categories.textile
|
118
|
+
- test/source/_posts/2009-01-27-category.textile
|
159
119
|
- test/source/category/_posts/2008-9-23-categories.textile
|
160
|
-
- test/source/css
|
161
120
|
- test/source/css/screen.css
|
162
|
-
- test/source/foo
|
163
|
-
- test/source/foo/_posts
|
164
|
-
- test/source/foo/_posts/bar
|
165
121
|
- test/source/foo/_posts/bar/2008-12-12-topical-post.textile
|
166
122
|
- test/source/index.html
|
167
|
-
- test/source/z_category
|
168
|
-
- test/source/z_category/_posts
|
169
123
|
- test/source/z_category/_posts/2008-9-23-categories.textile
|
170
124
|
- test/suite.rb
|
171
125
|
- test/test_filters.rb
|
172
126
|
- test/test_generated_site.rb
|
173
|
-
- test/test_jekyll.rb
|
174
127
|
- test/test_post.rb
|
175
128
|
- test/test_site.rb
|
176
129
|
- test/test_tags.rb
|
@@ -178,7 +131,6 @@ has_rdoc: true
|
|
178
131
|
homepage: http://github.com/mojombo/jekyll
|
179
132
|
post_install_message:
|
180
133
|
rdoc_options:
|
181
|
-
- --inline-source
|
182
134
|
- --charset=UTF-8
|
183
135
|
require_paths:
|
184
136
|
- lib
|
@@ -201,5 +153,11 @@ rubygems_version: 1.2.0
|
|
201
153
|
signing_key:
|
202
154
|
specification_version: 2
|
203
155
|
summary: Jekyll is a simple, blog aware, static site generator.
|
204
|
-
test_files:
|
205
|
-
|
156
|
+
test_files:
|
157
|
+
- test/helper.rb
|
158
|
+
- test/suite.rb
|
159
|
+
- test/test_filters.rb
|
160
|
+
- test/test_generated_site.rb
|
161
|
+
- test/test_post.rb
|
162
|
+
- test/test_site.rb
|
163
|
+
- test/test_tags.rb
|
data/test/test_jekyll.rb
DELETED
File without changes
|