Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4de19f4da | ||
|
|
490c8b73bf | ||
|
|
f622f43cf4 | ||
|
|
9ab701f5b9 | ||
|
|
1a5d2428b9 | ||
|
|
564aa740e1 | ||
|
|
95115f4e78 |
@@ -1,18 +1,3 @@
|
|||||||
source "http://rubygems.org"
|
source "http://rubygems.org"
|
||||||
|
|
||||||
group :development do
|
gemspec
|
||||||
gem 'parka'
|
|
||||||
gem 'rake'
|
|
||||||
gem 'ronn'
|
|
||||||
end
|
|
||||||
|
|
||||||
group :test do
|
|
||||||
gem 'fakefs', '~> 0.2.1'
|
|
||||||
gem 'rcov', '~> 0.9.8'
|
|
||||||
gem 'rr', '~> 1.0.2'
|
|
||||||
gem 'rspec', '~> 2.0.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
gem 'json', '~> 1.5.1'
|
|
||||||
gem 'term-ansicolor', '~> 1.0.5'
|
|
||||||
gem 'thor', '>= 0.13.6'
|
|
||||||
|
|||||||
+12
-6
@@ -1,19 +1,27 @@
|
|||||||
|
PATH
|
||||||
|
remote: .
|
||||||
|
specs:
|
||||||
|
foreman (0.13.1)
|
||||||
|
term-ansicolor (~> 1.0.5)
|
||||||
|
thor (>= 0.13.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
crack (0.1.8)
|
||||||
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.3.1)
|
parka (0.6.2)
|
||||||
|
crack
|
||||||
rest-client
|
rest-client
|
||||||
thor
|
thor
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
rcov (0.9.8)
|
rcov (0.9.8)
|
||||||
rdiscount (1.6.5)
|
rdiscount (1.6.5)
|
||||||
rest-client (1.6.0)
|
rest-client (1.6.1)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
ronn (0.7.3)
|
ronn (0.7.3)
|
||||||
hpricot (>= 0.8.2)
|
hpricot (>= 0.8.2)
|
||||||
@@ -38,12 +46,10 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
fakefs (~> 0.2.1)
|
fakefs (~> 0.2.1)
|
||||||
json (~> 1.5.1)
|
foreman!
|
||||||
parka
|
parka
|
||||||
rake
|
rake
|
||||||
rcov (~> 0.9.8)
|
rcov (~> 0.9.8)
|
||||||
ronn
|
ronn
|
||||||
rr (~> 1.0.2)
|
rr (~> 1.0.2)
|
||||||
rspec (~> 2.0.0)
|
rspec (~> 2.0.0)
|
||||||
term-ansicolor (~> 1.0.5)
|
|
||||||
thor (>= 0.13.6)
|
|
||||||
|
|||||||
@@ -33,19 +33,23 @@ task :man do
|
|||||||
ENV['RONN_MANUAL'] = "Foreman Manual"
|
ENV['RONN_MANUAL'] = "Foreman Manual"
|
||||||
ENV['RONN_ORGANIZATION'] = "Foreman #{Foreman::VERSION}"
|
ENV['RONN_ORGANIZATION'] = "Foreman #{Foreman::VERSION}"
|
||||||
sh "ronn -w -s toc -r5 --markdown man/*.ronn"
|
sh "ronn -w -s toc -r5 --markdown man/*.ronn"
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Commit the manual to git"
|
||||||
|
task "man:commit" => :man do
|
||||||
sh "git add README.markdown"
|
sh "git add README.markdown"
|
||||||
sh "git commit -m 'update readme' || echo 'nothing to commit'"
|
sh "git commit -m 'update readme' || echo 'nothing to commit'"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Generate the Github docs"
|
desc "Generate the Github docs"
|
||||||
task :pages => :man do
|
task :pages => "man:commit" do
|
||||||
sh %{
|
sh %{
|
||||||
cp man/foreman.1.html /tmp/foreman.1.html
|
cp man/foreman.1.html /tmp/foreman.1.html
|
||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
rm ./index.html
|
rm ./index.html
|
||||||
cp /tmp/foreman.1.html ./index.html
|
cp /tmp/foreman.1.html ./index.html
|
||||||
git add -u index.html
|
git add -u index.html
|
||||||
git commit -m "rebuilding man page"
|
git commit -m "saving man page to github docs"
|
||||||
git push origin -f gh-pages
|
git push origin -f gh-pages
|
||||||
git checkout master
|
git checkout master
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,10 +16,10 @@ 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'
|
||||||
|
|
||||||
|
gem.add_development_dependency 'parka'
|
||||||
gem.add_development_dependency 'rake'
|
gem.add_development_dependency 'rake'
|
||||||
gem.add_development_dependency 'ronn'
|
gem.add_development_dependency 'ronn'
|
||||||
gem.add_development_dependency 'fakefs', '~> 0.2.1'
|
gem.add_development_dependency 'fakefs', '~> 0.2.1'
|
||||||
|
|||||||
+1
-1
@@ -2,6 +2,7 @@ require "foreman"
|
|||||||
require "foreman/engine"
|
require "foreman/engine"
|
||||||
require "foreman/export"
|
require "foreman/export"
|
||||||
require "thor"
|
require "thor"
|
||||||
|
require "yaml"
|
||||||
|
|
||||||
class Foreman::CLI < Thor
|
class Foreman::CLI < Thor
|
||||||
|
|
||||||
@@ -36,7 +37,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,5 +1,5 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.12.0"
|
VERSION = "0.13.1"
|
||||||
|
|
||||||
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.13.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