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

Permit included rules files to define their own preprocess block #420

Merged
merged 1 commit into from May 1, 2014

Conversation

Projects
None yet
2 participants
@gpakosz
Member

gpakosz commented Apr 13, 2014

Within a rules file, behavior when defining two preprocessor blocks is unchanged: defining another processor block overrides the previous one.

This follows up on #413.

Permit included rules files to define their own preprocess block
Within a rules file, behavior when defining two preprocessor blocks is
unchanged: defining another processor block overrides the previous one.
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 16, 2014

Member

Looks good so far. Will probably play around with this and merge it later this week.

Member

ddfreyne commented Apr 16, 2014

Looks good so far. Will probably play around with this and merge it later this week.

@gpakosz

This comment has been minimized.

Show comment
Hide comment
@gpakosz

gpakosz Apr 16, 2014

Member

@ddfreyne If you look at the implementation of parse, you'll notice rules_filename is an absolute path (because I need to identify various rules files to ensure per file preprocessor block unicity). Are you fine with this? From within Rules, if you puts __FILE__, dsl.instance_eval(@data, rules_filename) makes __FILE__ being an absolute path instead of ./Rules.

Should I make it relative to the site directory?

Member

gpakosz commented Apr 16, 2014

@ddfreyne If you look at the implementation of parse, you'll notice rules_filename is an absolute path (because I need to identify various rules files to ensure per file preprocessor block unicity). Are you fine with this? From within Rules, if you puts __FILE__, dsl.instance_eval(@data, rules_filename) makes __FILE__ being an absolute path instead of ./Rules.

Should I make it relative to the site directory?

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 17, 2014

Member

@gpakosz I think it is fine the way it is now.

Member

ddfreyne commented Apr 17, 2014

@gpakosz I think it is fine the way it is now.

@gpakosz

This comment has been minimized.

Show comment
Hide comment
@gpakosz

gpakosz Apr 17, 2014

Member

👌

Member

gpakosz commented Apr 17, 2014

👌

ddfreyne added a commit that referenced this pull request May 1, 2014

Merge pull request #420 from gpakosz/per-rules-file-preprocessor
Permit included rules files to define their own preprocess block

@ddfreyne ddfreyne merged commit 6751628 into nanoc:master May 1, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@ddfreyne ddfreyne removed the to review label May 1, 2014

@gpakosz gpakosz deleted the gpakosz:per-rules-file-preprocessor branch Jul 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment