Method: Spring::Client::Binstub#generate_binstub
- Defined in:
- lib/spring/client/binstub.rb
#generate_binstub(name, command) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/spring/client/binstub.rb', line 56 def generate_binstub(name, command) File.write(bindir.join(name), <<CODE) #!/usr/bin/env ruby if !Process.respond_to?(:fork) || Gem::Specification.find_all_by_name("spring").empty? #{fallback(name, command).strip.gsub(/^/, " ")} else ARGV.unshift "#{name}" load Gem.bin_path("spring", "spring") end CODE bindir.join(name).chmod 0755 end |