Sha256: b85a6001c425ee1d5c55761eb839fe53f6d8791c2b798ec621938c22e3f9b626

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

require "spring/commands"

class Spring::Commands::RailsServer
  def env(*)
    "development"
  end

  def command_name
    "rails"
  end

  def exec_name
    "rails"
  end

  def gem_name
    "rails"
  end

  def call
    ARGV.unshift("server")
    load Dir.glob(::Rails.root.join("{bin,script}/rails")).first
  end
end

Spring.register_command("rails_server", Spring::Commands::RailsServer.new) if Spring.respond_to?(:register_command)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spring-commands-rails_server-0.0.2 lib/spring/commands/rails_server.rb
spring-commands-rails_server-0.0.1 lib/spring/commands/rails_server.rb