Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Removed memoization [Foreman::Utils.parse_concurrency] #87

Merged
merged 1 commit into from Oct 19, 2011
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Split
View
@@ -3,7 +3,7 @@
class Foreman::Utils
def self.parse_concurrency(concurrency)
- @concurrency ||= begin
+ begin
pairs = concurrency.to_s.gsub(/\s/, "").split(",")
pairs.inject(Hash.new(1)) do |hash, pair|
process, amount = pair.split("=")
@@ -12,7 +12,7 @@
before(:each) { stub(bluepill).say }
it "exports to the filesystem" do
- bluepill.export("/tmp/init")
+ bluepill.export("/tmp/init", :concurrency => "alpha=2")
File.read("/tmp/init/app.pill").should == example_export_file("bluepill/app.pill")
end
@@ -12,7 +12,7 @@
before(:each) { stub(upstart).say }
it "exports to the filesystem" do
- upstart.export("/tmp/init")
+ upstart.export("/tmp/init", :concurrency => "alpha=2")
File.read("/tmp/init/app.conf").should == example_export_file("upstart/app.conf")
File.read("/tmp/init/app-alpha.conf").should == example_export_file("upstart/app-alpha.conf")