Method: OpsWalrus::PackageReference#import_resolution_dirname

Defined in:
lib/opswalrus/package_file.rb

#import_resolution_dirnameObject

important: the import_resolution_dirname implemented as the local_name is critical because Bundler#download_package downloads package dependencies to the name that this method returns, which must match the package reference’s local name so that later, when the package is being looked up on the load path (in LoadPath#resolve_import_reference), the package reference’s referenced git repo or file path may not exist or be available, and so the package reference’s local_name is used to look up the name of the directory that the bundled dependency resides at, and so the package reference’s local_name must be the name of the directory that the dependency is placed in within the bundle_dir. If this implementation changes, then Bundler#download_package and LoadPath#resolve_import_reference must also change in order for the three things to reconcile with respect to one another, since all three bits of logic are what make bundling package dependencies and loading them function properly.



27
28
29
# File 'lib/opswalrus/package_file.rb', line 27

def import_resolution_dirname
  "pkg_#{local_name}_version_#{version}"
end