diff options
author | elijah <elijah@riseup.net> | 2012-11-12 23:53:51 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-11-12 23:53:51 -0800 |
commit | c37a35df81b2d6becc09f1820240db24c3ec632c (patch) | |
tree | 50187e4ab1face237760614ecf844b42efdd51e1 /lib/leap_ca/pool.rb | |
parent | c90d30621e042cc3e52ffc87e3491ab110a57e9e (diff) |
first fully working version of leap_ca
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 |