Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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()
Пример #4
0
 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
Пример #5
0
 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
Пример #6
0
 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
Пример #7
0
 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
Пример #8
0
 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
Пример #9
0
 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()
Пример #10
0
 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()