Module: OnContainer::Dev::RailsOps

Defined in:
lib/on_container/dev/rails_ops.rb

Instance Method Summary collapse

Instance Method Details

#rails?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/on_container/dev/rails_ops.rb', line 10

def rails?
  ARGV[0] == 'rails'
end

#rails_server?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/on_container/dev/rails_ops.rb', line 14

def rails_server?
  rails? && %w[server s].include?(ARGV[1])
end

#remove_rails_pidfileObject



6
7
8
# File 'lib/on_container/dev/rails_ops.rb', line 6

def remove_rails_pidfile
  system "rm -rf #{File.expand_path('tmp/pids/server.pid')}"
end