Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set compile_time when using chef_gem resource #196

Merged
merged 2 commits into from Apr 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .kitchen.yml
Expand Up @@ -44,6 +44,14 @@ suites:
api_key: somethingnotnil
application_key: alsonotnil

- name: dd-handler
run_list:
- recipe[datadog::dd-handler]
attributes:
datadog: &DATADOG
api_key: somethingnotnil
application_key: alsonotnil

- name: datadog_activemq
run_list:
- recipe[datadog::activemq]
Expand Down
4 changes: 3 additions & 1 deletion recipes/dd-handler.rb
Expand Up @@ -20,9 +20,11 @@
include_recipe 'chef_handler'
ENV['DATADOG_HOST'] = node['datadog']['url']

chef_gem 'chef-handler-datadog' do
chef_gem 'chef-handler-datadog' do # ~FC009
action :install
version node['datadog']['chef_handler_version']
# Chef 12 introduced `compile_time` - remove when Chef 11 is EOL.
compile_time true if respond_to?(:compile_time)
end
require 'chef/handler/datadog'

Expand Down
8 changes: 8 additions & 0 deletions test/integration/dd-handler/serverspec/dd-handler_spec.rb
@@ -0,0 +1,8 @@
require 'serverspec'

set :backend, :exec
set :path, '/sbin:/usr/local/sbin:$PATH'

describe package('chef-handler-datadog') do
it { should be_installed.by('gem') }
end