remove json export
This commit is contained in:
1 parent
95115f4e78
commit
564aa740e1
7 files changed
+1
-43
No files matched your search
@@ -12,7 +12,6 @@ GEM
|
|||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
fakefs (0.2.1)
|
fakefs (0.2.1)
|
||||||
hpricot (0.8.2)
|
hpricot (0.8.2)
|
||||||
json (1.5.1)
|
|
||||||
mime-types (1.16)
|
mime-types (1.16)
|
||||||
mustache (0.11.2)
|
mustache (0.11.2)
|
||||||
parka (0.6.2)
|
parka (0.6.2)
|
||||||
@@ -47,7 +46,6 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
fakefs (~> 0.2.1)
|
fakefs (~> 0.2.1)
|
||||||
json (~> 1.5.1)
|
|
||||||
foreman!
|
foreman!
|
||||||
parka
|
parka
|
||||||
rake
|
rake
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ Gem::Specification.new do |gem|
|
|||||||
gem.files = Dir["**/*"].select { |d| d =~ %r{^(README|bin/|data/|ext/|lib/|spec/|test/)} }
|
gem.files = Dir["**/*"].select { |d| d =~ %r{^(README|bin/|data/|ext/|lib/|spec/|test/)} }
|
||||||
gem.files << "man/foreman.1"
|
gem.files << "man/foreman.1"
|
||||||
|
|
||||||
gem.add_dependency 'json', '~> 1.5.1'
|
|
||||||
gem.add_dependency 'term-ansicolor', '~> 1.0.5'
|
gem.add_dependency 'term-ansicolor', '~> 1.0.5'
|
||||||
gem.add_dependency 'thor', '>= 0.13.6'
|
gem.add_dependency 'thor', '>= 0.13.6'
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class Foreman::CLI < Thor
|
|||||||
check_procfile!
|
check_procfile!
|
||||||
|
|
||||||
formatter = case format
|
formatter = case format
|
||||||
when "json" then Foreman::Export::JSON
|
|
||||||
when "inittab" then Foreman::Export::Inittab
|
when "inittab" then Foreman::Export::Inittab
|
||||||
when "upstart" then Foreman::Export::Upstart
|
when "upstart" then Foreman::Export::Upstart
|
||||||
else error "Unknown export format: #{format}."
|
else error "Unknown export format: #{format}."
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ module Foreman::Export
|
|||||||
class Exception < ::Exception; end
|
class Exception < ::Exception; end
|
||||||
end
|
end
|
||||||
|
|
||||||
require "foreman/export/json"
|
|
||||||
require "foreman/export/inittab"
|
require "foreman/export/inittab"
|
||||||
require "foreman/export/upstart"
|
require "foreman/export/upstart"
|
||||||
@@ -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
|
|
||||||
+1
-17
@@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "FOREMAN" "1" "March 2011" "Foreman 0.12.0.pre1" "Foreman Manual"
|
.TH "FOREMAN" "1" "May 2011" "Foreman 0.12.0" "Foreman Manual"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBforeman\fR \- manage Procfile\-based applications
|
\fBforeman\fR \- manage Procfile\-based applications
|
||||||
@@ -75,9 +75,6 @@ Specify an alternate location for the application\'s Procfile\. This file\'s con
|
|||||||
foreman currently supports the following output formats:
|
foreman currently supports the following output formats:
|
||||||
.
|
.
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
json
|
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
|
||||||
inittab
|
inittab
|
||||||
.
|
.
|
||||||
.IP "\(bu" 4
|
.IP "\(bu" 4
|
||||||
@@ -85,19 +82,6 @@ upstart
|
|||||||
.
|
.
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.
|
||||||
.SH "JSON EXPORT"
|
|
||||||
Will export your processes as JSON:
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
{ "web": { "command": "bundle exec thin start" } }
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.SH "INITTAB EXPORT"
|
.SH "INITTAB EXPORT"
|
||||||
Will export a chunk of inittab\-compatible configuration:
|
Will export a chunk of inittab\-compatible configuration:
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -75,18 +75,10 @@ These options control all modes of foreman's operation.
|
|||||||
|
|
||||||
foreman currently supports the following output formats:
|
foreman currently supports the following output formats:
|
||||||
|
|
||||||
* json
|
|
||||||
|
|
||||||
* inittab
|
* inittab
|
||||||
|
|
||||||
* upstart
|
* upstart
|
||||||
|
|
||||||
## JSON EXPORT
|
|
||||||
|
|
||||||
Will export your processes as JSON:
|
|
||||||
|
|
||||||
{ "web": { "command": "bundle exec thin start" } }
|
|
||||||
|
|
||||||
## INITTAB EXPORT
|
## INITTAB EXPORT
|
||||||
|
|
||||||
Will export a chunk of inittab-compatible configuration:
|
Will export a chunk of inittab-compatible configuration:
|
||||||
|
|||||||
Reference in new issue
Block a user