From df5e1a8e31104b6cb92689c3d82b0c47b77230f1 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Fri, 6 Jan 2012 10:05:51 +0100 Subject: fix Config#engine_proc_ext, file engine and spec --- lib/zorglub/config.rb | 2 +- lib/zorglub/engines/file.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/zorglub/config.rb b/lib/zorglub/config.rb index 73e218c..cda71ac 100644 --- a/lib/zorglub/config.rb +++ b/lib/zorglub/config.rb @@ -61,7 +61,7 @@ module Zorglub def engine_proc_ext engine, ext p,x = @engines[engine] return [nil, ''] if p.nil? - [ p, (x.nil? ? ext : x ) ] + [ p, ((ext.nil? or ext.empty?) ? x : ext ) ] end # end diff --git a/lib/zorglub/engines/file.rb b/lib/zorglub/engines/file.rb index fd9fe1e..10f7322 100644 --- a/lib/zorglub/engines/file.rb +++ b/lib/zorglub/engines/file.rb @@ -15,6 +15,6 @@ module Zorglub end end # -Zorglub::Config.register_engine :file, nil, Zorglub::Engines::File.method(:proc) +Zorglub::Config.register_engine :file, 'txt', Zorglub::Engines::File.method(:proc) # # EOF -- cgit v1.2.3