Module: PDK::Bolt

Defined in:
lib/pdk/bolt.rb

Class Method Summary collapse

Class Method Details

.bolt_project_root?(path = Dir.pwd) ⇒ boolean

Returns true or false depending on if any of the common files and directories in a Bolt Project are found in the specified directory. If a directory is not specified, the current working directory is used.

Returns:

  • (boolean)

    True if any bolt specific files or directories are present

See Also:



13
14
15
16
17
# File 'lib/pdk/bolt.rb', line 13

def bolt_project_root?(path = Dir.pwd)
  return true if File.basename(path) == 'Boltdir' && PDK::Util::Filesystem.directory?(path)

  PDK::Util::Filesystem.file?(File.join(path, 'bolt.yaml'))
end