Module: Pluto::ManifestHelper
Instance Method Summary collapse
-
#installed_template_manifest_patterns ⇒ Object
shared methods for handling manifest lookups.
- #installed_template_manifests ⇒ Object
Instance Method Details
#installed_template_manifest_patterns ⇒ Object
shared methods for handling manifest lookups
note: required attribs (in host class) include:
- opts.config_path
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/pluto/merge/manifest_helpers.rb', line 17 def installed_template_manifest_patterns # 1) search . # that is, working/current dir # 2) search <config_dir> # 3) search <gem>/templates ### # Note # -- for now - no longer ship w/ builtin template packs # - download on demand if needed builtin_patterns = [ ## "#{Pluto.root}/templates/*.txt" ] config_patterns = [ ## "#{File.expand_path(opts.config_path)}/*.txt", "#{File.expand_path(opts.config_path)}/*/*.txt" ] current_patterns = [ ## "*.txt", "*/*.txt", "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 += config_patterns patterns += builtin_patterns end |
#installed_template_manifests ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/pluto/merge/manifest_helpers.rb', line 47 def installed_template_manifests excludes = [ "Manifest.txt", "*/Manifest.txt" ] Pakman::Finder.new.find_manifests( installed_template_manifest_patterns, excludes ) end |