Sha256: 7ca6fdc0382ba1b378a022ac690139fe4da6a14a52a30fd05fc382b60f70b08f
Contents?: true
Size: 783 Bytes
Versions: 4
Compression:
Stored size: 783 Bytes
Contents
Given /^I have a cookbook named "(.+)"(?: (?:at|with) version "(.+)")?$/ do |name, version| create_cookbook(name, version) end Given /^I have a cookbook named "(.+)"(?: (?:at|with) version "(.+)")? with git support$/ do |name, version| create_cookbook(name, version, git: true) end # Create a new cookbook with the given name and version. # # @param [String] name # @param [String] version (default: 0.0.0.0) # @param [Hash] options def create_cookbook(name, version, options = {}) create_dir(name) cd(name) write_file('CHANGELOG.md', "#{name} Cookbook CHANGELOG\n=====\n\nv0.0.0\n-----") write_file('README.md', 'This is a README') write_file('metadata.rb', "name '#{name}'\nversion '#{version || '0.0.0'}'") if options[:git] git_init(current_dir) end end
Version data entries
4 entries across 4 versions & 1 rubygems