remove json export

This commit is contained in:
David Dollar
2011-05-07 14:52:25 -04:00
parent 95115f4e78
commit 564aa740e1
7 changed files with 1 additions and 43 deletions
-1
View File
@@ -36,7 +36,6 @@ class Foreman::CLI < Thor
check_procfile!
formatter = case format
when "json" then Foreman::Export::JSON
when "inittab" then Foreman::Export::Inittab
when "upstart" then Foreman::Export::Upstart
else error "Unknown export format: #{format}."
-1
View File
@@ -4,6 +4,5 @@ module Foreman::Export
class Exception < ::Exception; end
end
require "foreman/export/json"
require "foreman/export/inittab"
require "foreman/export/upstart"
-13
View File
@@ -1,13 +0,0 @@
require "foreman/export/base"
require "json"
class Foreman::Export::JSON < Foreman::Export::Base
def export(fname=nil, options={})
processes = engine.processes.values.inject({}) do |hash, process|
hash.update(process.name => { "command" => process.command })
end
puts processes.to_json
end
end