lib/kalipso/cli.rb in kalipso-0.1.2 vs lib/kalipso/cli.rb in kalipso-0.1.3

- old
+ new

@@ -30,13 +30,13 @@ end end end desc "link", "link a local path to a site" - def link(site, path) + def link(site, path = nil) site = Site::Local.find_by_name(site) - path = File.expand_path(path) + path = path.present? ? File.expand_path(path) : Dir.pwd site.update_attributes(:path => path) puts "#{site.name} linked to #{path}" end desc "unlink", "stop linking a local path to a site" @@ -77,12 +77,12 @@ site = Site::Local.find_by_path(path) end if site.present? puts "uploading #{name} from #{path}" if site.path.present? - puts "uploading #{site.path} to #{site.name}.diddlydum.com" + puts "uploading #{site.path} to #{site.name}.oncalypso.com" `rsync -arvH #{site.path.gsub(/\/+$/, '')}/ sites@diddlydum.com:/home/sites/#{site.name}` - puts "#{site.path} uploaded to http://#{site.name}.diddlydum.com" + puts "#{site.path} uploaded to http://#{site.name}.oncalypso.com" else puts "You need to link this site first" end else puts "site not found with path #{path}" \ No newline at end of file