lib/lookbook/preview.rb in lookbook-1.0.1 vs lib/lookbook/preview.rb in lookbook-1.0.2

- old
+ new

@@ -59,14 +59,18 @@ def default_example examples.first end + def rel_path + "#{name.underscore}.rb" + end + def full_path base_path = Array(Lookbook.config.preview_paths).detect do |preview_path| - Dir["#{preview_path}/#{name.underscore}.rb"].first + Dir["#{preview_path}/#{rel_path}"].first end - Pathname.new(Dir["#{base_path}/#{name.underscore}.rb"].first) + Pathname.new(Dir["#{base_path}/#{rel_path}"].first) end def url_path lookbook_inspect_path lookup_path end