From 367a818c267408f364427e0e7eba1d2a4ea9ea14 Mon Sep 17 00:00:00 2001 From: Anatol Broder Date: Mon, 5 May 2014 10:37:21 +0200 Subject: [PATCH] Fallback title based on time --- features/support/env.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/support/env.rb b/features/support/env.rb index 80020690..29875629 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -28,7 +28,11 @@ def run_jekyll(args) end def slug(title) - title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-') + if title + title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-') + else + Time.now.strftime("%s%9N") # nanoseconds since the Epoch + end end def location(folder, direction)