Skip to content

Commit

Permalink
Remove config/stuff.yml from the .gitignore file on a gem install so …
Browse files Browse the repository at this point in the history
…that it is easier to deploy.
  • Loading branch information
Steven Heidel committed Jul 21, 2010
1 parent 7453c36 commit 6a5e226
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -56,8 +56,9 @@ tags
# Capybara Bug
capybara-*html

#===REMOVED DURING REFINERY GEM INSTALL===
# Development Specific
# REMOVE IF UPLOADING TO SERVER
config/database.yml
config/amazon_s3.yml
config/rackspace_cloudfiles.yml
config/rackspace_cloudfiles.yml
#===END OF REMOVED DURING REFINERY GEM INSTALL===
10 changes: 9 additions & 1 deletion bin/refinerycms
Expand Up @@ -34,7 +34,7 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
FileUtils::makedirs rails_root

# copy in all of the relevant directories and root files.
to_copy = %w(app config db lib public themes script *.md Rakefile .gitignore config.ru asdas).map do |dir|
to_copy = %w(app config db lib public themes script *.md Rakefile config.ru).map do |dir|
(new_file_path = refinery_root.join(dir)).exist? ? new_file_path.to_s : nil
end
FileUtils::cp_r to_copy.compact, rails_root, :verbose => false
Expand Down Expand Up @@ -112,6 +112,14 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
app_gemfile = File.open(File.join(%W(#{rails_root} Gemfile)), "w")
app_gemfile.puts(lines.join("\n"))
app_gemfile.close

# Remove development specific stuff from the .gitinore file
ignore_content = refinery_root.join('.gitignore').read
ignore_content.gsub!(/#===REMOVED DURING REFINERY GEM INSTALL===.*#===END OF REMOVED DURING REFINERY GEM INSTALL===/m, '')

File.open(File.join(%W(#{rails_root} .gitignore)), "w") do |f|
f.puts(ignore_content)
end

puts "\n---------"
puts "Refinery successfully installed in '#{rails_root}'!\n\n"
Expand Down

0 comments on commit 6a5e226

Please sign in to comment.