Permalink
Browse files

Style tweaks to new tasks. Better tabbing, remove escaped single quotes.

  • Loading branch information...
1 parent 4445672 commit f9d6d727ade0ca1f8c9bafb4034b58ebd6db18c9 @haus haus committed Dec 4, 2012
Showing with 12 additions and 12 deletions.
  1. +12 −12 lib/tasks/classesgroups.rake
View
24 lib/tasks/classesgroups.rake
@@ -93,7 +93,7 @@ namespace :nodegroup do
begin
nodegroup = NodeGroup.find_by_name(name)
if nodegroup.nil?
- puts 'Group doesn\'t exist!'
+ puts "Group doesn't exist!"
exit 1
end
@@ -206,24 +206,24 @@ namespace :nodegroup do
begin
nodegroup = NodeGroup.find_by_name(name)
if nodegroup.nil?
- puts 'Group doesn\'t exist!'
+ puts "Group doesn't exist!"
exit 1
end
nc = NodeClass.find_by_name(classname)
if nc.nil?
- puts 'Class doesn\'t exist!'
+ puts "Class doesn't exist!"
exit 1
else
- classes = nodegroup.node_classes
- unless classes.include?(nc)
- puts "Group '#{name}' does not include class '#{classname}'"
- exit 0
- else
- classes.delete(nc)
- nodegroup.node_classes = classes
- if nodegroup.save
- puts "Class '#{classname}' removed from node group '#{name}'"
+ classes = nodegroup.node_classes
+ unless classes.include?(nc)
+ puts "Group '#{name}' does not include class '#{classname}'"
+ exit 0
+ else
+ classes.delete(nc)
+ nodegroup.node_classes = classes
+ if nodegroup.save
+ puts "Class '#{classname}' removed from node group '#{name}'"
end
end
end

0 comments on commit f9d6d72

Please sign in to comment.