Sha256: 3bc844ee39ff5e60b7d6804fa7da764abb17128892bd47ef4d2ab97d0fb8253c

Contents?: true

Size: 810 Bytes

Versions: 29

Compression:

Stored size: 810 Bytes

Contents

# parent class for githubtarball and forge source Repos
module Librarian
  module Puppet
    module Source
      class Repo

        attr_accessor :source, :name
        private :source=, :name=

        def initialize(source, name)
          self.source = source
          self.name = name
        end

        def environment
          source.environment
        end

        def cache_path
          @cache_path ||= source.cache_path.join(name)
        end

        def version_unpacked_cache_path(version)
          cache_path.join(version.to_s)
        end

        def vendored?(name, version)
          vendored_path(name, version).exist?
        end

        def vendored_path(name, version)
          environment.vendor_cache.join("#{name}-#{version}.tar.gz")
        end

      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
librarian-puppet-5.0.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-4.0.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-4.0.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-3.0.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-3.0.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.2.3 lib/librarian/puppet/source/repo.rb
librarian-puppet-pr328-2.2.4 lib/librarian/puppet/source/repo.rb
librarian-puppet-pr328-2.2.2 lib/librarian/puppet/source/repo.rb
librarian-puppet-pr328-2.2.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-pr328-2.2.1pr328 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.2.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.2.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.1.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-1.5.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.1.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-1.4.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.0.1 lib/librarian/puppet/source/repo.rb
librarian-puppet-1.4.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-2.0.0 lib/librarian/puppet/source/repo.rb
librarian-puppet-1.0.9 lib/librarian/puppet/source/repo.rb