File tree Expand file tree Collapse file tree
data/cookbooks/attribute_include_default Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ = DESCRIPTION:
2+
3+ = REQUIREMENTS:
4+
5+ = ATTRIBUTES:
6+
7+ = USAGE:
8+
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 1+ set [ :mars_volta_name ] = 'mars_volta'
2+ set [ :mars_volta_will_be ] = 'dope'
Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff 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+
You can’t perform that action at this time.
0 commit comments