rack-jekyll 0.4.5 → 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.
- checksums.yaml +4 -4
- data/History.markdown +89 -0
- data/README.markdown +17 -0
- data/Rakefile +1 -5
- data/example/404.md +10 -0
- data/example/_config.yml +5 -0
- data/example/_layouts/default.html +15 -0
- data/example/_layouts/post.html +7 -0
- data/example/_posts/2009-12-21-hello-world.md +8 -0
- data/example/config.ru +6 -0
- data/example/css/site.css +6 -0
- data/example/index.md +16 -0
- data/lib/rack/jekyll.rb +56 -24
- data/lib/rack/jekyll/utils.rb +21 -0
- data/lib/rack/jekyll/version.rb +1 -1
- data/lib/rack/templates/wait.html +48 -0
- data/rack-jekyll.gemspec +7 -3
- data/test/helper.rb +3 -0
- data/test/test_configuration.rb +10 -0
- data/test/test_requests.rb +28 -0
- data/test/test_utils.rb +54 -0
- metadata +19 -6
- data/lib/rack/jekyll/ext.rb +0 -7
- data/lib/rack/jekyll/helpers.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8197071d69920fb886e7a188cb18c1cf7397c2ca
|
4
|
+
data.tar.gz: e7a2ee5f2c1d15b6e4f8a24236d7e5a073399958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e0cfca74a9b4a389f615b080f0607ec9cacca41f35911a96c3a8bcd47c2e65cae1c9be86df4b8a8961a9b4fc576a25e914fd13fd33194c661bfeb217332871
|
7
|
+
data.tar.gz: 615e0ff6f289188b6208ecfb351d76d8d8a695ace32d8a52995e2ed28d21d0ffb8053fde69468b52d460474da3efc951ad00a052c67fb54c1454224c37be96e5
|
data/History.markdown
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
# Rack-Jekyll Release History
|
2
|
+
|
3
|
+
## master / 2016-03-09
|
4
|
+
|
5
|
+
### Enhancements
|
6
|
+
|
7
|
+
* Drop support of Ruby < 1.9.3
|
8
|
+
* Add release history
|
9
|
+
* Include example/ directory in the gem
|
10
|
+
* Use markdown source files for demo site instead of HTML
|
11
|
+
* Improve demo site pages, CSS, and `_config.yml`
|
12
|
+
* Remove Thorfile
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* Fix wrong HTML tag in default layout of demo site
|
17
|
+
|
18
|
+
### Development Fixes
|
19
|
+
|
20
|
+
* Move helper methods into a tested Utils module
|
21
|
+
* Use require_relative
|
22
|
+
* Remove unnecessary require statements
|
23
|
+
* Remove Rack::ShowStatus middleware from demo site
|
24
|
+
* Avoid "unused variable" warning for ruby -w
|
25
|
+
|
26
|
+
|
27
|
+
## 0.4.5 / 2015-11-06
|
28
|
+
|
29
|
+
### Enhancements
|
30
|
+
|
31
|
+
* Allow serving of files with unknown media type
|
32
|
+
* Support HEAD requests
|
33
|
+
|
34
|
+
### Bug Fixes
|
35
|
+
|
36
|
+
* Fix detection of 404s for directories without index.html
|
37
|
+
* Fix detection of 404s with partially matching paths
|
38
|
+
* Fix default media type for unknown extension (`application/octet-stream`)
|
39
|
+
|
40
|
+
### Development Fixes
|
41
|
+
|
42
|
+
* Increase test coverage
|
43
|
+
* Major refactorings
|
44
|
+
|
45
|
+
|
46
|
+
## 0.4.3, 0.4.4
|
47
|
+
|
48
|
+
not to be used, superseded by 0.4.5
|
49
|
+
|
50
|
+
|
51
|
+
## 0.4.2 / 2015-10-12
|
52
|
+
|
53
|
+
### Enhancements
|
54
|
+
|
55
|
+
* Loosen dependency on Jekyll to also allow Jekyll 2
|
56
|
+
* Add `:config` option for custom configuration file
|
57
|
+
* Add `:force_build` option to always generate site
|
58
|
+
* Wait while regenerating the site before returning a response
|
59
|
+
* Use "listen" gem instead of "directory_watcher"
|
60
|
+
* Clean up and improve demo site: use Markdown, add CSS, ...
|
61
|
+
* Clean up and improve README
|
62
|
+
* Add some RDoc
|
63
|
+
|
64
|
+
### Bug Fixes
|
65
|
+
|
66
|
+
* Fix typo in Content-Length header
|
67
|
+
* Fix broken initialization of instance variables
|
68
|
+
* Fix broken configuration loading
|
69
|
+
* Fix updating of @files list
|
70
|
+
* Fix auto-regeneration
|
71
|
+
|
72
|
+
### Development Fixes
|
73
|
+
|
74
|
+
* Major refactorings
|
75
|
+
* Start testing the actual code instead of a fake app
|
76
|
+
* Add many test cases and clean up tests
|
77
|
+
* Use "minitest" instead of "test-unit"
|
78
|
+
* Fix Cucumber tests which were always passing
|
79
|
+
* Let the @files list be an array
|
80
|
+
* Fix misplaced instance variable assignment
|
81
|
+
* Fix effectless debugging statement
|
82
|
+
* Add "listen" gem as dependency
|
83
|
+
* Clean up gemspec
|
84
|
+
* Remove some unused legacy code
|
85
|
+
|
86
|
+
|
87
|
+
## 0.4.1 / 2013-05-15
|
88
|
+
|
89
|
+
See commit log.
|
data/README.markdown
CHANGED
@@ -62,6 +62,7 @@ Additional Rack-Jekyll initialization options:
|
|
62
62
|
:force_build - whether to always generate the site at startup, even
|
63
63
|
when the destination path is not empty (default: false)
|
64
64
|
:auto - whether to watch for changes and rebuild (default: false)
|
65
|
+
:wait_page - a page to display while pages are rendering
|
65
66
|
|
66
67
|
Note that on read-only filesystems a site build will fail,
|
67
68
|
so do not set `:force_build => true` in these cases.
|
@@ -73,6 +74,22 @@ In your site's root directory you can provide a custom `404.html` file
|
|
73
74
|
with YAML front matter.
|
74
75
|
|
75
76
|
|
77
|
+
## Wait page
|
78
|
+
|
79
|
+
You can create a custom HTML page to display while Jekyll is rendering the
|
80
|
+
site. Set the `:wait_page` initialization option to point to a file relative
|
81
|
+
to the root of your Jekyll project.
|
82
|
+
|
83
|
+
*Example:*
|
84
|
+
|
85
|
+
run Rack::Jekyll.new(:wait_page => "hold_on.html")
|
86
|
+
|
87
|
+
Note that this page should be self-contained (no links to external CSS
|
88
|
+
or JS). It is also not a bad idea to add a `<meta http-equiv="refresh"
|
89
|
+
content="60"/>` to the `head` section so that the page will periodically
|
90
|
+
refresh itself and display the site once Jekyll has finished rendering.
|
91
|
+
|
92
|
+
|
76
93
|
## Contributing
|
77
94
|
|
78
95
|
Contributions are more than just welcome.
|
data/Rakefile
CHANGED
data/example/404.md
ADDED
data/example/_config.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<link rel="stylesheet" type="text/css" href="/css/site.css">
|
6
|
+
{% if page.title != null %}
|
7
|
+
<title>Rack-Jekyll Demo - {{ page.title }}</title>
|
8
|
+
{% else %}
|
9
|
+
<title>Rack-Jekyll Demo</title>
|
10
|
+
{% endif %}
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
{{ content }}
|
14
|
+
</body>
|
15
|
+
</html>
|
data/example/config.ru
ADDED
data/example/index.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
# Rack-Jekyll Demo
|
6
|
+
|
7
|
+
Blog posts:
|
8
|
+
|
9
|
+
<ul>
|
10
|
+
{% for post in site.posts %}
|
11
|
+
<li>
|
12
|
+
<span class="date">{{ post.date | date_to_string }}:</span>
|
13
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
14
|
+
</li>
|
15
|
+
{% endfor %}
|
16
|
+
</ul>
|
data/lib/rack/jekyll.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
require "rack"
|
2
2
|
require "jekyll"
|
3
|
-
require "
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require File.join(File.dirname(__FILE__), 'jekyll', 'ext')
|
3
|
+
require "thread"
|
4
|
+
|
5
|
+
require_relative "jekyll/filehandler"
|
6
|
+
require_relative "jekyll/utils"
|
7
|
+
require_relative "jekyll/version"
|
9
8
|
|
10
9
|
module Rack
|
11
10
|
class Jekyll
|
12
11
|
|
13
|
-
attr_reader :config, :destination
|
12
|
+
attr_reader :config, :destination, :wait_page
|
14
13
|
|
15
14
|
# Initializes a new Rack::Jekyll site.
|
16
15
|
#
|
@@ -23,15 +22,19 @@ module Rack
|
|
23
22
|
#
|
24
23
|
# +:auto+:: whether to watch for changes and rebuild (default: +false+)
|
25
24
|
#
|
25
|
+
# +:wait_page+:: a page to display while pages are rendering (default: "templates/wait.html")
|
26
|
+
#
|
26
27
|
# Other options are passed on to Jekyll::Site.
|
27
28
|
def initialize(options = {})
|
28
29
|
overrides = options.dup
|
29
|
-
@compiling = false
|
30
30
|
@force_build = overrides.fetch(:force_build, false)
|
31
31
|
@auto = overrides.fetch(:auto, false)
|
32
|
+
@wait_page = read_wait_page(overrides)
|
33
|
+
@compile_queue = Queue.new
|
32
34
|
|
33
35
|
overrides.delete(:force_build)
|
34
36
|
overrides.delete(:auto)
|
37
|
+
overrides.delete(:wait_page)
|
35
38
|
@config = ::Jekyll.configuration(overrides)
|
36
39
|
|
37
40
|
@destination = @config["destination"]
|
@@ -59,27 +62,29 @@ module Rack
|
|
59
62
|
ignore_pattern = %r{#{Regexp.escape(relative_path_to_dest)}}
|
60
63
|
|
61
64
|
listener = Listen.to(@source, :ignore => ignore_pattern) do |modified, added, removed|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
+
unless compiling?
|
66
|
+
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
67
|
+
n = modified.length + added.length + removed.length
|
68
|
+
process("[#{t}] Regenerating: #{n} file(s) changed")
|
69
|
+
end
|
65
70
|
end
|
66
71
|
listener.start unless Listen::VERSION =~ /\A[0-1]\./
|
67
72
|
end
|
68
73
|
end
|
69
74
|
|
70
75
|
def call(env)
|
71
|
-
while @compiling
|
72
|
-
sleep 0.1
|
73
|
-
end
|
74
|
-
|
75
76
|
request = Rack::Request.new(env)
|
76
77
|
|
78
|
+
while compiling?
|
79
|
+
return serve_wait_page(request)
|
80
|
+
end
|
81
|
+
|
77
82
|
filename = @files.get_filename(request.path_info)
|
78
83
|
|
79
84
|
if filename
|
80
|
-
|
85
|
+
media_type = Utils.media_type(filename)
|
81
86
|
|
82
|
-
file
|
87
|
+
file = Utils.file_info(filename)
|
83
88
|
body = file[:body]
|
84
89
|
time = file[:time]
|
85
90
|
hdrs = { "Last-Modified" => time }
|
@@ -88,7 +93,7 @@ module Rack
|
|
88
93
|
response = [304, hdrs, []]
|
89
94
|
else
|
90
95
|
hdrs.update({ "Content-Length" => body.bytesize.to_s,
|
91
|
-
"Content-Type" =>
|
96
|
+
"Content-Type" => media_type })
|
92
97
|
response = [200, hdrs, [body]]
|
93
98
|
end
|
94
99
|
|
@@ -102,14 +107,21 @@ module Rack
|
|
102
107
|
request.head? ? remove_body(response) : response
|
103
108
|
end
|
104
109
|
|
110
|
+
def compiling?
|
111
|
+
!@compile_queue.empty?
|
112
|
+
end
|
113
|
+
|
105
114
|
private
|
106
115
|
|
107
116
|
def process(message = nil)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
117
|
+
puts message if message
|
118
|
+
@compile_queue << '.'
|
119
|
+
|
120
|
+
Thread.new do
|
121
|
+
@site.process
|
122
|
+
@files.update
|
123
|
+
@compile_queue.clear
|
124
|
+
end
|
113
125
|
end
|
114
126
|
|
115
127
|
def not_found_message
|
@@ -123,7 +135,27 @@ module Rack
|
|
123
135
|
def custom_404
|
124
136
|
filename = @files.get_filename("/404.html")
|
125
137
|
|
126
|
-
filename ? file_info(filename)[:body] : nil
|
138
|
+
filename ? Utils.file_info(filename)[:body] : nil
|
139
|
+
end
|
140
|
+
|
141
|
+
def read_wait_page(options)
|
142
|
+
path = ::File.expand_path("templates/wait.html", ::File.dirname(__FILE__))
|
143
|
+
if options.key?(:wait_page)
|
144
|
+
if ::File.exist?(options[:wait_page])
|
145
|
+
path = options[:wait_page]
|
146
|
+
else
|
147
|
+
puts "Could not read #{options[:wait_page]}. Using default."
|
148
|
+
end
|
149
|
+
end
|
150
|
+
::File.open(path, 'r').read
|
151
|
+
end
|
152
|
+
|
153
|
+
def serve_wait_page(req)
|
154
|
+
headers ||= {}
|
155
|
+
headers['Content-Length'] = @wait_page.bytesize.to_s
|
156
|
+
headers['Content-Type'] = 'text/html'
|
157
|
+
headers['Connection'] = 'keep-alive'
|
158
|
+
[200, headers, [@wait_page]]
|
127
159
|
end
|
128
160
|
|
129
161
|
def remove_body(response)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Rack
|
2
|
+
class Jekyll
|
3
|
+
module Utils
|
4
|
+
|
5
|
+
def self.media_type(filename)
|
6
|
+
extension = ::File.extname(filename)
|
7
|
+
|
8
|
+
Rack::Mime.mime_type(extension)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.file_info(path)
|
12
|
+
info = {
|
13
|
+
:body => ::File.read(path),
|
14
|
+
:time => ::File.mtime(path).httpdate
|
15
|
+
}
|
16
|
+
|
17
|
+
info
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/rack/jekyll/version.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html lang="en-US">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8"/>
|
5
|
+
<meta http-equiv="refresh" content="60"/>
|
6
|
+
<title>Jekyll is working</title>
|
7
|
+
<style type="text/css">
|
8
|
+
html {
|
9
|
+
position: relative;
|
10
|
+
min-height: 100%;
|
11
|
+
}
|
12
|
+
|
13
|
+
body {
|
14
|
+
font-family: "Liberation Sans", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
15
|
+
background-color: #555;
|
16
|
+
background-image: linear-gradient(to bottom, #555 0%, #333 100%);
|
17
|
+
background-repeat: repeat-x;
|
18
|
+
}
|
19
|
+
|
20
|
+
div#message {
|
21
|
+
position: absolute;
|
22
|
+
top: 50%;
|
23
|
+
left: 50%;
|
24
|
+
transform: translate(-50%, -50%);
|
25
|
+
|
26
|
+
background-color: #c00;
|
27
|
+
background-image: linear-gradient(to bottom, #a70000 0%, #7d0000 100%);
|
28
|
+
background-repeat: repeat-x;
|
29
|
+
|
30
|
+
border-color: #730000;
|
31
|
+
border-radius: 5px;
|
32
|
+
|
33
|
+
color: #fff;
|
34
|
+
padding: 15px;
|
35
|
+
}
|
36
|
+
|
37
|
+
div#message h1 {
|
38
|
+
margin-top: 5px;
|
39
|
+
margin-bottom: 5px;
|
40
|
+
}
|
41
|
+
</style>
|
42
|
+
</head>
|
43
|
+
<body>
|
44
|
+
<div id="message">
|
45
|
+
<h1>Jekyll is currently rendering the site.</h1>
|
46
|
+
<h1>Please try again shortly.</h1>
|
47
|
+
</div>
|
48
|
+
</body>
|
data/rack-jekyll.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
require_relative "lib/rack/jekyll/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.required_rubygems_version = ">= 1.3.6"
|
@@ -20,15 +20,19 @@ Gem::Specification.new do |s|
|
|
20
20
|
rack-jekyll.gemspec
|
21
21
|
Gemfile
|
22
22
|
Rakefile
|
23
|
+
History.markdown
|
23
24
|
LICENSE
|
24
25
|
} +
|
25
|
-
Dir.glob("lib/**/*")
|
26
|
+
Dir.glob("lib/**/*") +
|
27
|
+
Dir.glob("example/**/*").reject {|f| f =~ %r(\Aexample/_site/) }
|
26
28
|
s.test_files = Dir.glob("{test,features}/**/*")
|
27
29
|
s.require_paths = ["lib"]
|
28
30
|
|
29
|
-
s.extra_rdoc_files = [
|
31
|
+
s.extra_rdoc_files = %w[README.markdown History.markdown LICENSE]
|
30
32
|
s.rdoc_options = ['--charset=UTF-8', '--main=README.markdown']
|
31
33
|
|
34
|
+
s.required_ruby_version = '>= 1.9.3'
|
35
|
+
|
32
36
|
s.add_dependency "jekyll", ">= 1.3"
|
33
37
|
s.add_dependency "rack", "~> 1.5"
|
34
38
|
s.add_dependency "listen", ">= 1.3"
|
data/test/helper.rb
CHANGED
data/test/test_configuration.rb
CHANGED
@@ -77,6 +77,16 @@ describe "when configuring site" do
|
|
77
77
|
jekyll = rack_jekyll_without_build(:force_build => "ok")
|
78
78
|
jekyll.config.wont_include "force_build"
|
79
79
|
end
|
80
|
+
|
81
|
+
it ":wait_page is not passed on to Jekyll" do
|
82
|
+
jekyll = rack_jekyll_without_build(:wait_page => "foobar")
|
83
|
+
jekyll.config.wont_include "wait_page"
|
84
|
+
end
|
85
|
+
|
86
|
+
it ":wait_page uses default" do
|
87
|
+
jekyll = rack_jekyll_without_build(:wait_page => "/does/not/exist")
|
88
|
+
jekyll.wait_page.must_match %r{Please try again shortly}
|
89
|
+
end
|
80
90
|
end
|
81
91
|
|
82
92
|
describe "when initialization options are given and a config file exists" do
|
data/test/test_requests.rb
CHANGED
@@ -84,6 +84,34 @@ describe "when handling requests" do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
|
87
|
+
describe "when the site is compiling" do
|
88
|
+
|
89
|
+
it "should serve a wait page" do
|
90
|
+
begin
|
91
|
+
filename = File.join(@sourcedir, "custom_wait.html")
|
92
|
+
File.open(filename, "w") {|f| f.puts "Custom Wait" }
|
93
|
+
|
94
|
+
jekyll = nil
|
95
|
+
silence_output do
|
96
|
+
# This is a little brittle as the site renders in a separate thread
|
97
|
+
# Theoretically, if the site rendered fast enough, the request
|
98
|
+
# would end up getting actual content instead of the wait page
|
99
|
+
# and this test would fail.
|
100
|
+
jekyll = Rack::Jekyll.new(:force_build => true,
|
101
|
+
:source => @sourcedir,
|
102
|
+
:destination => @destdir,
|
103
|
+
:wait_page => filename)
|
104
|
+
end
|
105
|
+
request = Rack::MockRequest.new(jekyll)
|
106
|
+
|
107
|
+
request.get("/index.html").body.must_match %r{Custom Wait}
|
108
|
+
ensure
|
109
|
+
FileUtils.rm(filename)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
|
87
115
|
describe "when a directory is requested" do
|
88
116
|
|
89
117
|
it "should redirect with status 301 to 'directory/' for 'directory' with index.html" do
|
data/test/test_utils.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require_relative "helper"
|
2
|
+
|
3
|
+
|
4
|
+
describe Rack::Jekyll::Utils do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@utils = Rack::Jekyll::Utils
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
describe "when asked for #media_type" do
|
12
|
+
|
13
|
+
it "returns correct type for HTML" do
|
14
|
+
@utils.media_type("index.html").must_equal "text/html"
|
15
|
+
end
|
16
|
+
|
17
|
+
it "returns correct type for HTML with full path" do
|
18
|
+
@utils.media_type("/path/index.html").must_equal "text/html"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "returns correct type for CSS" do
|
22
|
+
@utils.media_type("/path/style.css").must_equal "text/css"
|
23
|
+
end
|
24
|
+
|
25
|
+
it "returns correct type for *.min.js" do
|
26
|
+
@utils.media_type("script.min.js").must_equal "application/javascript"
|
27
|
+
end
|
28
|
+
|
29
|
+
it "returns correct default type for files without extension" do
|
30
|
+
@utils.media_type("README").must_equal "application/octet-stream"
|
31
|
+
end
|
32
|
+
|
33
|
+
it "ignores lower/upper case in file extensions" do
|
34
|
+
@utils.media_type("image.JpG").must_equal "image/jpeg"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
describe "when asked for #file_info" do
|
40
|
+
|
41
|
+
before do
|
42
|
+
@filename = __FILE__
|
43
|
+
@info = @utils.file_info(@filename)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "has the file content" do
|
47
|
+
@info[:body].must_equal ::File.read(@filename)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "has the modification time in httpdate format" do
|
51
|
+
@info[:time].must_equal ::File.mtime(@filename).httpdate
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-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
|
- Bryan Goines
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-07-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -87,19 +87,30 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files:
|
89
89
|
- README.markdown
|
90
|
+
- History.markdown
|
91
|
+
- LICENSE
|
90
92
|
files:
|
91
93
|
- Gemfile
|
94
|
+
- History.markdown
|
92
95
|
- LICENSE
|
93
96
|
- README.markdown
|
94
97
|
- Rakefile
|
98
|
+
- example/404.md
|
99
|
+
- example/_config.yml
|
100
|
+
- example/_layouts/default.html
|
101
|
+
- example/_layouts/post.html
|
102
|
+
- example/_posts/2009-12-21-hello-world.md
|
103
|
+
- example/config.ru
|
104
|
+
- example/css/site.css
|
105
|
+
- example/index.md
|
95
106
|
- features/requests.feature
|
96
107
|
- features/step_definitions/rack_jekyll_steps.rb
|
97
108
|
- features/support/env.rb
|
98
109
|
- lib/rack/jekyll.rb
|
99
|
-
- lib/rack/jekyll/ext.rb
|
100
110
|
- lib/rack/jekyll/filehandler.rb
|
101
|
-
- lib/rack/jekyll/
|
111
|
+
- lib/rack/jekyll/utils.rb
|
102
112
|
- lib/rack/jekyll/version.rb
|
113
|
+
- lib/rack/templates/wait.html
|
103
114
|
- rack-jekyll.gemspec
|
104
115
|
- test/helper.rb
|
105
116
|
- test/source/_config.yml
|
@@ -116,6 +127,7 @@ files:
|
|
116
127
|
- test/test_configuration.rb
|
117
128
|
- test/test_filehandler.rb
|
118
129
|
- test/test_requests.rb
|
130
|
+
- test/test_utils.rb
|
119
131
|
homepage: https://github.com/adaoraul/rack-jekyll
|
120
132
|
licenses: []
|
121
133
|
metadata: {}
|
@@ -129,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
141
|
requirements:
|
130
142
|
- - ">="
|
131
143
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
144
|
+
version: 1.9.3
|
133
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
146
|
requirements:
|
135
147
|
- - ">="
|
@@ -137,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
149
|
version: 1.3.6
|
138
150
|
requirements: []
|
139
151
|
rubyforge_project: rack-jekyll
|
140
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.5.1
|
141
153
|
signing_key:
|
142
154
|
specification_version: 4
|
143
155
|
summary: Transform your Jekyll app into a Rack application.
|
@@ -157,6 +169,7 @@ test_files:
|
|
157
169
|
- test/test_configuration.rb
|
158
170
|
- test/test_filehandler.rb
|
159
171
|
- test/test_requests.rb
|
172
|
+
- test/test_utils.rb
|
160
173
|
- features/requests.feature
|
161
174
|
- features/step_definitions/rack_jekyll_steps.rb
|
162
175
|
- features/support/env.rb
|
data/lib/rack/jekyll/ext.rb
DELETED
data/lib/rack/jekyll/helpers.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Rack
|
2
|
-
class Jekyll
|
3
|
-
def mime(filename)
|
4
|
-
ext = ::File.extname(filename)
|
5
|
-
|
6
|
-
Rack::Mime.mime_type(ext)
|
7
|
-
end
|
8
|
-
|
9
|
-
def file_info(path)
|
10
|
-
expand_path = ::File.expand_path(path)
|
11
|
-
::File.open(expand_path, 'r') do |f|
|
12
|
-
{:body => f.read, :time => f.mtime.httpdate, :expand_path => expand_path}
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|