Permalink
Browse files

Use File.writable? because File.exist? with two args does not exist.

  • Loading branch information...
1 parent 42d8345 commit cf947e2a687c0993ee046eec962c65a7335737be @jmhodges jmhodges committed Mar 27, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/harker/gemify.rb
View
@@ -4,8 +4,8 @@ module Harker
def self.gemify(rails_root)
project_name = File.basename(rails_root)
- if File.exist?(rails_root + "/bin/#{project_name}", 'w') or
- File.exist?(rails_root + "/lib/#{project_name}.rb", 'w')
+ if File.writable?(rails_root + "/bin/#{project_name}") or
+ File.writable?(rails_root + "/lib/#{project_name}.rb")
abort "Can't write gem files without overwriting existing ones.
Try manually gemifying."
end

0 comments on commit cf947e2

Please sign in to comment.