Sha256: 0e87eb42afc7e62d4f193052c8aada0164c903812af442fdeef449a12901f111

Contents?: true

Size: 661 Bytes

Versions: 21

Compression:

Stored size: 661 Bytes

Contents

require 'r10k/puppetfile'
require 'r10k/action/base'
require 'r10k/errors/formatting'

module R10K
  module Action
    module Puppetfile
      class Check < R10K::Action::Base

        def call
          pf = R10K::Puppetfile.new(@root, @moduledir, @path)
          begin
            pf.load!
            $stderr.puts _("Syntax OK")
            true
          rescue => e
            $stderr.puts R10K::Errors::Formatting.format_exception(e, @trace)
            false
          end
        end

        private

        def allowed_initialize_opts
          super.merge(root: :self, puppetfile: :self, moduledir: :self)
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
r10k-2.6.9 lib/r10k/action/puppetfile/check.rb
r10k-2.6.8 lib/r10k/action/puppetfile/check.rb
r10k-2.6.7 lib/r10k/action/puppetfile/check.rb
r10k-2.6.6 lib/r10k/action/puppetfile/check.rb
r10k-2.6.5 lib/r10k/action/puppetfile/check.rb
r10k-2.6.4 lib/r10k/action/puppetfile/check.rb
r10k-2.6.3 lib/r10k/action/puppetfile/check.rb
r10k-2.6.2 lib/r10k/action/puppetfile/check.rb
r10k-2.6.1 lib/r10k/action/puppetfile/check.rb
r10k-2.6.0 lib/r10k/action/puppetfile/check.rb
r10k-2.5.5 lib/r10k/action/puppetfile/check.rb
r10k-2.5.4 lib/r10k/action/puppetfile/check.rb
r10k-2.5.3 lib/r10k/action/puppetfile/check.rb
r10k-2.5.2 lib/r10k/action/puppetfile/check.rb
r10k-2.5.1 lib/r10k/action/puppetfile/check.rb
r10k-2.4.5 lib/r10k/action/puppetfile/check.rb
r10k-2.4.4 lib/r10k/action/puppetfile/check.rb
r10k-2.5.0 lib/r10k/action/puppetfile/check.rb
r10k-2.4.3 lib/r10k/action/puppetfile/check.rb
r10k-2.4.1 lib/r10k/action/puppetfile/check.rb