summaryrefslogtreecommitdiff
path: root/lib/leap_ca/pool.rb
blob: c80206a7bb982a08571850afd383502cb0912627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'yaml'

module LeapCA
  class Pool
    def initialize(config = {:size => 10})
      @config = config
    end

    def fill
      while Cert.count < self.size do
        cert = Cert.create!
        puts " * Created client certificate #{cert.id}"
      end
    end

    def size
      @config[:size]
    end
  end
end