Sha256: 315c4c9ebcd5fb7a2ab7d13462986f668bf4cc11df29a44b9a2e64a7058b7a21

Contents?: true

Size: 360 Bytes

Versions: 4

Compression:

Stored size: 360 Bytes

Contents

require File.join(File.dirname(__FILE__), "key")
class Octopi::DeployKeySet < Array
  include Octopi
  attr_accessor :repository

  def initialize(repo, keys)
    self.repository = repo
    super keys
  end

  def find(title)
    detect {|key| key.title == title}
  end

  def add(options={})
    DeployKey.create(options.merge(:repo => repository))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dcuddeback-octopi-0.2.12 lib/octopi/deploy_key_set.rb
dcuddeback-octopi-0.2.11 lib/octopi/deploy_key_set.rb
dcuddeback-octopi-0.2.9 lib/octopi/deploy_key_set.rb
dcuddeback-octopi-0.2.8 lib/octopi/deploy_key_set.rb