Rename CargoTagger as CargoBump

This commit is contained in:
Martin Sehnoutka 2016-11-30 16:19:48 +01:00
parent 9bc7a0f76f
commit f7014b7527
4 changed files with 7 additions and 7 deletions

View file

@ -7,4 +7,4 @@ from tito.tagger.main import \
from tito.tagger.rheltagger import RHELTagger from tito.tagger.rheltagger import RHELTagger
from tito.tagger.zstreamtagger import zStreamTagger from tito.tagger.zstreamtagger import zStreamTagger
from tito.tagger.cargotagger import CargoTagger from tito.tagger.cargobump import CargoBump

View file

@ -4,7 +4,7 @@ import os
from tito.common import debug from tito.common import debug
class CargoTagger: class CargoBump:
""" """
Cargo is package manager for the Rust programming Cargo is package manager for the Rust programming
language: http://doc.crates.io/manifest.html language: http://doc.crates.io/manifest.html

View file

@ -41,7 +41,7 @@ from tito.common import (debug, error_out, run_command,
from tito.compat import write, StringIO, getstatusoutput from tito.compat import write, StringIO, getstatusoutput
from tito.exception import TitoException from tito.exception import TitoException
from tito.config_object import ConfigObject from tito.config_object import ConfigObject
from tito.tagger.cargotagger import CargoTagger from tito.tagger.cargobump import CargoBump
class VersionTagger(ConfigObject): class VersionTagger(ConfigObject):
@ -159,7 +159,7 @@ class VersionTagger(ConfigObject):
if project_type == "cargo": if project_type == "cargo":
if file_name is None: if file_name is None:
file_name = "Cargo.toml" file_name = "Cargo.toml"
CargoTagger.tag_new_version(new_version, os.path.join(self.full_project_dir, file_name)) CargoBump.tag_new_version(new_version, os.path.join(self.full_project_dir, file_name))
else: else:
# TODO: write a list of supported managers somewhere (man page, --help) # TODO: write a list of supported managers somewhere (man page, --help)
debug('Unknown project type: ' + project_type) debug('Unknown project type: ' + project_type)

View file

@ -21,7 +21,7 @@ from tito.common import (replace_version, find_spec_like_file, increase_version,
_out) _out)
from tito.compat import StringIO from tito.compat import StringIO
from tito.tagger import CargoTagger from tito.tagger import CargoBump
import os import os
import re import re
@ -279,7 +279,7 @@ class CargoTransformTest(unittest.TestCase):
with open(self.config_file, 'w') as f: with open(self.config_file, 'w') as f:
f.write(cargo_toml) f.write(cargo_toml)
CargoTagger.tag_new_version("2.2.2-1", self.config_file) CargoBump.tag_new_version("2.2.2-1", self.config_file)
output = open(self.config_file, 'r').readlines() output = open(self.config_file, 'r').readlines()
self.assertEquals(5, len(output)) self.assertEquals(5, len(output))
@ -304,7 +304,7 @@ class CargoTransformTest(unittest.TestCase):
with open(self.config_file, 'w') as f: with open(self.config_file, 'w') as f:
f.write(cargo_toml) f.write(cargo_toml)
CargoTagger.tag_new_version("3.3.3-1", self.config_file) CargoBump.tag_new_version("3.3.3-1", self.config_file)
output = open(self.config_file, 'r').readlines() output = open(self.config_file, 'r').readlines()
self.assertEquals(11, len(output)) self.assertEquals(11, len(output))