jekyll 1.0.0.beta2 → 1.0.0.beta3
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.
- data/History.txt +4 -0
- data/README.textile +1 -0
- data/bin/jekyll +7 -6
- data/jekyll.gemspec +5 -3
- data/lib/jekyll.rb +1 -1
- data/lib/jekyll/commands/build.rb +12 -13
- data/lib/jekyll/post.rb +3 -0
- data/lib/jekyll/site.rb +1 -1
- data/test/source/symlink-test/symlinked-file +22 -0
- data/test/test_site.rb +22 -0
- metadata +5 -4
data/History.txt
CHANGED
@@ -30,6 +30,10 @@
|
|
30
30
|
* Add source and destination directory protection (#535)
|
31
31
|
* Better YAML error message (#718)
|
32
32
|
* Bug Fixes
|
33
|
+
* Fix symlinked static files not being correctly built in unsafe mode (#909)
|
34
|
+
* Fix integration with directory_watcher 1.4.x (#916)
|
35
|
+
* Accepting strings as arguments to jekyll-import command (#910)
|
36
|
+
* Force usage of older directory_watcher gem as 1.5 is broken (#883)
|
33
37
|
* Ensure all Post categories are downcase (#842, #872)
|
34
38
|
* Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors (#555)
|
35
39
|
* Patch for multibyte URI problem with jekyll serve (#723)
|
data/README.textile
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
h1. Jekyll
|
2
2
|
|
3
3
|
!https://travis-ci.org/mojombo/jekyll.png?branch=master!:https://travis-ci.org/mojombo/jekyll
|
4
|
+
"!https://codeclimate.com/github/mojombo/jekyll.png!":https://codeclimate.com/github/mojombo/jekyll
|
4
5
|
|
5
6
|
By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
|
6
7
|
|
data/bin/jekyll
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
STDOUT.sync = true
|
2
3
|
|
3
4
|
$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
|
4
5
|
|
@@ -91,12 +92,12 @@ command :import do |c|
|
|
91
92
|
c.syntax = 'jekyll import <platform> [options]'
|
92
93
|
c.description = 'Import your old blog to Jekyll'
|
93
94
|
|
94
|
-
c.option '--source', 'Source file or URL to migrate from'
|
95
|
-
c.option '--file', 'File to migrate from'
|
96
|
-
c.option '--dbname', 'Database name to migrate from'
|
97
|
-
c.option '--user', 'Username to use when migrating'
|
98
|
-
c.option '--pass', 'Password to use when migrating'
|
99
|
-
c.option '--host', 'Host address to use when migrating'
|
95
|
+
c.option '--source STRING', 'Source file or URL to migrate from'
|
96
|
+
c.option '--file STRING', 'File to migrate from'
|
97
|
+
c.option '--dbname STRING', 'Database name to migrate from'
|
98
|
+
c.option '--user STRING', 'Username to use when migrating'
|
99
|
+
c.option '--pass STRING', 'Password to use when migrating'
|
100
|
+
c.option '--host STRING', 'Host address to use when migrating'
|
100
101
|
|
101
102
|
c.action do |args, options|
|
102
103
|
begin
|
data/jekyll.gemspec
CHANGED
@@ -4,9 +4,9 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'jekyll'
|
7
|
-
s.version = '1.0.0.
|
7
|
+
s.version = '1.0.0.beta3'
|
8
8
|
s.license = 'MIT'
|
9
|
-
s.date = '2013-
|
9
|
+
s.date = '2013-04-04'
|
10
10
|
s.rubyforge_project = 'jekyll'
|
11
11
|
|
12
12
|
s.summary = "A simple, blog aware, static site generator."
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
s.add_runtime_dependency('liquid', "~> 2.3")
|
27
27
|
s.add_runtime_dependency('classifier', "~> 1.3")
|
28
|
-
s.add_runtime_dependency('directory_watcher', "~> 1.1")
|
28
|
+
s.add_runtime_dependency('directory_watcher', "~> 1.4.1")
|
29
29
|
s.add_runtime_dependency('maruku', "~> 0.5")
|
30
30
|
s.add_runtime_dependency('kramdown', "~> 0.14")
|
31
31
|
s.add_runtime_dependency('pygments.rb', "~> 0.3.2")
|
@@ -202,6 +202,8 @@ Gem::Specification.new do |s|
|
|
202
202
|
test/source/foo/_posts/bar/2008-12-12-topical-post.textile
|
203
203
|
test/source/index.html
|
204
204
|
test/source/sitemap.xml
|
205
|
+
test/source/symlink-test/symlinked-dir
|
206
|
+
test/source/symlink-test/symlinked-file
|
205
207
|
test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
|
206
208
|
test/source/z_category/_posts/2008-9-23-categories.textile
|
207
209
|
test/suite.rb
|
data/lib/jekyll.rb
CHANGED
@@ -52,7 +52,7 @@ require_all 'jekyll/tags'
|
|
52
52
|
SafeYAML::OPTIONS[:suppress_warnings] = true
|
53
53
|
|
54
54
|
module Jekyll
|
55
|
-
VERSION = '1.0.0.
|
55
|
+
VERSION = '1.0.0.beta3'
|
56
56
|
|
57
57
|
# Default options. Overriden by values in _config.yml.
|
58
58
|
# Strings rather than symbols are used for compatability with YAML.
|
@@ -4,14 +4,8 @@ module Jekyll
|
|
4
4
|
def self.process(options)
|
5
5
|
site = Jekyll::Site.new(options)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
if options['watch']
|
11
|
-
self.watch(site, options)
|
12
|
-
else
|
13
|
-
self.build(site, options)
|
14
|
-
end
|
7
|
+
self.build(site, options)
|
8
|
+
self.watch(site, options) if options['watch']
|
15
9
|
end
|
16
10
|
|
17
11
|
# Private: Build the site from source into destination.
|
@@ -50,18 +44,23 @@ module Jekyll
|
|
50
44
|
source = options['source']
|
51
45
|
destination = options['destination']
|
52
46
|
|
53
|
-
puts " Source: #{source}"
|
54
|
-
puts " Destination: #{destination}"
|
55
47
|
puts " Auto-regeneration: enabled"
|
56
48
|
|
57
|
-
dw = DirectoryWatcher.new(source)
|
49
|
+
dw = DirectoryWatcher.new(source, :glob => self.globs(source, destination), :pre_load => true)
|
58
50
|
dw.interval = 1
|
59
|
-
dw.glob = self.globs(source, destination)
|
60
51
|
|
61
52
|
dw.add_observer do |*args|
|
62
53
|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
63
54
|
print " Regenerating: #{args.size} files at #{t} "
|
64
|
-
|
55
|
+
begin
|
56
|
+
site.process
|
57
|
+
rescue Jekyll::FatalException => e
|
58
|
+
puts
|
59
|
+
puts "ERROR: YOUR SITE COULD NOT BE BUILT:"
|
60
|
+
puts "------------------------------------"
|
61
|
+
puts e.message
|
62
|
+
exit(1)
|
63
|
+
end
|
65
64
|
puts "...done."
|
66
65
|
end
|
67
66
|
|
data/lib/jekyll/post.rb
CHANGED
@@ -62,6 +62,9 @@ module Jekyll
|
|
62
62
|
if self.categories.empty?
|
63
63
|
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase}
|
64
64
|
end
|
65
|
+
|
66
|
+
self.tags.flatten!
|
67
|
+
self.categories.flatten!
|
65
68
|
end
|
66
69
|
|
67
70
|
# Get the full path to the directory containing the post files
|
data/lib/jekyll/site.rb
CHANGED
@@ -159,7 +159,7 @@ module Jekyll
|
|
159
159
|
if File.directory?(f_abs)
|
160
160
|
next if self.dest.sub(/\/$/, '') == f_abs
|
161
161
|
read_directories(f_rel)
|
162
|
-
|
162
|
+
else
|
163
163
|
first3 = File.open(f_abs) { |fd| fd.read(3) }
|
164
164
|
if first3 == "---"
|
165
165
|
# file appears to have a YAML header so process it as a page
|
@@ -0,0 +1,22 @@
|
|
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/test_site.rb
CHANGED
@@ -217,6 +217,28 @@ class TestSite < Test::Unit::TestCase
|
|
217
217
|
assert_equal files, @site.filter_entries(files)
|
218
218
|
end
|
219
219
|
|
220
|
+
should "not include symlinks in safe mode" do
|
221
|
+
stub(Jekyll).configuration do
|
222
|
+
Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
|
223
|
+
end
|
224
|
+
site = Site.new(Jekyll.configuration)
|
225
|
+
|
226
|
+
site.read_directories("symlink-test")
|
227
|
+
assert_equal [], site.pages
|
228
|
+
assert_equal [], site.static_files
|
229
|
+
end
|
230
|
+
|
231
|
+
should "include symlinks in unsafe mode" do
|
232
|
+
stub(Jekyll).configuration do
|
233
|
+
Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => false})
|
234
|
+
end
|
235
|
+
site = Site.new(Jekyll.configuration)
|
236
|
+
|
237
|
+
site.read_directories("symlink-test")
|
238
|
+
assert_not_equal [], site.pages
|
239
|
+
assert_not_equal [], site.static_files
|
240
|
+
end
|
241
|
+
|
220
242
|
context 'error handling' do
|
221
243
|
should "raise if destination is included in source" do
|
222
244
|
stub(Jekyll).configuration do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: liquid
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 1.4.1
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.4.1
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: maruku
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -495,6 +495,7 @@ files:
|
|
495
495
|
- test/source/foo/_posts/bar/2008-12-12-topical-post.textile
|
496
496
|
- test/source/index.html
|
497
497
|
- test/source/sitemap.xml
|
498
|
+
- test/source/symlink-test/symlinked-file
|
498
499
|
- test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
|
499
500
|
- test/source/z_category/_posts/2008-9-23-categories.textile
|
500
501
|
- test/suite.rb
|