From 564aa740e1cc51eda8d1556afc565524455eac80 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Sat, 7 May 2011 14:52:25 -0400 Subject: [PATCH] remove json export --- Gemfile.lock | 2 -- foreman.gemspec | 1 - lib/foreman/cli.rb | 1 - lib/foreman/export.rb | 1 - lib/foreman/export/json.rb | 13 ------------- man/foreman.1 | 18 +----------------- man/foreman.1.ronn | 8 -------- 7 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 lib/foreman/export/json.rb diff --git a/Gemfile.lock b/Gemfile.lock index 9a7bf8b..42e664f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,7 +12,6 @@ GEM diff-lcs (1.1.2) fakefs (0.2.1) hpricot (0.8.2) - json (1.5.1) mime-types (1.16) mustache (0.11.2) parka (0.6.2) @@ -47,7 +46,6 @@ PLATFORMS DEPENDENCIES fakefs (~> 0.2.1) - json (~> 1.5.1) foreman! parka rake diff --git a/foreman.gemspec b/foreman.gemspec index a80a907..583efd1 100644 --- a/foreman.gemspec +++ b/foreman.gemspec @@ -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 << "man/foreman.1" - gem.add_dependency 'json', '~> 1.5.1' gem.add_dependency 'term-ansicolor', '~> 1.0.5' gem.add_dependency 'thor', '>= 0.13.6' diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index 8c5ccdc..42bee55 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -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}." diff --git a/lib/foreman/export.rb b/lib/foreman/export.rb index ea49dfa..e86203d 100644 --- a/lib/foreman/export.rb +++ b/lib/foreman/export.rb @@ -4,6 +4,5 @@ module Foreman::Export class Exception < ::Exception; end end -require "foreman/export/json" require "foreman/export/inittab" require "foreman/export/upstart" diff --git a/lib/foreman/export/json.rb b/lib/foreman/export/json.rb deleted file mode 100644 index afaf466..0000000 --- a/lib/foreman/export/json.rb +++ /dev/null @@ -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 diff --git a/man/foreman.1 b/man/foreman.1 index b80d911..b7a5c4b 100644 --- a/man/foreman.1 +++ b/man/foreman.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.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" \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: . .IP "\(bu" 4 -json -. -.IP "\(bu" 4 inittab . .IP "\(bu" 4 @@ -85,19 +82,6 @@ upstart . .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" Will export a chunk of inittab\-compatible configuration: . diff --git a/man/foreman.1.ronn b/man/foreman.1.ronn index 7282ef5..0224e67 100644 --- a/man/foreman.1.ronn +++ b/man/foreman.1.ronn @@ -75,18 +75,10 @@ These options control all modes of foreman's operation. foreman currently supports the following output formats: - * json - * inittab * upstart -## JSON EXPORT - -Will export your processes as JSON: - - { "web": { "command": "bundle exec thin start" } } - ## INITTAB EXPORT Will export a chunk of inittab-compatible configuration: