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

New feature: Add directory() config[:exclude_pattern] #313

Merged
merged 1 commit into from Mar 5, 2013

Conversation

elgalu
Copy link
Contributor

@elgalu elgalu commented Mar 4, 2013

Add directory() config[:exclude_pattern] to prevent copying files that match certain regexp.
See spec.

@eventualbuddha
Copy link
Contributor

Out of curiosity, why do you need this?

@elgalu
Copy link
Contributor Author

elgalu commented Mar 4, 2013

To avoid copying files .git/ files from a template.

First i added the .git filter but then realized that something more generic was better.

I use this for another gem:
https://github.com/elgalu/gem-newgem

Use thor to bootstrap but needed to skip .git/ directory, since the template is from a git repo:
https://github.com/elgalu/newgem-template

How the directory() call looks like:
directory template_name, gem_name, :exclude_pattern => /.git//

@eventualbuddha
Copy link
Contributor

LGTM, what do you think, @sferik?

@coveralls
Copy link

Coverage increased (+0.01%) when pulling a38446e on elgalu:option_exclude_pattern into d46dc56 on wycats:master.

View Details

@sferik
Copy link
Contributor

sferik commented Mar 5, 2013

Merging!

sferik added a commit that referenced this pull request Mar 5, 2013
New feature: Add directory() config[:exclude_pattern]
@sferik sferik merged commit 28201b7 into rails:master Mar 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants