Skip to content

Add dotfiles option #17

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

Closed
wants to merge 2 commits into from
Closed

Conversation

steve-redka
Copy link
Contributor

#7

GitRepo was silently failing for me, so I changed that too

@@ -27,6 +27,15 @@ def file(*files)
options[:fail] ? abort(diff) : puts(diff)
end

desc "dotfiles", "Compare dotfiles in your repository with Rails' generated versions"
def dotfiles
dotfiles = Dir.glob("**/.*").reject do |path|
Copy link
Owner

Choose a reason for hiding this comment

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

This isn't exactly what I had in mind. It should be all dotfiles in the toplevel dir. It should also include files inside folders like .github and similar.

I'd like to reject files in .gitignore too.

Maybe we should delegate this to Git?

git ls-files --cached --others --exclude-standard -- '.*'

@MatheusRich
Copy link
Owner

@steve-redka I've incorporated your changes here 4e34111. Thank you!

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.

2 participants