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 commented Aug 12, 2014

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

@bobthecow
Copy link
Member

👍

@@ -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

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.

@denisdefreyne
Copy link
Member

Looks good apart from my remark.

@gpakosz
Copy link
Member Author

gpakosz commented Aug 17, 2014

Changed the wording.

@denisdefreyne denisdefreyne added this to the 3.7.2 milestone Aug 17, 2014
denisdefreyne added a commit that referenced this pull request Aug 17, 2014
Ensure layouts are truely textual
@denisdefreyne denisdefreyne merged commit ad5a86a into nanoc:release-3.7.x Aug 17, 2014
@gpakosz gpakosz deleted the textual-layouts-only branch September 6, 2014 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants