Skip to content

Commit

Permalink
diff name/path
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Sep 11, 2015
1 parent ce8c761 commit b26452e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/miam/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def walk_path(type, user_or_group_name, expected_path, actual_path)
updated = false

if expected_path != actual_path
@driver.update_path(type, user_or_group_name, expected_path)
@driver.update_path(type, user_or_group_name, expected_path, actual_path)
updated = true
end

Expand Down
6 changes: 3 additions & 3 deletions lib/miam/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ def delete_instance_profile(instance_profile_name, attrs, roles_in_instance_prof

def update_name(type, user_or_group_name, new_name)
log(:info, "Update #{Miam::Utils.camelize(type.to_s)} `#{user_or_group_name}`", :color => :green)
log(:info, " set name=#{new_name}", :color => :green)
log(:info, " name:\n".green + Miam::Utils.diff(user_or_group_name, new_name, :color => @options[:color], :indent => ' '), :color => false)
update_user_or_group(type, user_or_group_name, "new_#{type}_name".to_sym => new_name)
end

def update_path(type, user_or_group_name, new_path)
def update_path(type, user_or_group_name, new_path, old_path)
log(:info, "Update #{Miam::Utils.camelize(type.to_s)} `#{user_or_group_name}`", :color => :green)
log(:info, " set path=#{new_path}", :color => :green)
log(:info, " path:\n".green + Miam::Utils.diff(old_path, new_path, :color => @options[:color], :indent => ' '), :color => false)
update_user_or_group(type, user_or_group_name, :new_path => new_path)
end

Expand Down

0 comments on commit b26452e

Please sign in to comment.