Skip to content

Commit

Permalink
Merge branch 'odolbeau-correct-recipe'
Browse files Browse the repository at this point in the history
  • Loading branch information
djoos committed May 31, 2014
2 parents 44fa323 + 5f0673f commit 30b6b8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
site :opscode
source "https://api.berkshelf.com"

metadata
metadata
26 changes: 13 additions & 13 deletions recipes/global_configs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@
action :create
end

unless user_configs.nil?
user_configs.each_pair do |option, value|
if value.respond_to?(:each_pair)
value.each_pair do |value_k, value_v|
execute "composer-config-for-#{user}" do
command "composer config --global #{option}.#{value_k} #{value_v}"
user user
group user
action :run
end
end
else
user_configs.nil? && next

user_configs.each_pair do |option, value|
if value.respond_to?(:each_pair)
value.each_pair do |value_k, value_v|
execute "composer-config-for-#{user}" do
command "composer config --global #{option} #{value}"
command "composer config --global #{option}.#{value_k} #{value_v}"
user user
group user
action :run
end
end
else
execute "composer-config-for-#{user}" do
command "composer config --global #{option} #{value}"
user user
group user
action :run
end
end
end
end
Expand Down

0 comments on commit 30b6b8d

Please sign in to comment.