Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Whitespace in Procfile #69

Merged
merged 2 commits into from

2 participants

@greinacker

This bit me when I first started with Foreman, so I thought a patch might be in order. Allows the Procfile to have tabs in addition to spaces around the : - for example,

web: rails server

or

web:\t rails server

will now both work equally well.

@greinacker

It's worth noting that I ran into this when creating my first Procfile, based on reading the blog post:

http://blog.daviddollar.org/2011/05/06/introducing-foreman.html

In the post, it shows the following Procfile:

web:    bundle exec thin start -p $PORT
worker: bundle exec rake resque:work QUEUE=*
clock:  bundle exec rake resque:scheduler

I saw the commands lining up, and thought that looked nice, so I made it so. However, when I created mine I had my editor set to use tabs instead of spaces for that kind of file, which led to the problem.

@ddollar ddollar merged commit f754208 into from
@ddollar
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 11, 2011
  1. @greinacker
  2. @greinacker

    update authors list

    greinacker authored
This page is out of date. Refresh to see the latest.
View
1  README.markdown
@@ -32,6 +32,7 @@ Patches contributed by:
* Ricardo Chimal, Jr
* Thom May
* clifff
+* Greg Reinacker
## License
View
2  lib/foreman/engine.rb
@@ -30,7 +30,7 @@ def processes
@order = []
procfile.split("\n").inject({}) do |hash, line|
next hash if line.strip == ""
- name, command = line.split(/ *: +/, 2)
+ name, command = line.split(/\s*:\s+/, 2)
unless command
warn_deprecated_procfile!
name, command = line.split(/ +/, 2)
View
2  spec/spec_helper.rb
@@ -28,7 +28,7 @@ def write_procfile(procfile="Procfile")
File.open(procfile, "w") do |file|
file.puts "alpha: ./alpha"
file.puts "\n"
- file.puts "bravo: ./bravo"
+ file.puts "bravo:\t./bravo"
end
File.expand_path(procfile)
end
Something went wrong with that request. Please try again.