Sha256: 49a841318b65c9202e8315a0e1e6a0d19a0793dedc5476c9e4e5061454436f14

Contents?: true

Size: 1.37 KB

Versions: 33

Compression:

Stored size: 1.37 KB

Contents

#
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Nuo Yan (<nuo@opscode.com>)
# Author:: Christopher Brown (<cb@opscode.com>)
# Copyright:: Copyright (c) 2009 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'json'
require 'chef/knife/chop/translate'

require 'chef/knife/chop/errors'
include ChopErrors
require 'chef/knife/chop/chef_part'

class ::Chef::DataBagItem

  # --------------------------------------------------------------------------------------------------------------------
  def generate_json(part)
    self.to_json
  end

  # --------------------------------------------------------------------------------------------------------------------
  def generate_rb(part)
    part.logger.todo "generate_rb", true
    src = []
    src << "name '#{@name}'"
    src << "description '#{@description}'"
    src.join("\n")
  end

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
knife-chop-0.12.18 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.12.17 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.12.03 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.11.12 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.9.5 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.9.4 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.9.2 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.9.1 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.9.0 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.8.3 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.8.2 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.8.0 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.7.8 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.7.2 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.7.1 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.7.0 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.6.7 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.5.15 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.4.1 lib/chef/knife/chop/chef_data_bag_item.rb
knife-chop-0.4.0 lib/chef/knife/chop/chef_data_bag_item.rb