def write_gens_to_file(self, gens): gens.sort() data = "\n".join(gens) f = open(os.path.join(get_idea(self.get_working_dir()), '.generators'), 'w+') f.write(data) f.close()
def write_tasks_to_file(self, rtsk): rtsk.sort() data = "\n".join(rtsk) f = open(os.path.join(get_idea(self.get_working_dir()), '.rakeTasks'), 'w') f.write(data) f.close()
def write_tasks_to_file(self, ctsk): ctsk.sort() data = "\n".join(ctsk) f = open( os.path.join(get_idea(self.get_working_dir()), '.capistranoTasks'), 'w') f.write(data) f.close()
def get_available_capistrano_tasks(self): try: f = open(os.path.join(get_idea(self.get_working_dir()), '.capistranoTasks'), 'r') data = f.read() f.close() ctsk = [i.split(" ", 1) for i in data.split("\n")] print ctsk except IOError: ctsk = [] ctsk.insert(0, ["Update...", "Rebuild list of available capistrano tasks"]) return ctsk
def get_available_generators(self): try: f = open(os.path.join(get_idea(self.get_working_dir()), '.generators'), 'r') data = f.read() f.close() gens = data.split() gens.insert(0, "Update...") except IOError: gens = "".split() gens.insert(0, "Update...") return gens
def get_available_rake_tasks(self): try: f = open( os.path.join(get_idea(self.get_working_dir()), '.rakeTasks'), 'r') data = f.read() f.close() rtsk = data.split() rtsk.insert(0, "Update...") except IOError: rtsk = "".split() rtsk.insert(0, "Update...") return rtsk
def get_available_generators(self): try: f = open( os.path.join(get_idea(self.get_working_dir()), '.generators'), 'r') data = f.read() f.close() gens = data.split() gens.insert(0, "Update...") except IOError: gens = "".split() gens.insert(0, "Update...") return gens
def get_available_capistrano_tasks(self): try: f = open( os.path.join(get_idea(self.get_working_dir()), '.capistranoTasks'), 'r') data = f.read() f.close() ctsk = [i.split(" ", 1) for i in data.split("\n")] print ctsk except IOError: ctsk = [] ctsk.insert( 0, ["Update...", "Rebuild list of available capistrano tasks"]) return ctsk
def write_tasks_to_file(self, ctsk): ctsk.sort() data = "\n".join(ctsk) f = open(os.path.join(get_idea(self.get_working_dir()), '.capistranoTasks'), 'w') f.write(data) f.close()