Sha256: 5799785f4c9d8804103d82c339551ded8d0f84015e8cd051d0ff055af518397f

Contents?: true

Size: 984 Bytes

Versions: 18

Compression:

Stored size: 984 Bytes

Contents

require "librarian/environment"
require "librarian/puppet/dsl"
require "librarian/puppet/source"
require "librarian/puppet/lockfile/parser"

module Librarian
  module Puppet
    class Environment < Librarian::Environment

      def adapter_name
        "puppet"
      end

      def tmp_path
        part = config_db["tmp"] || ".tmp"
        project_path.join(part)
      end

      def install_path
        part = config_db["path"] || "modules"
        project_path.join(part)
      end

      def vendor_path
        project_path.join('vendor/puppet')
      end

      def vendor_cache
        vendor_path.join('cache')
      end

      def vendor_source
        vendor_path.join('source')
      end

      def vendor!
        vendor_cache.mkpath  unless vendor_cache.exist?
        vendor_source.mkpath unless vendor_source.exist?
      end

      def vendor?
        vendor_path.exist?
      end

      def local?
        config_db['mode'] == 'local'
      end

    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
librarian-puppet-1.0.4 lib/librarian/puppet/environment.rb
librarian-puppet-1.1.2 lib/librarian/puppet/environment.rb
librarian-puppet-1.1.1 lib/librarian/puppet/environment.rb
librarian-puppet-1.1.0 lib/librarian/puppet/environment.rb
librarian-puppet-1.0.3 lib/librarian/puppet/environment.rb
librarian-puppet-1.0.2 lib/librarian/puppet/environment.rb
librarian-puppet-1.0.1 lib/librarian/puppet/environment.rb
librarian-puppet-1.0.0 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.17 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.16 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.15 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.14 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.13 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.12 lib/librarian/puppet/environment.rb
librarian-puppet-maestrodev-0.9.11.6 lib/librarian/puppet/environment.rb
librarian-puppet-0.9.11 lib/librarian/puppet/environment.rb
librarian-puppet-maestrodev-0.9.11.5 lib/librarian/puppet/environment.rb
librarian-puppet-maestrodev-0.9.11.4 lib/librarian/puppet/environment.rb