jekyll 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/lib/jekyll.rb +0 -1
- data/lib/jekyll/collection.rb +18 -3
- data/lib/jekyll/command.rb +0 -25
- data/lib/jekyll/commands/build.rb +7 -2
- data/lib/jekyll/commands/help.rb +33 -0
- data/lib/jekyll/configuration.rb +36 -28
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
- data/lib/jekyll/convertible.rb +43 -20
- data/lib/jekyll/deprecator.rb +15 -8
- data/lib/jekyll/document.rb +21 -4
- data/lib/jekyll/filters.rb +27 -1
- data/lib/jekyll/frontmatter_defaults.rb +46 -12
- data/lib/jekyll/plugin.rb +10 -1
- data/lib/jekyll/post.rb +6 -13
- data/lib/jekyll/related_posts.rb +2 -2
- data/lib/jekyll/renderer.rb +7 -2
- data/lib/jekyll/site.rb +5 -7
- data/lib/jekyll/static_file.rb +24 -4
- data/lib/jekyll/tags/include.rb +3 -1
- data/lib/jekyll/tags/post_url.rb +2 -2
- data/lib/jekyll/utils.rb +88 -69
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_config.yml +6 -4
- data/lib/site_template/_includes/footer.html +43 -49
- data/lib/site_template/_includes/head.html +3 -4
- data/lib/site_template/_includes/header.html +9 -10
- data/lib/site_template/_layouts/default.html +6 -5
- data/lib/site_template/_layouts/page.html +3 -3
- data/lib/site_template/_layouts/post.html +4 -4
- data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +6 -5
- data/lib/site_template/_sass/_base.scss +203 -0
- data/lib/site_template/_sass/_layout.scss +236 -0
- data/lib/site_template/_sass/_syntax-highlighting.scss +67 -0
- data/lib/site_template/css/main.scss +49 -0
- data/lib/site_template/feed.xml +1 -1
- data/lib/site_template/index.html +7 -4
- metadata +24 -431
- data/.gitignore +0 -15
- data/.travis.yml +0 -27
- data/CONTRIBUTING.markdown +0 -91
- data/Gemfile +0 -2
- data/History.markdown +0 -1310
- data/Rakefile +0 -268
- data/cucumber.yml +0 -3
- data/docs/jp/CONTRIBUTING.jp.markdown +0 -93
- data/docs/jp/README.jp.markdown +0 -68
- data/features/collections.feature +0 -145
- data/features/create_sites.feature +0 -158
- data/features/data.feature +0 -105
- data/features/drafts.feature +0 -46
- data/features/embed_filters.feature +0 -107
- data/features/frontmatter_defaults.feature +0 -136
- data/features/include_tag.feature +0 -68
- data/features/markdown.feature +0 -67
- data/features/pagination.feature +0 -82
- data/features/permalinks.feature +0 -85
- data/features/post_data.feature +0 -261
- data/features/post_excerpts.feature +0 -50
- data/features/rendering.feature +0 -34
- data/features/site_configuration.feature +0 -283
- data/features/site_data.feature +0 -107
- data/features/step_definitions/jekyll_steps.rb +0 -201
- data/features/support/env.rb +0 -65
- data/jekyll.gemspec +0 -66
- data/lib/site_template/css/main.css +0 -410
- data/script/bootstrap +0 -4
- data/script/branding +0 -11
- data/script/cibuild +0 -7
- data/script/console +0 -38
- data/script/proof +0 -22
- data/script/rebund +0 -140
- data/script/test +0 -17
- data/site/.gitignore +0 -4
- data/site/CNAME +0 -1
- data/site/README +0 -1
- data/site/_config.yml +0 -9
- data/site/_data/docs.yml +0 -46
- data/site/_includes/analytics.html +0 -30
- data/site/_includes/anchor_links.html +0 -32
- data/site/_includes/css/font-awesome.css +0 -44
- data/site/_includes/css/gridism.css +0 -110
- data/site/_includes/css/normalize.css +0 -1
- data/site/_includes/css/pygments.css +0 -72
- data/site/_includes/css/style.css +0 -1045
- data/site/_includes/docs_contents.html +0 -8
- data/site/_includes/docs_contents_mobile.html +0 -10
- data/site/_includes/docs_option.html +0 -11
- data/site/_includes/docs_ul.html +0 -20
- data/site/_includes/footer.html +0 -15
- data/site/_includes/header.html +0 -18
- data/site/_includes/news_contents.html +0 -33
- data/site/_includes/news_contents_mobile.html +0 -11
- data/site/_includes/news_item.html +0 -24
- data/site/_includes/primary-nav-items.html +0 -17
- data/site/_includes/section_nav.html +0 -22
- data/site/_includes/top.html +0 -17
- data/site/_layouts/default.html +0 -13
- data/site/_layouts/docs.html +0 -23
- data/site/_layouts/news.html +0 -19
- data/site/_layouts/news_item.html +0 -27
- data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +0 -23
- data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +0 -27
- data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +0 -28
- data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +0 -25
- data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +0 -27
- data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +0 -31
- data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +0 -20
- data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +0 -20
- data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +0 -23
- data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +0 -19
- data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +0 -19
- data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +0 -43
- data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +0 -21
- data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +0 -30
- data/site/_posts/2013-12-09-jekyll-1-4-1-released.markdown +0 -20
- data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +0 -18
- data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +0 -26
- data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +0 -19
- data/site/_posts/2014-03-27-jekyll-1-5-1-released.markdown +0 -26
- data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +0 -31
- data/site/_posts/2014-05-08-jekyll-2-0-3-released.markdown +0 -18
- data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +0 -19
- data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +0 -31
- data/site/_posts/2014-07-01-jekyll-2-1-1-released.markdown +0 -30
- data/site/_posts/2014-07-29-jekyll-2-2-0-released.markdown +0 -19
- data/site/css/screen.css +0 -31
- data/site/docs/assets.md +0 -66
- data/site/docs/collections.md +0 -259
- data/site/docs/configuration.md +0 -536
- data/site/docs/continuous-integration.md +0 -177
- data/site/docs/contributing.md +0 -133
- data/site/docs/datafiles.md +0 -108
- data/site/docs/deployment-methods.md +0 -127
- data/site/docs/drafts.md +0 -21
- data/site/docs/extras.md +0 -18
- data/site/docs/frontmatter.md +0 -191
- data/site/docs/github-pages.md +0 -91
- data/site/docs/history.md +0 -1514
- data/site/docs/index.md +0 -58
- data/site/docs/installation.md +0 -106
- data/site/docs/migrations.md +0 -11
- data/site/docs/pages.md +0 -86
- data/site/docs/pagination.md +0 -212
- data/site/docs/permalinks.md +0 -188
- data/site/docs/plugins.md +0 -561
- data/site/docs/posts.md +0 -211
- data/site/docs/quickstart.md +0 -26
- data/site/docs/resources.md +0 -43
- data/site/docs/sites.md +0 -29
- data/site/docs/structure.md +0 -190
- data/site/docs/templates.md +0 -376
- data/site/docs/troubleshooting.md +0 -147
- data/site/docs/upgrading.md +0 -146
- data/site/docs/usage.md +0 -74
- data/site/docs/variables.md +0 -382
- data/site/docs/windows.md +0 -44
- data/site/favicon.ico +0 -0
- data/site/feed.xml +0 -48
- data/site/fonts/FontAwesome.otf +0 -0
- data/site/fonts/fontawesome-webfont.eot +0 -0
- data/site/fonts/fontawesome-webfont.svg +0 -504
- data/site/fonts/fontawesome-webfont.ttf +0 -0
- data/site/fonts/fontawesome-webfont.woff +0 -0
- data/site/freenode.txt +0 -1
- data/site/img/article-footer.png +0 -0
- data/site/img/footer-arrow.png +0 -0
- data/site/img/footer-logo.png +0 -0
- data/site/img/jekyll-sticker.jpg +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/logo-rss.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/index.html +0 -90
- data/site/js/html5shiv.min.js +0 -4
- data/site/js/respond.min.js +0 -5
- data/site/news/index.html +0 -10
- data/site/news/releases/index.html +0 -10
- data/test/fixtures/broken_front_matter1.erb +0 -5
- data/test/fixtures/broken_front_matter2.erb +0 -4
- data/test/fixtures/broken_front_matter3.erb +0 -7
- data/test/fixtures/exploit_front_matter.erb +0 -4
- data/test/fixtures/front_matter.erb +0 -4
- data/test/helper.rb +0 -80
- data/test/source/+/%# +.md +0 -6
- data/test/source/+/foo.md +0 -7
- data/test/source/.htaccess +0 -8
- data/test/source/_config.dev.toml +0 -2
- data/test/source/_data/categories/dairy.yaml +0 -6
- data/test/source/_data/languages.yml +0 -2
- data/test/source/_data/members.json +0 -12
- data/test/source/_data/members.yaml +0 -7
- data/test/source/_data/products.yml +0 -4
- data/test/source/_drafts/draft-properties.text +0 -11
- data/test/source/_includes/include.html +0 -1
- data/test/source/_includes/params.html +0 -7
- data/test/source/_includes/sig.markdown +0 -3
- data/test/source/_layouts/default.html +0 -27
- data/test/source/_layouts/post/simple.html +0 -1
- data/test/source/_layouts/simple.html +0 -1
- data/test/source/_methods/_do_not_read_me.md +0 -5
- data/test/source/_methods/configuration.md +0 -8
- data/test/source/_methods/sanitized_path.md +0 -5
- data/test/source/_methods/site/_dont_include_me_either.md +0 -5
- data/test/source/_methods/site/generate.md +0 -6
- data/test/source/_methods/site/initialize.md +0 -4
- data/test/source/_methods/um_hi.md +0 -6
- data/test/source/_plugins/dummy.rb +0 -8
- data/test/source/_posts/2008-02-02-not-published.textile +0 -8
- data/test/source/_posts/2008-02-02-published.textile +0 -8
- data/test/source/_posts/2008-10-18-foo-bar.textile +0 -8
- data/test/source/_posts/2008-11-21-complex.textile +0 -8
- data/test/source/_posts/2008-12-03-permalinked-post.textile +0 -9
- data/test/source/_posts/2008-12-13-include.markdown +0 -8
- data/test/source/_posts/2009-01-27-array-categories.textile +0 -10
- data/test/source/_posts/2009-01-27-categories.textile +0 -7
- data/test/source/_posts/2009-01-27-category.textile +0 -7
- data/test/source/_posts/2009-01-27-empty-categories.textile +0 -7
- data/test/source/_posts/2009-01-27-empty-category.textile +0 -7
- data/test/source/_posts/2009-01-27-no-category.textile +0 -6
- data/test/source/_posts/2009-03-12-hash-#1.markdown +0 -6
- data/test/source/_posts/2009-05-18-empty-tag.textile +0 -6
- data/test/source/_posts/2009-05-18-empty-tags.textile +0 -6
- data/test/source/_posts/2009-05-18-tag.textile +0 -6
- data/test/source/_posts/2009-05-18-tags.textile +0 -9
- data/test/source/_posts/2009-06-22-empty-yaml.textile +0 -3
- data/test/source/_posts/2009-06-22-no-yaml.textile +0 -1
- data/test/source/_posts/2010-01-08-triple-dash.markdown +0 -5
- data/test/source/_posts/2010-01-09-date-override.textile +0 -7
- data/test/source/_posts/2010-01-09-time-override.textile +0 -7
- data/test/source/_posts/2010-01-09-timezone-override.textile +0 -7
- data/test/source/_posts/2010-01-16-override-data.textile +0 -4
- data/test/source/_posts/2011-04-12-md-extension.md +0 -7
- data/test/source/_posts/2011-04-12-text-extension.text +0 -0
- data/test/source/_posts/2013-01-02-post-excerpt.markdown +0 -14
- data/test/source/_posts/2013-01-12-nil-layout.textile +0 -6
- data/test/source/_posts/2013-01-12-no-layout.textile +0 -5
- data/test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep +0 -0
- data/test/source/_posts/2013-04-11-custom-excerpt.markdown +0 -10
- data/test/source/_posts/2013-05-10-number-category.textile +0 -7
- data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +0 -23
- data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
- data/test/source/_posts/2013-12-17-include-variable-filters.markdown +0 -21
- data/test/source/_posts/2013-12-20-properties.text +0 -11
- data/test/source/_posts/2014-01-06-permalink-traversal.md +0 -5
- data/test/source/_posts/2014-03-03-yaml-with-dots.md +0 -5
- data/test/source/_posts/2014-03-22-escape-+ %20[].markdown +0 -6
- data/test/source/_posts/es/2008-11-21-nested.textile +0 -8
- data/test/source/_sass/_grid.scss +0 -1
- data/test/source/_slides/example-slide-1.html +0 -4
- data/test/source/_slides/example-slide-2.html +0 -7
- data/test/source/_slides/example-slide-3.html +0 -5
- data/test/source/_with.dots/all.dots/2.4.0.md +0 -5
- data/test/source/_with.dots/file.with.dots.md +0 -0
- data/test/source/about.html +0 -6
- data/test/source/category/_posts/2008-9-23-categories.textile +0 -6
- data/test/source/contacts.html +0 -5
- data/test/source/contacts/bar.html +0 -5
- data/test/source/contacts/index.html +0 -5
- data/test/source/css/main.scss +0 -4
- data/test/source/css/screen.css +0 -76
- data/test/source/deal.with.dots.html +0 -7
- data/test/source/environment.html +0 -5
- data/test/source/exploit.md +0 -5
- data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +0 -8
- data/test/source/index.html +0 -22
- data/test/source/js/coffeescript.coffee +0 -10
- data/test/source/pgp.key +0 -2
- data/test/source/products.yml +0 -4
- data/test/source/properties.html +0 -8
- data/test/source/sitemap.xml +0 -32
- data/test/source/static_files.html +0 -4
- data/test/source/symlink-test/symlinked-file +0 -22
- data/test/source/unpublished.html +0 -7
- data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +0 -7
- data/test/source/z_category/_posts/2008-9-23-categories.textile +0 -6
- data/test/suite.rb +0 -11
- data/test/test_cleaner.rb +0 -77
- data/test/test_coffeescript.rb +0 -49
- data/test/test_collections.rb +0 -224
- data/test/test_command.rb +0 -53
- data/test/test_configuration.rb +0 -201
- data/test/test_convertible.rb +0 -49
- data/test/test_document.rb +0 -193
- data/test/test_draft.rb +0 -56
- data/test/test_entry_filter.rb +0 -124
- data/test/test_excerpt.rb +0 -131
- data/test/test_filters.rb +0 -207
- data/test/test_generated_site.rb +0 -97
- data/test/test_kramdown.rb +0 -62
- data/test/test_layout_reader.rb +0 -34
- data/test/test_liquid_extensions.rb +0 -31
- data/test/test_log_adapter.rb +0 -59
- data/test/test_new_command.rb +0 -104
- data/test/test_page.rb +0 -254
- data/test/test_path_sanitization.rb +0 -18
- data/test/test_post.rb +0 -741
- data/test/test_rdiscount.rb +0 -22
- data/test/test_redcarpet.rb +0 -77
- data/test/test_redcloth.rb +0 -86
- data/test/test_related_posts.rb +0 -47
- data/test/test_sass.rb +0 -26
- data/test/test_site.rb +0 -452
- data/test/test_tags.rb +0 -509
- data/test/test_url.rb +0 -28
- data/test/test_utils.rb +0 -67
data/test/source/css/screen.css
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
/*****************************************************************************/
|
2
|
-
/*
|
3
|
-
/* Common
|
4
|
-
/*
|
5
|
-
/*****************************************************************************/
|
6
|
-
|
7
|
-
/* Global Reset */
|
8
|
-
|
9
|
-
* {
|
10
|
-
margin: 0;
|
11
|
-
padding: 0;
|
12
|
-
}
|
13
|
-
|
14
|
-
html, body {
|
15
|
-
height: 100%;
|
16
|
-
}
|
17
|
-
|
18
|
-
body {
|
19
|
-
background-color: white;
|
20
|
-
font: 13.34px helvetica, arial, clean, sans-serif;
|
21
|
-
*font-size: small;
|
22
|
-
text-align: center;
|
23
|
-
}
|
24
|
-
|
25
|
-
h1, h2, h3, h4, h5, h6 {
|
26
|
-
font-size: 100%;
|
27
|
-
}
|
28
|
-
|
29
|
-
h1 {
|
30
|
-
margin-bottom: 1em;
|
31
|
-
}
|
32
|
-
|
33
|
-
p {
|
34
|
-
margin: 1em 0;
|
35
|
-
}
|
36
|
-
|
37
|
-
a {
|
38
|
-
color: #00a;
|
39
|
-
}
|
40
|
-
|
41
|
-
a:hover {
|
42
|
-
color: black;
|
43
|
-
}
|
44
|
-
|
45
|
-
a:visited {
|
46
|
-
color: #a0a;
|
47
|
-
}
|
48
|
-
|
49
|
-
table {
|
50
|
-
font-size: inherit;
|
51
|
-
font: 100%;
|
52
|
-
}
|
53
|
-
|
54
|
-
/*****************************************************************************/
|
55
|
-
/*
|
56
|
-
/* Site
|
57
|
-
/*
|
58
|
-
/*****************************************************************************/
|
59
|
-
|
60
|
-
.site {
|
61
|
-
font-size: 110%;
|
62
|
-
text-align: justify;
|
63
|
-
width: 40em;
|
64
|
-
margin: 3em auto 2em auto;
|
65
|
-
line-height: 1.5em;
|
66
|
-
}
|
67
|
-
|
68
|
-
.title {
|
69
|
-
color: #a00;
|
70
|
-
font-weight: bold;
|
71
|
-
margin-bottom: 2em;
|
72
|
-
}
|
73
|
-
|
74
|
-
.site .meta {
|
75
|
-
color: #aaa;
|
76
|
-
}
|
data/test/source/exploit.md
DELETED
data/test/source/index.html
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: default
|
3
|
-
title: Tom Preston-Werner
|
4
|
-
---
|
5
|
-
|
6
|
-
h1. Welcome to my site
|
7
|
-
|
8
|
-
h2. Please read our {{ site.posts | size }} Posts
|
9
|
-
|
10
|
-
<ul>
|
11
|
-
{% for post in site.posts %}
|
12
|
-
<li>{{ post.date }} <a href="{{ post.url }}">{{ post.title }}</a></li>
|
13
|
-
{% endfor %}
|
14
|
-
</ul>
|
15
|
-
|
16
|
-
{% assign first_post = site.posts.first %}
|
17
|
-
<div id="first_post">
|
18
|
-
<h1>{{ first_post.title }}</h1>
|
19
|
-
<div>
|
20
|
-
{{ first_post.content }}
|
21
|
-
</div>
|
22
|
-
</div>
|
data/test/source/pgp.key
DELETED
data/test/source/products.yml
DELETED
data/test/source/properties.html
DELETED
data/test/source/sitemap.xml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: nil
|
3
|
-
---
|
4
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
5
|
-
<urlset
|
6
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
7
|
-
|
8
|
-
<url>
|
9
|
-
<loc>http://example.com</loc>
|
10
|
-
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
|
11
|
-
<changefreq>daily</changefreq>
|
12
|
-
<priority>1.0</priority>
|
13
|
-
</url>
|
14
|
-
|
15
|
-
{% for post in site.posts %}
|
16
|
-
<url>
|
17
|
-
<loc>http://example.com{{ post.url }}/</loc>
|
18
|
-
<lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
|
19
|
-
<changefreq>monthly</changefreq>
|
20
|
-
<priority>0.2</priority>
|
21
|
-
</url>
|
22
|
-
{% endfor %}
|
23
|
-
|
24
|
-
{% for page in site.html_pages %}
|
25
|
-
<url>
|
26
|
-
<loc>http://example.com{{ page.url }}</loc>
|
27
|
-
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
|
28
|
-
{% if page.changefreq %}<changefreq>{{ page.changefreq }}</changefreq>{% endif %}
|
29
|
-
{% if page.priority %}<priority>{{ page.priority }}</priority>{% endif %}
|
30
|
-
</url>
|
31
|
-
{% endfor %}
|
32
|
-
</urlset>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: default
|
3
|
-
title: Tom Preston-Werner
|
4
|
-
---
|
5
|
-
|
6
|
-
h1. Welcome to my site
|
7
|
-
|
8
|
-
h2. Please read our {{ site.posts | size }} Posts
|
9
|
-
|
10
|
-
<ul>
|
11
|
-
{% for post in site.posts %}
|
12
|
-
<li>{{ post.date }} <a href="{{ post.url }}">{{ post.title }}</a></li>
|
13
|
-
{% endfor %}
|
14
|
-
</ul>
|
15
|
-
|
16
|
-
{% assign first_post = site.posts.first %}
|
17
|
-
<div id="first_post">
|
18
|
-
<h1>{{ first_post.title }}</h1>
|
19
|
-
<div>
|
20
|
-
{{ first_post.content }}
|
21
|
-
</div>
|
22
|
-
</div>
|
data/test/suite.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
gem 'test-unit'
|
3
|
-
require 'test/unit'
|
4
|
-
|
5
|
-
# for some reason these tests fail when run via TextMate
|
6
|
-
# but succeed when run on the command line.
|
7
|
-
|
8
|
-
tests = Dir[File.expand_path("#{File.dirname(__FILE__)}/test_*.rb")]
|
9
|
-
tests.each do |file|
|
10
|
-
require file
|
11
|
-
end
|
data/test/test_cleaner.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
class TestCleaner < Test::Unit::TestCase
|
4
|
-
context "directory in keep_files" do
|
5
|
-
setup do
|
6
|
-
clear_dest
|
7
|
-
stub(Jekyll).configuration do
|
8
|
-
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
|
9
|
-
end
|
10
|
-
|
11
|
-
FileUtils.mkdir_p(dest_dir('to_keep/child_dir'))
|
12
|
-
FileUtils.touch(File.join(dest_dir('to_keep'), 'index.html'))
|
13
|
-
FileUtils.touch(File.join(dest_dir('to_keep/child_dir'), 'index.html'))
|
14
|
-
|
15
|
-
@site = Site.new(Jekyll.configuration)
|
16
|
-
@site.keep_files = ['to_keep/child_dir']
|
17
|
-
|
18
|
-
@cleaner = Site::Cleaner.new(@site)
|
19
|
-
@cleaner.cleanup!
|
20
|
-
end
|
21
|
-
|
22
|
-
teardown do
|
23
|
-
FileUtils.rm_rf(dest_dir('to_keep'))
|
24
|
-
end
|
25
|
-
|
26
|
-
should "keep the parent directory" do
|
27
|
-
assert File.exist?(dest_dir('to_keep'))
|
28
|
-
end
|
29
|
-
|
30
|
-
should "keep the child directory" do
|
31
|
-
assert File.exist?(dest_dir('to_keep/child_dir'))
|
32
|
-
end
|
33
|
-
|
34
|
-
should "keep the file in the directory in keep_files" do
|
35
|
-
assert File.exist?(File.join(dest_dir('to_keep/child_dir'), 'index.html'))
|
36
|
-
end
|
37
|
-
|
38
|
-
should "delete the file in the directory not in keep_files" do
|
39
|
-
assert !File.exist?(File.join(dest_dir('to_keep'), 'index.html'))
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
context "directory containing no files and non-empty directories" do
|
44
|
-
setup do
|
45
|
-
clear_dest
|
46
|
-
stub(Jekyll).configuration do
|
47
|
-
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
|
48
|
-
end
|
49
|
-
|
50
|
-
FileUtils.mkdir_p(source_dir('no_files_inside/child_dir'))
|
51
|
-
FileUtils.touch(File.join(source_dir('no_files_inside/child_dir'), 'index.html'))
|
52
|
-
|
53
|
-
@site = Site.new(Jekyll.configuration)
|
54
|
-
@site.process
|
55
|
-
|
56
|
-
@cleaner = Site::Cleaner.new(@site)
|
57
|
-
@cleaner.cleanup!
|
58
|
-
end
|
59
|
-
|
60
|
-
teardown do
|
61
|
-
FileUtils.rm_rf(source_dir('no_files_inside'))
|
62
|
-
FileUtils.rm_rf(dest_dir('no_files_inside'))
|
63
|
-
end
|
64
|
-
|
65
|
-
should "keep the parent directory" do
|
66
|
-
assert File.exist?(dest_dir('no_files_inside'))
|
67
|
-
end
|
68
|
-
|
69
|
-
should "keep the child directory" do
|
70
|
-
assert File.exist?(dest_dir('no_files_inside/child_dir'))
|
71
|
-
end
|
72
|
-
|
73
|
-
should "keep the file" do
|
74
|
-
assert File.exist?(File.join(dest_dir('no_files_inside/child_dir'), 'index.html'))
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
data/test/test_coffeescript.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
class TestCoffeeScript < Test::Unit::TestCase
|
4
|
-
context "converting CoffeeScript" do
|
5
|
-
setup do
|
6
|
-
@site = Jekyll::Site.new(Jekyll.configuration({
|
7
|
-
"source" => source_dir,
|
8
|
-
"destination" => dest_dir
|
9
|
-
}))
|
10
|
-
@site.process
|
11
|
-
@test_coffeescript_file = dest_dir("js/coffeescript.js")
|
12
|
-
@js_output = <<-JS
|
13
|
-
(function() {
|
14
|
-
$(function() {
|
15
|
-
var cube, cubes, list, num, square;
|
16
|
-
list = [1, 2, 3, 4, 5];
|
17
|
-
square = function(x) {
|
18
|
-
return x * x;
|
19
|
-
};
|
20
|
-
cube = function(x) {
|
21
|
-
return square(x) * x;
|
22
|
-
};
|
23
|
-
cubes = (function() {
|
24
|
-
var _i, _len, _results;
|
25
|
-
_results = [];
|
26
|
-
for (_i = 0, _len = list.length; _i < _len; _i++) {
|
27
|
-
num = list[_i];
|
28
|
-
_results.push(math.cube(num));
|
29
|
-
}
|
30
|
-
return _results;
|
31
|
-
})();
|
32
|
-
if (typeof elvis !== \"undefined\" && elvis !== null) {
|
33
|
-
return alert(\"I knew it!\");
|
34
|
-
}
|
35
|
-
});
|
36
|
-
|
37
|
-
}).call(this);
|
38
|
-
JS
|
39
|
-
end
|
40
|
-
|
41
|
-
should "write a JS file in place" do
|
42
|
-
assert File.exist?(@test_coffeescript_file), "Can't find the converted CoffeeScript file in the dest_dir."
|
43
|
-
end
|
44
|
-
|
45
|
-
should "produce JS" do
|
46
|
-
assert_equal @js_output, File.read(@test_coffeescript_file)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
data/test/test_collections.rb
DELETED
@@ -1,224 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
class TestCollections < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def fixture_site(overrides = {})
|
6
|
-
Jekyll::Site.new(Jekyll.configuration(
|
7
|
-
overrides.merge({
|
8
|
-
"source" => source_dir,
|
9
|
-
"destination" => dest_dir
|
10
|
-
})
|
11
|
-
))
|
12
|
-
end
|
13
|
-
|
14
|
-
context "an evil collection" do
|
15
|
-
setup do
|
16
|
-
@collection = Jekyll::Collection.new(fixture_site, "../../etc/password")
|
17
|
-
end
|
18
|
-
|
19
|
-
should "sanitize the label name" do
|
20
|
-
assert_equal @collection.label, "....etcpassword"
|
21
|
-
end
|
22
|
-
|
23
|
-
should "have a sanitized relative path name" do
|
24
|
-
assert_equal @collection.relative_directory, "_....etcpassword"
|
25
|
-
end
|
26
|
-
|
27
|
-
should "have a sanitized full path" do
|
28
|
-
assert_equal @collection.directory, source_dir("_....etcpassword")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
context "a simple collection" do
|
33
|
-
setup do
|
34
|
-
@collection = Jekyll::Collection.new(fixture_site, "methods")
|
35
|
-
end
|
36
|
-
|
37
|
-
should "sanitize the label name" do
|
38
|
-
assert_equal @collection.label, "methods"
|
39
|
-
end
|
40
|
-
|
41
|
-
should "have default url template" do
|
42
|
-
assert_equal @collection.url_template, "/:collection/:path:output_ext"
|
43
|
-
end
|
44
|
-
|
45
|
-
should "contain no docs when initialized" do
|
46
|
-
assert_empty @collection.docs
|
47
|
-
end
|
48
|
-
|
49
|
-
should "know its relative directory" do
|
50
|
-
assert_equal @collection.relative_directory, "_methods"
|
51
|
-
end
|
52
|
-
|
53
|
-
should "know the full path to itself on the filesystem" do
|
54
|
-
assert_equal @collection.directory, source_dir("_methods")
|
55
|
-
end
|
56
|
-
|
57
|
-
context "when turned into Liquid" do
|
58
|
-
should "have a label attribute" do
|
59
|
-
assert_equal @collection.to_liquid["label"], "methods"
|
60
|
-
end
|
61
|
-
|
62
|
-
should "have a docs attribute" do
|
63
|
-
assert_equal @collection.to_liquid["docs"], Array.new
|
64
|
-
end
|
65
|
-
|
66
|
-
should "have a directory attribute" do
|
67
|
-
assert_equal @collection.to_liquid["directory"], source_dir("_methods")
|
68
|
-
end
|
69
|
-
|
70
|
-
should "have a relative_directory attribute" do
|
71
|
-
assert_equal @collection.to_liquid["relative_directory"], "_methods"
|
72
|
-
end
|
73
|
-
|
74
|
-
should "have a output attribute" do
|
75
|
-
assert_equal @collection.to_liquid["output"], false
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
should "know whether it should be written or not" do
|
80
|
-
assert_equal @collection.write?, false
|
81
|
-
@collection.metadata['output'] = true
|
82
|
-
assert_equal @collection.write?, true
|
83
|
-
@collection.metadata.delete 'output'
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
context "with no collections specified" do
|
88
|
-
setup do
|
89
|
-
@site = fixture_site
|
90
|
-
@site.process
|
91
|
-
end
|
92
|
-
|
93
|
-
should "not contain any collections" do
|
94
|
-
assert_equal Hash.new, @site.collections
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
context "a collection with permalink" do
|
99
|
-
setup do
|
100
|
-
@site = fixture_site({
|
101
|
-
"collections" => {
|
102
|
-
"methods" => {
|
103
|
-
"permalink" => "/awesome/:path/"
|
104
|
-
}
|
105
|
-
}
|
106
|
-
})
|
107
|
-
@site.process
|
108
|
-
@collection = @site.collections["methods"]
|
109
|
-
end
|
110
|
-
|
111
|
-
should "have custom url template" do
|
112
|
-
assert_equal @collection.url_template, "/awesome/:path/"
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
context "with a collection" do
|
117
|
-
setup do
|
118
|
-
@site = fixture_site({
|
119
|
-
"collections" => ["methods"]
|
120
|
-
})
|
121
|
-
@site.process
|
122
|
-
@collection = @site.collections["methods"]
|
123
|
-
end
|
124
|
-
|
125
|
-
should "create a Hash on Site with the label mapped to the instance of the Collection" do
|
126
|
-
assert @site.collections.is_a?(Hash)
|
127
|
-
assert_not_nil @site.collections["methods"]
|
128
|
-
assert @site.collections["methods"].is_a? Jekyll::Collection
|
129
|
-
end
|
130
|
-
|
131
|
-
should "collects docs in an array on the Collection object" do
|
132
|
-
assert @site.collections["methods"].docs.is_a? Array
|
133
|
-
@site.collections["methods"].docs.each do |doc|
|
134
|
-
assert doc.is_a? Jekyll::Document
|
135
|
-
assert_include %w[
|
136
|
-
_methods/configuration.md
|
137
|
-
_methods/sanitized_path.md
|
138
|
-
_methods/site/generate.md
|
139
|
-
_methods/site/initialize.md
|
140
|
-
_methods/um_hi.md
|
141
|
-
], doc.relative_path
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
should "not include files which start with an underscore in the base collection directory" do
|
146
|
-
assert_not_include @collection.filtered_entries, "_do_not_read_me.md"
|
147
|
-
end
|
148
|
-
|
149
|
-
should "not include files which start with an underscore in a subdirectory" do
|
150
|
-
assert_not_include @collection.filtered_entries, "site/_dont_include_me_either.md"
|
151
|
-
end
|
152
|
-
|
153
|
-
should "not include the underscored files in the list of docs" do
|
154
|
-
assert_not_include @collection.docs.map(&:relative_path), "_methods/_do_not_read_me.md"
|
155
|
-
assert_not_include @collection.docs.map(&:relative_path), "_methods/site/_dont_include_me_either.md"
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
context "with a collection with metadata" do
|
160
|
-
setup do
|
161
|
-
@site = fixture_site({
|
162
|
-
"collections" => {
|
163
|
-
"methods" => {
|
164
|
-
"foo" => "bar",
|
165
|
-
"baz" => "whoo"
|
166
|
-
}
|
167
|
-
}
|
168
|
-
})
|
169
|
-
@site.process
|
170
|
-
@collection = @site.collections["methods"]
|
171
|
-
end
|
172
|
-
|
173
|
-
should "extract the configuration collection information as metadata" do
|
174
|
-
assert_equal @collection.metadata, {"foo" => "bar", "baz" => "whoo"}
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
context "in safe mode" do
|
179
|
-
setup do
|
180
|
-
@site = fixture_site({
|
181
|
-
"collections" => ["methods"],
|
182
|
-
"safe" => true
|
183
|
-
})
|
184
|
-
@site.process
|
185
|
-
@collection = @site.collections["methods"]
|
186
|
-
end
|
187
|
-
|
188
|
-
should "not allow symlinks" do
|
189
|
-
assert_not_include @collection.filtered_entries, "um_hi.md"
|
190
|
-
end
|
191
|
-
|
192
|
-
should "not include the symlinked file in the list of docs" do
|
193
|
-
assert_not_include @collection.docs.map(&:relative_path), "_methods/um_hi.md"
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
context "with dots in the filenames" do
|
198
|
-
setup do
|
199
|
-
@site = fixture_site({
|
200
|
-
"collections" => ["with.dots"],
|
201
|
-
"safe" => true
|
202
|
-
})
|
203
|
-
@site.process
|
204
|
-
@collection = @site.collections["with.dots"]
|
205
|
-
end
|
206
|
-
|
207
|
-
should "exist" do
|
208
|
-
assert_not_nil @collection
|
209
|
-
end
|
210
|
-
|
211
|
-
should "contain one document" do
|
212
|
-
assert_equal 2, @collection.docs.size
|
213
|
-
end
|
214
|
-
|
215
|
-
should "allow dots in the filename" do
|
216
|
-
assert_equal "_with.dots", @collection.relative_directory
|
217
|
-
end
|
218
|
-
|
219
|
-
should "read document in subfolders with dots" do
|
220
|
-
assert @collection.docs.any? { |d| d.path.include?("all.dots") }
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
end
|