benoit 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Assetfile +14 -2
- data/Gemfile.lock +1 -1
- data/bin/benoit +5 -0
- data/lib/benoit/compiler_error.rb +8 -2
- data/lib/benoit/configuration.rb +1 -1
- data/lib/benoit/site_context.rb +3 -1
- data/lib/benoit/version.rb +1 -1
- data/spec/features/build_command.feature +30 -0
- data/spec/features/frontmatter_metadata.feature +1 -1
- data/spec/steps/staticly_steps.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWFhYmM1NDcwMDAyMjM3Nzg3M2UxYjU0YjYwZDAwN2E4ZmFmNTBmNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzQ3NmMyZTA4M2Q3ZmIyOGE5ODdmYmQ4OTZjMzQ3OTkwYjBjZmY0Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTZhZWNjZWI4ZTVmMmRmMDg5YzdkZWU2OTkyYzMwYzdiYzYwM2QwMTg3YmYy
|
10
|
+
ZjkyZGZhMDMzNDkwNWI1ZDU5MmJlY2RjMjExNzU3MGRhMDY0OWZjYTVkOGQz
|
11
|
+
YzllZjJjZmMzYTVhYzIxN2VmNWRiNDU3NzZiMmQ0MGUyN2VlZmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmYzZDQ2NjYwNzY3ZTQzMGZmNTE2YmM4ZjAzZjRmNDljMzZlNTZmZmUyYzMx
|
14
|
+
MThlZmZjMmMxYTM4ODkyZGIxY2I5YmIwM2IwZjQ1MTZiYTIzMGYwM2I0YTgy
|
15
|
+
M2I0YjM5MDI0YTRjYTlmMWE1MDEzZmJlZWQwZDcyYjIyNDYxNDg=
|
data/Assetfile
CHANGED
@@ -5,8 +5,20 @@ before_filter Benoit::Filters::MetadataCleaner
|
|
5
5
|
input Dir.pwd do
|
6
6
|
|
7
7
|
reject "_*"
|
8
|
-
reject "
|
9
|
-
|
8
|
+
reject "_build/**/*"
|
9
|
+
|
10
|
+
default_ignores = %w(.git .gitignore Gemfile Gemfile.lock .bundle)
|
11
|
+
|
12
|
+
ignores =
|
13
|
+
if File.exist?(Benoit.config.ignorefile)
|
14
|
+
ignores = File.read(Benoit.config.ignorefile).split("\n")
|
15
|
+
else
|
16
|
+
[]
|
17
|
+
end
|
18
|
+
|
19
|
+
ignores.concat(default_ignores).each do |ignored|
|
20
|
+
reject ignored
|
21
|
+
end
|
10
22
|
|
11
23
|
match "**/*{.markdown,.md,.mkdown,.mdown}" do
|
12
24
|
filter Benoit::Filters::MarkdownFilter
|
data/Gemfile.lock
CHANGED
data/bin/benoit
CHANGED
@@ -36,6 +36,10 @@ command :build do |c|
|
|
36
36
|
c.desc 'Clean up (delete) any existing build files for this site before building'
|
37
37
|
c.switch :clean
|
38
38
|
|
39
|
+
c.desc 'Name of file containing files that should not be copied or processed to output directory'
|
40
|
+
c.default_value '.benoitignore'
|
41
|
+
c.flag [:g, :"ignorefile"]
|
42
|
+
|
39
43
|
c.desc 'Describe a flag to build'
|
40
44
|
c.default_value 'default'
|
41
45
|
c.flag :f
|
@@ -49,6 +53,7 @@ command :build do |c|
|
|
49
53
|
Dir.chdir(site_path) do
|
50
54
|
Benoit.configure do |config|
|
51
55
|
config.clean_before_build = options[:clean]
|
56
|
+
config.ignorefile = options[:"ignorefile"]
|
52
57
|
end
|
53
58
|
project = Benoit::PipelineProject.new(assetfile_path, Benoit.config.output_path, Benoit.config.cache_path)
|
54
59
|
project.invoke
|
@@ -7,9 +7,15 @@
|
|
7
7
|
#
|
8
8
|
|
9
9
|
class StandardError
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
def message
|
12
|
+
@message || "Staticly has encountered an internal error. Please contact @staticlyapp on Twitter to resolve this problem."
|
13
|
+
end
|
14
|
+
|
15
|
+
def type
|
16
|
+
"error"
|
12
17
|
end
|
18
|
+
|
13
19
|
end
|
14
20
|
|
15
21
|
module Benoit
|
data/lib/benoit/configuration.rb
CHANGED
data/lib/benoit/site_context.rb
CHANGED
data/lib/benoit/version.rb
CHANGED
@@ -24,6 +24,36 @@ Feature: benoit build
|
|
24
24
|
And I build the site with the flag "--clean"
|
25
25
|
Then that file should not exist in the output site
|
26
26
|
|
27
|
+
Scenario: Builds without any content pages
|
28
|
+
Given a file with an extension of ".html" with content:
|
29
|
+
"""
|
30
|
+
before
|
31
|
+
{% for post in site.posts %}
|
32
|
+
blah
|
33
|
+
{% endfor %}
|
34
|
+
after
|
35
|
+
"""
|
36
|
+
When I build the site
|
37
|
+
Then the output file should only have content:
|
38
|
+
"""
|
39
|
+
before
|
40
|
+
|
41
|
+
after
|
42
|
+
"""
|
43
|
+
|
44
|
+
Scenario: Does not copy any files in .benoitignore
|
45
|
+
Given a file named ".benoitignore" with content:
|
46
|
+
"""
|
47
|
+
a.sh
|
48
|
+
"""
|
49
|
+
And a file named "a.sh" with content:
|
50
|
+
"""
|
51
|
+
testing
|
52
|
+
"""
|
53
|
+
When I build the site
|
54
|
+
Then the file "a.sh" should not exist in the output site
|
55
|
+
And the file ".benoitignore" should not exist in the output site
|
56
|
+
|
27
57
|
@backlog
|
28
58
|
Scenario: Override default output path
|
29
59
|
When I run `benoit build --output-path _compiled`
|
@@ -145,7 +145,7 @@ module BenoitSteps
|
|
145
145
|
create_file_for_page @page
|
146
146
|
end
|
147
147
|
|
148
|
-
step "a file
|
148
|
+
step "a file with an extension of :extname with content:" do |extname, content|
|
149
149
|
@page = Page.new
|
150
150
|
@page.generate_name(extname)
|
151
151
|
@site.add_page @page
|
@@ -177,6 +177,11 @@ module BenoitSteps
|
|
177
177
|
write_file("img.png", img_content)
|
178
178
|
end
|
179
179
|
|
180
|
+
step "the file :named should not exist in the output site" do |filename|
|
181
|
+
path = File.join("_build", filename)
|
182
|
+
step 'a file named "%s" should not exist' % path
|
183
|
+
end
|
184
|
+
|
180
185
|
step "that file should not exist in the output site" do
|
181
186
|
path = File.join("_build", @page.name)
|
182
187
|
step 'a file named "%s" should not exist' % path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benoit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Fiorini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|