Method: Jets::Commands::Build.app_files

Defined in:
lib/jets/commands/build.rb

.app_filesObject

Crucial that the Dir.pwd is in the tmp_code because for because Jets.boot set ups autoload_paths and this is how project classes are loaded. TODO: rework code so that Dir.pwd does not have to be in tmp_code for build to work.

app_files used to determine what CloudFormation templates to build. app_files also used to determine what handlers to build.



136
137
138
139
140
141
142
143
144
145
146
# File 'lib/jets/commands/build.rb', line 136

def app_files
  paths = []
  expression = "#{Jets.root}/app/**/**/*.rb"
  Dir.glob(expression).each do |path|
    next unless app_file?(path)
    relative_path = path.sub("#{Jets.root}/", '') # rid of the Jets.root at beginning
    paths << relative_path
  end
  paths += internal_app_files
  paths
end