lib/rabbit/task/slide.rb in rabbit-2.0.5 vs lib/rabbit/task/slide.rb in rabbit-2.0.6
- old
+ new
@@ -183,20 +183,21 @@
task :slideshare => [:pdf, "gem:validate"] do
require "rabbit/slideshare"
slideshare = SlideShare.new(@logger)
slideshare.user = slideshare_user
slideshare.pdf_path = pdf_path
+ slideshare.id = @slide.id
slideshare.title = spec.summary
slideshare.description = spec.description
slideshare.tags = @tags if @tags
- id = slideshare.upload
- if id
- url = "http://www.slideshare.net/#{slideshare_user}/#{id}"
+ url = slideshare.upload
+ if url
@logger.info(_("Uploaded successfully!"))
@logger.info(_("See %s") % url)
Gtk.show_uri(url) if Gtk.respond_to?(:show_uri)
- @slide.slideshare_id = id
+ slide_id = url.split(/\//).last
+ @slide.slideshare_id = slide_id
@slide.save(".")
end
end
end