DannyBen/jobly

View on GitHub
Runfile

Summary

Maintainability
Test Coverage
require 'debug'
require 'jobly/version'

title   "Jobly Developer Toolbelt"
summary "Runfile tasks for building the Jobly gem"
version Jobly::VERSION

import_gem 'runfile-tasks/gem'
import 'debug'

help   "Run foreman start"
action :foreman, :f do
  exec "foreman start"
end

help   "Run server"
action :server, :s do
  exec "bundle exec jobly server"
end

help   "Flush redis"
action :flush do
  exec "redis-cli -n 0 flushall"
end

help   "Run interactive console"
action :console, :c do
  exec "bundle exec bin/console"
end

help   "Run test mock server"
usage  "mockserver"
action :mockserver do |args|
  ENV['SINATRA_ACTIVESUPPORT_WARNING'] = 'false'
  exec "bundle exec ruby spec/support/mock_server.rb"
end