Browse files

Ensure we don't check if nil exists or try to push up false

  • Loading branch information...
1 parent 3a6d6bc commit ca2dd1525299f0409e9c9221aef595c569dec18c @jstorimer committed Mar 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/spin
View
4 bin/spin
@@ -196,15 +196,15 @@ def push
#
# We build a string like `file1.rb|file2.rb` and pass it up to the server.
f = files_to_load.map do |file|
- file = file.split(':').first
+ file = file.split(':').first.to_s
# If the file exists then we can push it up just like it is
if File.exist?(file)
file
# kicker-2.5.0 now gives us file names without extensions, so we have to try adding it
elsif File.extname(file).empty?
file = [file, 'rb'].join('.')
- File.exist?(file) && file
+ file if File.exist?(file)
end
end.compact.uniq.join(SEPARATOR)

0 comments on commit ca2dd15

Please sign in to comment.