Sha256: 088e64b156623c152eca58e9c1b7db9d0f6c4d529fee2eea9cd8d0f8f2a23f1a

Contents?: true

Size: 1.04 KB

Versions: 19

Compression:

Stored size: 1.04 KB

Contents

Given /^I have a cookbook named "([\w\-]+)" at version "([\d\.]+)"$/ do |name, version|
  create_cookbook(name, version)
end

Given /^I have a cookbook named "([\w\-]+)"$/ do |name|
  create_cookbook(name, '0.0.0')
end

Given /^I have a cookbook named "([\w\-]+)" with git support$/ do |name|
  create_cookbook(name, '0.0.0', 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', <<-EOH.gsub(/^ {4}/, ''))
    #{name} Changelog
    =================

    v#{version} (#{Time.now.to_date})
    ----------------------------
    - This is an entry
    - This is another entry
  EOH

  write_file('README.md', <<-EOH.gsub(/^ {4}/, ''))
    This is the README for #{name}
  EOH

  write_file('metadata.rb', <<-EOH.gsub(/^ {4}/, ''))
    name    '#{name}'
    version '#{version}'
  EOH

  if options[:git]
    git_init(current_dir)
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
stove-6.0.0 features/step_definitions/cookbook_steps.rb
stove-5.2.0 features/step_definitions/cookbook_steps.rb
stove-5.1.0 features/step_definitions/cookbook_steps.rb
stove-5.0.0 features/step_definitions/cookbook_steps.rb
stove-4.1.1 features/step_definitions/cookbook_steps.rb
stove-4.1.0 features/step_definitions/cookbook_steps.rb
stove-4.0.0 features/step_definitions/cookbook_steps.rb
stove-3.2.8 features/step_definitions/cookbook_steps.rb
wood-stove-3.2.9000 features/step_definitions/cookbook_steps.rb
stove-3.2.7 features/step_definitions/cookbook_steps.rb
stove-3.2.6 features/step_definitions/cookbook_steps.rb
stove-3.2.5 features/step_definitions/cookbook_steps.rb
stove-3.2.4 features/step_definitions/cookbook_steps.rb
stove-3.2.3 features/step_definitions/cookbook_steps.rb
stove-3.2.2 features/step_definitions/cookbook_steps.rb
stove-3.2.1 features/step_definitions/cookbook_steps.rb
stove-3.0.0 features/step_definitions/cookbook_steps.rb
stove-2.0.0 features/step_definitions/cookbook_steps.rb
stove-2.0.0.beta.2 features/step_definitions/cookbook_steps.rb