This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recipe: dns::default | |
* ruby_block[Set dns name attribute] action run | |
- execute the ruby block Set dns name attribute | |
* dns[Node DNS entry] action create | |
================================================================================ | |
Error executing action `create` on resource 'dns[Node DNS entry]' | |
================================================================================ | |
ArgumentError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w( myrole | |
another | |
thisone | |
thatone | |
somany | |
roles ).each do |role| | |
puts "exporting: " + role + "\n" | |
content = `knife role show #{role} -F json | python -m json.tool` | |
File.write("/tmp/roles/#{role}.json", content) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'serverspec' | |
require 'pathname' | |
include Serverspec::Helper::Exec | |
include Serverspec::Helper::DetectOS | |
RSpec.configure do |c| | |
c.before :all do | |
c.os = backend(Serverspec::Commands::Base).check_os | |
c.path = '/sbin:/usr/sbin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#^syntax detection | |
site 'http://community.opscode.com/api/v1' | |
cookbook 'mycookbook', path: '.' | |
cookbook 'fixtures', path: 'test/unit/fixtures' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "serverspec" | |
require "net/http" | |
require "uri" | |
include Serverspec::Helper::Exec | |
include Serverspec::Helper::DetectOS | |
RSpec.configure do |c| | |
c.before :all do | |
c.path = "/sbin:/usr/sbin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "chefspec" | |
require "chefspec/librarian" | |
at_exit { ChefSpec::Coverage.report! } if ENV['COVERAGE'] | |
def load_resource(cookbook, lwrp) | |
require "chef/resource/lwrp_base" | |
name = class_name_for_lwrp(cookbook, lwrp) | |
unless Chef::Resource.const_defined?(name) | |
Chef::Resource::LWRPBase.build_from_file( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chefspec' | |
require 'chefspec/librarian' | |
RSpec.configure do |config| | |
config.log_level = :fatal | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rake | |
begin | |
require 'emeril/rake' | |
rescue LoadError | |
puts ">>>>> Emeril gem not loaded, omitting tasks" unless ENV['CI'] | |
end | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:unit) do |t| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "chefspec" | |
gem "emeril" | |
gem "foodcritic", "~> 3.0" | |
gem "librarian-chef" | |
gem 'guard-rspec' | |
gem "ipaddr_extensions" | |
gem "builder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
guard :rspec, spec_paths: ["test/unit"] do | |
watch(%r{^test/unit/.+_spec\.rb$}) | |
watch(%r{^(libraries|definitions|providers|recipes|resources)/(.+)\.rb$}) { |m| "test/unit/#{m[1]}/#{m[2]}_spec.rb" } | |
watch("test/unit/spec_helper.rb") { "test/unit" } | |
end |