Beispiel #1
0
 def coveralls_image_url(self):
     if not self.uses_travis:
         return None
     # 18px-high PNG
     # template = 'https://coveralls.io/repos/{owner}/{name}/badge.png?branch=master'
     # 20px-high flat SVG
     template = 'https://coveralls.io/repos/{owner}/{name}/badge.svg?branch={branch}'
     # SVG from shields.io (slow)
     # template = 'https://img.shields.io/coveralls/{owner}/{name}.svg?style=flat'
     return template.format(name=self.name, owner=self.owner, branch=self.branch)
Beispiel #2
0
 def travis_image_url(self):
     if not self.uses_travis:
         return None
     # Travis has 20px-high SVG images in the new (flat) style
     template = 'https://api.travis-ci.org/{owner}/{name}.svg?branch={branch}'
     # Shields.io gives me 18px-high SVG and PNG images in the old style
     # and 20px-high in the flat style with ?style=flat
     # but these are slower and sometimes even fail to load
     ## template = '//img.shields.io/travis/{owner}/{name}/master.svg'
     return template.format(name=self.name, owner=self.owner, branch=self.branch)
Beispiel #3
0
 def timestamp(self):
     template = u'{year:04d}-{month:02d}-{day:02d}'
     if self.hour is not None:
         template += u' {hour:02d}:{minute:02d}'
     if self.timezone is not None:
         template += u' {timezone}'
     return template.format(year=self.year,
                            month=self.month,
                            day=self.day,
                            hour=self.hour,
                            minute=self.minute,
                            timezone=self.timezone)
Beispiel #4
0
 def appveyor_image_url(self):
     if not self.uses_appveyor:
         return None
     template = 'https://ci.appveyor.com/api/projects/status/github/{owner}/{name}?branch={branch}&svg=true'
     return template.format(name=self.name, owner=self.owner, branch=self.branch)