lib/tasks/url.rake in picturama-0.0.6 vs lib/tasks/url.rake in picturama-1.0.0beta
- old
+ new
@@ -1,16 +1,17 @@
require 'fileutils'
-
-namespace :url do
- desc "Normalize album names name for URL format"
- task :sluglify, :source do |t, args|
- albums = Picturama::albums(args[:source])
- puts "In folder #{args[:source].inspect} I'm moving..."
- albums.each do |album|
- target_folder = "#{args[:source]}/#{album.folder.to_url}"
- unless File.directory?(target_folder)
- FileUtils.mv "#{args[:source]}/#{album.folder}", "#{target_folder}"
- puts "#{album.folder.inspect} to #{album.folder.to_url.inspect}"
+namespace :picturama do
+ namespace :url do
+ desc "Normalize album names name for URL format"
+ task :sluglify, :source do |t, args|
+ albums = Picturama::albums(args[:source])
+ puts "In folder #{args[:source].inspect} I'm moving..."
+ albums.each do |album|
+ target_folder = "#{args[:source]}/#{album.folder.to_url}"
+ unless File.directory?(target_folder)
+ FileUtils.mv "#{args[:source]}/#{album.folder}", "#{target_folder}"
+ puts "#{album.folder.inspect} to #{album.folder.to_url.inspect}"
+ end
end
end
end
-end
+end
\ No newline at end of file