Sha256: 7ad45fcb3d0f11b1dc538534c94181c6ca60d8831b1c60d03fe141318b1897b1

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

module VagrantPlugins
  module LibrarianPuppet
    class Config < Vagrant.plugin(2, :config)
      attr_accessor :puppetfile_dir
      attr_accessor :placeholder_filename

      def initialize
        @puppetfile_dir = UNSET_VALUE
        @placeholder_filename = UNSET_VALUE
      end

      def finalize!
        @puppetfile_dir = '.' if @puppetfile_dir == UNSET_VALUE
        @placeholder_filename = '.PLACEHOLDER' if @placeholder_filename == UNSET_VALUE
      end

      def puppetfile_path
        @puppetfile_path ||= @puppetfile_dir ? File.join(@puppetfile_dir, 'Puppetfile') : 'Puppetfile'
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
vagrant-librarian-puppet-0.3.0 lib/vagrant-librarian-puppet/config.rb
vagrant-librarian-puppet-0.2.0 lib/vagrant-librarian-puppet/config.rb
vagrant-librarian-puppet-plugin-0.2.0 lib/vagrant-librarian-puppet-plugin/config.rb