Skip to content

Commit

Permalink
Merge pull request #35 from vivekkhokhar/master
Browse files Browse the repository at this point in the history
kicker-2.5.0 spin push compatibility
  • Loading branch information
jstorimer committed Mar 15, 2012
2 parents 9f46128 + 39a762d commit 18de184
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bin/spin
Expand Up @@ -195,7 +195,20 @@ def push
# bit will just be ignored.
#
# We build a string like `file1.rb|file2.rb` and pass it up to the server.
f = files_to_load.select { |f| File.exist?(f.split(':')[0].to_s) }.uniq.join(SEPARATOR)
f = files_to_load.collect do |f|
f = f.split(':')[0].to_s
if File.exist?(f)
f # default behavior
elsif File.extname(f).length == 0 #file without extension
f = "#{f}.rb" # try .rb extension
if File.exist?(f)
f
else
nil #fallback to default behavior
end
end
end.compact.uniq.join(SEPARATOR)

abort if f.empty?
puts "Spinning up #{f}"

Expand Down

0 comments on commit 18de184

Please sign in to comment.