lib/nanoc/cli/commands/create-item.rb in nanoc-3.7.3 vs lib/nanoc/cli/commands/create-item.rb in nanoc-3.7.4

- old
+ new

@@ -1,10 +1,10 @@ # encoding: utf-8 -usage 'create-item [options] identifier' -aliases :create_item, :ci -summary 'create an item' +usage 'create-item [options] identifier' +aliases :create_item, :ci +summary 'create an item' description <<-EOS Create a new item in the current site. The first data source in the site configuration will be used. EOS @@ -28,12 +28,12 @@ # Set VCS if possible set_vcs(options[:vcs]) # Check whether item is unique - if !site.items.find { |i| i.identifier == identifier }.nil? + unless site.items.find { |i| i.identifier == identifier }.nil? raise Nanoc::Errors::GenericTrivial, - "An item already exists at #{identifier}. Please " + + "An item already exists at #{identifier}. Please " \ 'pick a unique name for the item you are creating.' end # Setup notifications Nanoc::NotificationCenter.on(:file_created) do |file_path|