Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure layouts are truely textual #468

Merged
merged 1 commit into from Aug 17, 2014

Conversation

@gpakosz
Copy link
Member

@gpakosz gpakosz commented Aug 12, 2014

Raise a RuntimeError when binary files are found in the layouts/ directory. Addresses #457.

@gpakosz
Copy link
Member Author

@gpakosz gpakosz commented Aug 12, 2014

I had to change file extension for layouts files created in tests.

Loading

@bobthecow
Copy link
Member

@bobthecow bobthecow commented Aug 12, 2014

👍

Loading

@@ -93,6 +93,8 @@ def load_objects(dir_name, kind, klass)
if is_binary && klass == Nanoc::Item
meta = (meta_filename && YAML.load_file(meta_filename)) || {}
content_or_filename = content_filename
elsif is_binary && klass == Nanoc::Layout
raise "The file '#{content_filename}' is a binary file. The 'layouts/' directory should contain only true textual layouts."
Copy link
Member

@ddfreyne ddfreyne Aug 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure about the wording here. What about:

The layout file '#{content_filename}' is a binary file, but layouts can only be textual.

Loading

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Aug 16, 2014

Looks good apart from my remark.

Loading

@gpakosz
Copy link
Member Author

@gpakosz gpakosz commented Aug 17, 2014

Changed the wording.

Loading

@ddfreyne ddfreyne removed the waiting label Aug 17, 2014
@ddfreyne ddfreyne added this to the 3.7.2 milestone Aug 17, 2014
ddfreyne added a commit that referenced this issue Aug 17, 2014
Ensure layouts are truely textual
@ddfreyne ddfreyne merged commit ad5a86a into nanoc:release-3.7.x Aug 17, 2014
1 check passed
Loading
@gpakosz gpakosz deleted the textual-layouts-only branch Sep 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants