Permalink
Browse files

create a default .gitignore file

when create a extension using skeleton it now creates a default
.gitignore file.

Fix #15.
  • Loading branch information...
1 parent da852cd commit 9602960da44eb35f608d1fadac6a4c6e60f22e1e @guedes guedes committed Sep 19, 2011
Showing with 15 additions and 1 deletion.
  1. +8 −0 lib/pgxn_utils/templates/root/.gitignore.tt
  2. +7 −1 spec/cli_spec.rb
View
8 lib/pgxn_utils/templates/root/.gitignore.tt
@@ -0,0 +1,8 @@
+results/
+*.so
+tmp/
+*.o
+regression.diffs
+regression.out
+/sql/<%= extension_name =>--*
+!/sql/<%= extension_name =>--*--*.sql
View
8 spec/cli_spec.rb
@@ -2,7 +2,12 @@
describe PgxnUtils::CLI do
+ before(:all) do
+ system "mv META.json meta.json"
+ end
+
after(:all) do
+ system "mv meta.json META.json"
system "rm -rf /tmp/extension.*"
system "rm -rf extension.*"
end
@@ -62,7 +67,8 @@
extension = next_extension
skeleton extension
- Dir["#{extension}/**/*"].sort.should == [
+ Dir["#{extension}/**/{*,.gitignore}"].sort.should == [
+ "#{extension}/.gitignore",
"#{extension}/META.json",
"#{extension}/Makefile",
"#{extension}/README.md",

0 comments on commit 9602960

Please sign in to comment.