Skip to content

Commit 949fc3f

Browse files
committed
Merge branch 'cuke-include-default-attribute'
2 parents ba39367 + 483a6f8 commit 949fc3f

6 files changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= DESCRIPTION:
2+
3+
= REQUIREMENTS:
4+
5+
= ATTRIBUTES:
6+
7+
= USAGE:
8+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# should be equivalent to include_attribute 'attribute_include_default::default'
2+
include_attribute 'attribute_include_default'
3+
set[:mars_volta] = mars_volta_name
4+
set[:mars_volta_is] = mars_volta_will_be
5+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set[:mars_volta_name] = 'mars_volta'
2+
set[:mars_volta_will_be] = 'dope'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
maintainer "Opscode"
2+
maintainer_email "do_not_reply@opscode.com"
3+
license "Apache 2.0"
4+
description "Installs/Configures recipe_include"
5+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
6+
version "0.1"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Cookbook Name:: recipe_include
3+
# Recipe:: second
4+
#
5+
# Copyright 2009, Opscode
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
execute "append to #{node[:tmpdir]}/mars_volta" do
21+
command "echo '#{node.mars_volta} is #{node.mars_volta_is}' >> #{node[:tmpdir]}/mars_volta"
22+
end
23+

‎features/language/attribute_inclusion.feature‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ Feature: Attribute Inclusion
1111
Then the run should exit '0'
1212
And a file named 'mars_volta' should contain 'mars_volta is dope' only '1' time
1313

14+
@fuuu
15+
Scenario: Include a default attribute file
16+
Given a validated node
17+
And it includes the recipe 'attribute_include_default'
18+
When I run the chef-client
19+
Then the run should exit '0'
20+
And a file named 'mars_volta' should contain 'mars_volta is dope' only '1' time
21+

0 commit comments

Comments
 (0)