Sha256: 5b7a9d04194622f9cd3d71c3319e3f1bbd75739d4d2e94c9381663a38cfd7cc1

Contents?: true

Size: 851 Bytes

Versions: 78

Compression:

Stored size: 851 Bytes

Contents

require 'chef/chef_fs/data_handler/data_handler_base'

class Chef
  module ChefFS
    module DataHandler
      class ContainerDataHandler < DataHandlerBase
        def normalize(container, entry)
          normalize_hash(container, {
            'containername' => remove_dot_json(entry.name),
            'containerpath' => remove_dot_json(entry.name)
          })
        end

        def preserve_key(key)
          return key == 'containername'
        end

        def verify_integrity(object, entry, &on_error)
          base_name = remove_dot_json(entry.name)
          if object['containername'] != base_name
            on_error.call("Name in #{entry.path_for_printing} must be '#{base_name}' (is '#{object['name']}')")
          end
        end

        # There is no chef_class for users, nor does to_ruby work.
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
chef-11.18.12-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.18.12 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.18.6-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.18.6 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.18.0-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.18.0 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.4-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.4 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.2-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.2 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.0-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.0 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.16.0.rc.0 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-12.0.0.alpha.1-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-12.0.0.alpha.1 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.14.6-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.14.6 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.14.2-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-11.14.2 lib/chef/chef_fs/data_handler/container_data_handler.rb
chef-12.0.0.alpha.0-x86-mingw32 lib/chef/chef_fs/data_handler/container_data_handler.rb