Ejemplo n.º 1
0
    def test_itShouldGenerateAnApacheLicenseFile(self):
        data = ModuleData()
        data.technicalTitle = 'testing'
        data.projectTitle = 'Test Project'
        data.projectDescription = 'This is a test project'
        data.version = '1.0.0'
        data.author = 'Testa'
        data.year = 2018
        data.license = 'MIT'

        project = projup.modules.Project(
            PATH_TO_PROJUP,
            self.execPath,
        )
        project.process(data)

        self.assertTrue(os.path.exists(self.execPath + '/testing'))
        self.assertTrue(os.path.exists(self.execPath + '/testing/README.md'))

        readmeFile = open(self.execPath + '/testing/README.md', 'r')
        readme = readmeFile.read()
        readmeFile.close()

        self.assertTrue('# Test Project' in readme)
        self.assertTrue('[License: MIT]' in readme)
        self.assertTrue('[Version: 1.0.0]' in readme)
        self.assertTrue(data.projectDescription in readme)
Ejemplo n.º 2
0
  def __parseDefaultConfig(self):
    data = ModuleData()
    cfgData = {'author': '', 'email': ''}

    configFilename = expanduser('~') + '/.projup'
    configFile = Path(configFilename)
    if configFile.is_file():
      cfgData = toml.load(configFilename)

    if cfgData['author']:
      data.author = cfgData['author']
    if cfgData['email']:
      data.email = cfgData['email']

    return data
Ejemplo n.º 3
0
    def setUp(self):
        fakeTpl = tests.fakeTemplates.FakeTemplates(PATH_TO_PROJUP +
                                                    '/templates')
        self.setUpPyfakefs()
        fakeTpl.copyContentToVirtualFS()

        self.execPath = '/test'
        self.gitignorePath = self.execPath + '/.gitignore'
        self.fs.create_dir(self.execPath)

        self.vcs = projup.modules.Vcs(
            PATH_TO_PROJUP,
            self.execPath,
        )

        self.data = ModuleData()
Ejemplo n.º 4
0
    def setUp(self):
        fakeTpl = tests.fakeTemplates.FakeTemplates(PATH_TO_PROJUP +
                                                    '/templates')
        self.setUpPyfakefs()
        fakeTpl.copyContentToVirtualFS()

        self.execPath = '/test'
        self.fs.create_dir(self.execPath)
        self.fs.create_dir(self.execPath + '/testing')
        self.authorsPath = self.execPath + '/testing/AUTHORS'

        self.author = projup.modules.Author(
            PATH_TO_PROJUP,
            self.execPath,
        )

        self.data = ModuleData()
        self.data.technicalTitle = 'testing'
Ejemplo n.º 5
0
    def setUp(self):
        fakeTpl = tests.fakeTemplates.FakeTemplates(PATH_TO_PROJUP +
                                                    '/templates')
        self.setUpPyfakefs()
        fakeTpl.copyContentToVirtualFS()

        self.execPath = '/test'
        self.fs.create_dir(self.execPath)
        self.fs.create_dir(self.execPath + '/testing')
        self.includePath = self.execPath + '/testing/include/testing'
        self.srcPath = self.execPath + '/testing/src/testing'

        self.codeLanguages = projup.modules.CodeLanguages(
            PATH_TO_PROJUP,
            self.execPath,
        )

        self.data = ModuleData()
        self.data.technicalTitle = 'testing'
Ejemplo n.º 6
0
    def setUp(self):
        fakeTpl = tests.fakeTemplates.FakeTemplates(PATH_TO_PROJUP +
                                                    '/templates')
        self.setUpPyfakefs()
        fakeTpl.copyContentToVirtualFS()

        self.execPath = '/test'
        self.fs.create_dir(self.execPath)
        self.fs.create_dir(self.execPath + '/testing')
        self.licensePath = self.execPath + '/testing/LICENSE'

        self.license = projup.modules.License(
            PATH_TO_PROJUP,
            self.execPath,
        )

        self.data = ModuleData()
        self.data.technicalTitle = 'testing'
        self.data.author = 'Testa'
        self.data.year = 2018
  def setUp(self):
    fakeTpl = tests.fakeTemplates.FakeTemplates(PATH_TO_PROJUP + '/templates')
    self.setUpPyfakefs()
    fakeTpl.copyContentToVirtualFS()

    self.execPath = '/test'
    self.fs.create_dir(self.execPath)
    self.fs.create_dir(self.execPath + '/testing')

    self.travisFilePath = self.execPath + '/testing/.travis.yml'

    self.ci = projup.modules.ContinousIntegration(
      PATH_TO_PROJUP,
      self.execPath,
    )

    self.data = ModuleData()
    self.data.technicalTitle = 'testing'
    self.data.author = 'Testa'
    self.data.year = 2018
    self.data.license = 'MIT'