Sha256: 3e1b8d13b12d690f67dce5c695c8f73e5623d5a3320d5b1eb89f1eef8667c42b
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
# a minor extension for the application class. Rails::Application.class_eval do ## # Is the rails server running? def running? path = File.join(Rails.root, 'tmp/pids/server.pid') pid = File.exist?(path) ? File.read(path).to_i : -1 server_running = true begin Process.getpgid pid rescue Errno::ESRCH server_running = false end server_running end ## # Gets the application name. # # This should be overridden in your +application.rb+ file. def app_name 'BarkerEST' end ## # Gets the application version. # # This should be overridden in your +application.rb+ file. def app_version '0.0.1' end ## # Gets the company responsible for the application. # # This should be overridden in your +application.rb+ file. def app_company 'BarkerEST' end ## # Gets the application name and version. # # This can be overridden in your +application.rb+ file if you want a different behavior. def app_info "#{app_name} v#{app_version}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
barkest_core-1.5.4.0 | lib/barkest_core/extensions/application_extensions.rb |
barkest_core-1.5.3.0 | lib/barkest_core/extensions/application_extensions.rb |