Permalink
Browse files

Merge pull request #35 from vivekkhokhar/master

kicker-2.5.0 spin push compatibility
  • Loading branch information...
2 parents 9f46128 + 39a762d commit 18de184f5aa37deb95e0012515bf58a5374411ed @jstorimer jstorimer committed Mar 15, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 bin/spin
View
@@ -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}"

0 comments on commit 18de184

Please sign in to comment.