Sha256: 3f08e6537590a2942497701087a6cb9638356cfba31cfd44ef6e6e077be5f5a5

Contents?: true

Size: 657 Bytes

Versions: 6

Compression:

Stored size: 657 Bytes

Contents

require 'chef_fs/knife'
require 'chef_fs/command_line'

class Chef
  class Knife
    class Diff < ChefFS::Knife
      banner "diff PATTERNS"

      option :recurse,
        :long => '--[no-]recurse',
        :boolean => true,
        :default => true,
        :description => "List directories recursively."

      def run
        patterns = pattern_args_from(name_args.length > 0 ? name_args : [ "" ])

        # Get the matches (recursively)
        patterns.each do |pattern|
          ChefFS::CommandLine.diff(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1) do |diff|
            puts diff
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
knife-essentials-0.3.1 lib/chef/knife/diff.rb
knife-essentials-0.3 lib/chef/knife/diff.rb
knife-essentials-0.2.1 lib/chef/knife/diff.rb
knife-essentials-0.2 lib/chef/knife/diff.rb
knife-essentials-0.1.1 lib/chef/knife/diff.rb
knife-essentials-0.1 lib/chef/knife/diff.rb