Esempio n. 1
0
def install(pod_path, gerrit):
    """Checks whether the pod depends on npm, bower, and gulp and installs them
    if necessary. Then, runs install commands. Also optionally installs the
    Gerrit Code Review commit hook."""
    root = os.path.abspath(os.path.join(os.getcwd(), pod_path))
    pod = pods.Pod(root, storage=storage.FileStorage, load_extensions=False)
    with pod.profile.timer('grow_install'):
        config = base_config.BaseConfig()
        config.set('gerrit', gerrit)
        built_in_installers = []
        for installer_class in installers.BUILT_IN_INSTALLERS:
            built_in_installers.append(installer_class(pod, config))
        grow_installer = installer.Installer(built_in_installers, pod)
        grow_installer.run_installers()
    return pod
Esempio n. 2
0
 def setUp(self):
     self.dir_path = testing.create_test_pod_dir()
     self.pod = pods.Pod(self.dir_path, storage=storage.FileStorage)
     self.installer = installer.Installer([], self.pod)