diff options
Diffstat (limited to 'lib/leap_ca/pool.rb')
-rw-r--r-- | lib/leap_ca/pool.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/leap_ca/pool.rb b/lib/leap_ca/pool.rb index 76c1963..c80206a 100644 --- a/lib/leap_ca/pool.rb +++ b/lib/leap_ca/pool.rb @@ -2,18 +2,19 @@ require 'yaml' module LeapCA class Pool - def initialize(filename) - @config = YAML.load(File.open(filename, 'r')) + def initialize(config = {:size => 10}) + @config = config end def fill while Cert.count < self.size do - Cert.create! + cert = Cert.create! + puts " * Created client certificate #{cert.id}" end end def size - @config[:size] ||= 10 + @config[:size] end end end |