Sha256: 6ac2d068ca480f88af1ceeb546208e5c0aa24e82f73a40a3be2840fd98c02d1f

Contents?: true

Size: 626 Bytes

Versions: 7

Compression:

Stored size: 626 Bytes

Contents

# encoding: UTF-8

class Treet::Gitfarm < Treet::Farm
  attr_reader :author

  def initialize(opts)
    raise ArgumentError, "No git farm without an author for commits" unless opts[:author]
    super
    @repotype = Treet::Gitrepo
    @author = opts[:author]
  end

  def self.plant(opts)
    super(opts.merge(:repotype => Treet::Gitrepo))
  end

  def repos
    super(:author => author)
  end

  def repo(id, opts = {})
    super(id, opts.merge(:author => author))
  end

  def add(hash, opts = {})
    repo = super(hash, opts.merge(:author => author))
    if opts[:tag]
      repo.tag(opts[:tag])
    end
    repo
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
treet-0.18.0 lib/treet/gitfarm.rb
treet-0.17.1 lib/treet/gitfarm.rb
treet-0.15.0 lib/treet/gitfarm.rb
treet-0.14.1 lib/treet/gitfarm.rb
treet-0.14.0 lib/treet/gitfarm.rb
treet-0.13.1 lib/treet/gitfarm.rb
treet-0.11.0 lib/treet/gitfarm.rb