lib/slideshow/manifest_helpers.rb in slideshow-models-2.5.0 vs lib/slideshow/manifest_helpers.rb in slideshow-models-3.0.0
- old
+ new
@@ -37,10 +37,13 @@
# Note: only include builtin patterns if slideshow-templates gem included/required (it's optional)
builtin_patterns = []
builtin_patterns << "#{SlideshowTemplates.root}/templates/*.txt" if defined?( SlideshowTemplates )
+ test_patterns = []
+ test_patterns << "#{Slideshow.root}/test/templates/*/*.txt"
+
config_patterns = [
"#{config.config_dir}/templates/*.txt",
"#{config.config_dir}/templates/*/*.txt"
]
current_patterns = [
@@ -49,9 +52,10 @@
"node_modules/*/*.txt", # note: add support for npm installs - use/make slideshow required in name? for namespace in the future???
]
patterns = []
patterns += current_patterns
+ patterns += test_patterns if config.test? ## (auto-)add test templates in test mode
patterns += config_patterns
patterns += builtin_patterns
end
def installed_template_manifests