jekyll 3.0.0.pre.beta4 → 3.0.0.pre.beta5
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/cleaner.rb +7 -4
- data/lib/jekyll/commands/doctor.rb +17 -1
- data/lib/jekyll/reader.rb +8 -3
- data/lib/jekyll/regenerator.rb +8 -2
- data/lib/jekyll/utils.rb +2 -2
- data/lib/jekyll/utils/platforms.rb +30 -0
- data/lib/jekyll/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edd6e9afd1a7efdf658b22ee6c1d5fb8d404d885
|
4
|
+
data.tar.gz: 2cefab9b3051eb3e99baedbc3fc81c4196aadf97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213dcb3607112de64364c9f5c301bf804d321eb1a1aedee626a17db38fa5b2d792c881915b2fadff2315ec74573f5cc01abcbb32aba28bb051ff073d08e227e5
|
7
|
+
data.tar.gz: a4e81449531d328e96d75db1014fb7dd86f9f44e73312054ae2f2e7bcd124bbca3b7e55ea7781b0116ddd634ae9bf1ba1fc214c69ca41582b4d860b8ad4f215c
|
data/README.markdown
CHANGED
@@ -20,7 +20,7 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
|
|
20
20
|
* Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
|
21
21
|
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
|
22
22
|
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
|
23
|
-
* Have questions? Check out [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
|
23
|
+
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
|
24
24
|
|
25
25
|
## Diving In
|
26
26
|
|
data/lib/jekyll/cleaner.rb
CHANGED
@@ -36,9 +36,14 @@ module Jekyll
|
|
36
36
|
# Returns a Set with the file paths
|
37
37
|
def existing_files
|
38
38
|
files = Set.new
|
39
|
+
regex = keep_file_regex
|
40
|
+
dirs = keep_dirs
|
41
|
+
|
39
42
|
Dir.glob(site.in_dest_dir("**", "*"), File::FNM_DOTMATCH) do |file|
|
40
|
-
|
43
|
+
next if file =~ /\/\.{1,2}$/ || file =~ regex || dirs.include?(file)
|
44
|
+
files << file
|
41
45
|
end
|
46
|
+
|
42
47
|
files
|
43
48
|
end
|
44
49
|
|
@@ -93,9 +98,7 @@ module Jekyll
|
|
93
98
|
#
|
94
99
|
# Returns the regular expression
|
95
100
|
def keep_file_regex
|
96
|
-
|
97
|
-
pattern = "\/(#{or_list.gsub(".", "\.")})"
|
98
|
-
Regexp.new pattern
|
101
|
+
Regexp.union(site.keep_files)
|
99
102
|
end
|
100
103
|
end
|
101
104
|
end
|
@@ -30,6 +30,7 @@ module Jekyll
|
|
30
30
|
|
31
31
|
def healthy?(site)
|
32
32
|
[
|
33
|
+
fsnotify_buggy?(site),
|
33
34
|
!deprecated_relative_permalinks(site),
|
34
35
|
!conflicting_urls(site)
|
35
36
|
].all?
|
@@ -59,8 +60,23 @@ module Jekyll
|
|
59
60
|
conflicting_urls
|
60
61
|
end
|
61
62
|
|
62
|
-
|
63
|
+
def fsnotify_buggy?(site)
|
64
|
+
return true if !Utils::Platforms.osx?
|
65
|
+
if Dir.pwd != `pwd`.strip
|
66
|
+
Jekyll.logger.error " " + <<-STR.strip.gsub(/\n\s+/, "\n ")
|
67
|
+
We have detected that there might be trouble using fsevent on your
|
68
|
+
operating system, you can read https://github.com/thibaudgg/rb-fsevent/wiki/no-fsevents-fired-(OSX-bug)
|
69
|
+
for possible work arounds or you can work around it immediately
|
70
|
+
with `--force-polling`.
|
71
|
+
STR
|
72
|
+
|
73
|
+
false
|
74
|
+
end
|
63
75
|
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
64
80
|
def collect_urls(urls, things, destination)
|
65
81
|
things.each do |thing|
|
66
82
|
dest = thing.destination(destination)
|
data/lib/jekyll/reader.rb
CHANGED
@@ -15,10 +15,18 @@ module Jekyll
|
|
15
15
|
def read
|
16
16
|
@site.layouts = LayoutReader.new(site).read
|
17
17
|
read_directories
|
18
|
+
sort_files!
|
18
19
|
@site.data = DataReader.new(site).read(site.config['data_source'])
|
19
20
|
CollectionReader.new(site).read
|
20
21
|
end
|
21
22
|
|
23
|
+
# Sorts posts, pages, and static files.
|
24
|
+
def sort_files!
|
25
|
+
site.posts.sort!
|
26
|
+
site.pages.sort_by!(&:name)
|
27
|
+
site.static_files.sort_by!(&:relative_path)
|
28
|
+
end
|
29
|
+
|
22
30
|
# Recursively traverse directories to find posts, pages and static files
|
23
31
|
# that will become part of the site according to the rules in
|
24
32
|
# filter_entries.
|
@@ -50,7 +58,6 @@ module Jekyll
|
|
50
58
|
def retrieve_posts(dir)
|
51
59
|
site.posts.concat(PostReader.new(site).read(dir))
|
52
60
|
site.posts.concat(DraftReader.new(site).read(dir)) if site.show_drafts
|
53
|
-
site.posts.sort!
|
54
61
|
end
|
55
62
|
|
56
63
|
# Recursively traverse directories with the read_directories function.
|
@@ -77,7 +84,6 @@ module Jekyll
|
|
77
84
|
# Returns nothing.
|
78
85
|
def retrieve_pages(dir, dot_pages)
|
79
86
|
site.pages.concat(PageReader.new(site, dir).read(dot_pages))
|
80
|
-
site.pages.sort_by!(&:name)
|
81
87
|
end
|
82
88
|
|
83
89
|
# Retrieve all the static files from the current directory,
|
@@ -89,7 +95,6 @@ module Jekyll
|
|
89
95
|
# Returns nothing.
|
90
96
|
def retrieve_static_files(dir, dot_static_files)
|
91
97
|
site.static_files.concat(StaticFileReader.new(site, dir).read(dot_static_files))
|
92
|
-
site.static_files.sort_by!(&:relative_path)
|
93
98
|
end
|
94
99
|
|
95
100
|
# Filter out any files/directories that are hidden or backup files (start
|
data/lib/jekyll/regenerator.rb
CHANGED
@@ -131,7 +131,7 @@ module Jekyll
|
|
131
131
|
# Returns nothing.
|
132
132
|
def write_metadata
|
133
133
|
File.open(metadata_file, 'w') do |f|
|
134
|
-
f.write(metadata
|
134
|
+
f.write(Marshal.dump(metadata))
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
@@ -158,7 +158,13 @@ module Jekyll
|
|
158
158
|
# Returns the read metadata.
|
159
159
|
def read_metadata
|
160
160
|
@metadata = if !disabled? && File.file?(metadata_file)
|
161
|
-
|
161
|
+
content = File.read(metadata_file)
|
162
|
+
|
163
|
+
begin
|
164
|
+
Marshal.load(content)
|
165
|
+
rescue TypeError
|
166
|
+
SafeYAML.load(content)
|
167
|
+
end
|
162
168
|
else
|
163
169
|
{}
|
164
170
|
end
|
data/lib/jekyll/utils.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
module Jekyll
|
2
|
+
module Utils
|
3
|
+
module Platforms extend self
|
4
|
+
|
5
|
+
# Provides jruby? and mri? which respectively detect these two types of
|
6
|
+
# tested Engines we support, in the future we might probably support the
|
7
|
+
# other one that everyone used to talk about.
|
8
|
+
|
9
|
+
{ :jruby? => "jruby", :mri? => "ruby" }.each do |k, v|
|
10
|
+
define_method k do
|
11
|
+
::RUBY_ENGINE == v
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Provides windows?, linux?, osx?, unix? so that we can detect
|
16
|
+
# platforms. This is mostly useful for `jekyll doctor` and for testing
|
17
|
+
# where we kick off certain tests based on the platform.
|
18
|
+
|
19
|
+
{ :windows? => /mswin|mingw|cygwin/, :linux? => /linux/, \
|
20
|
+
:osx? => /darwin|mac os/, :unix? => /solaris|bsd/ }.each do |k, v|
|
21
|
+
|
22
|
+
define_method k do
|
23
|
+
!!(
|
24
|
+
RbConfig::CONFIG["host_os"] =~ v
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/jekyll/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.pre.
|
4
|
+
version: 3.0.0.pre.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- lib/jekyll/tags/post_url.rb
|
192
192
|
- lib/jekyll/url.rb
|
193
193
|
- lib/jekyll/utils.rb
|
194
|
+
- lib/jekyll/utils/platforms.rb
|
194
195
|
- lib/jekyll/version.rb
|
195
196
|
- lib/site_template/.gitignore
|
196
197
|
- lib/site_template/_config.yml
|