freireag (owner)

Revisions

gist: 189332 Download_button fork
public
Public Clone URL: git://gist.github.com/189332.git
Embed All Files: show embed
git-ignore #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env ruby -w
 
# Create a default gitignore file in the passed directory
#
# AUTHOR: Daniel Lopes
# September 10, 2009
#
# USAGE:
# git-ignore . "aditional_file1 aditional_file2"
require 'pathname'
 
file_name = Pathname.new(ARGV[0])+".gitignore"
ignore_files = ARGV[1].split(" ").join("\n")
 
content = <<FILE
config/database.yml
db/schema.rb
db/schema.sql
coverage/*
doc/*
log/*.log
log/*.out
log/*.pid
tmp/**/*
tmp/.*
tmp/profile*
uploads/*
vendor/**/**/doc/*
.DS_Store
.project
ssl/*
Icon?
#{ignore_files}
FILE
 
File.open(file_name,"w+") do |f|
  f.write(content)
end