lib/rabbit/task/slide.rb in rabbit-2.0.3 vs lib/rabbit/task/slide.rb in rabbit-2.0.4
- old
+ new
@@ -155,12 +155,11 @@
if @slide.author.rubygems_user
define_publish_rubygems_task
publish_tasks << :rubygems
end
- slideshare_user = @slide.author.slideshare_user
- if slideshare_user
+ if @slide.author.slideshare_user
define_publish_slideshare_task
publish_tasks << :slideshare
end
if @slide.author.speaker_deck_user
@@ -177,9 +176,10 @@
ruby("-S", "gem", "push", gem_path)
end
end
def define_publish_slideshare_task
+ slideshare_user = @slide.author.slideshare_user
desc(_("Publish the slide to %s" % "SlideShare"))
task :slideshare => [:pdf, "gem:validate"] do
require "rabbit/slideshare"
slideshare = SlideShare.new(@logger)
slideshare.user = slideshare_user