lib/travis/cli/repo_command.rb in travis-1.8.13.travis.1141.9 vs lib/travis/cli/repo_command.rb in travis-1.8.13.travis.1148.9
- old
+ new
@@ -16,11 +16,11 @@
abstract
def setup
setup_enterprise
error "Can't figure out GitHub repo name. Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. travis <command> -r <owner>/<repo>)" unless self.slug ||= find_slug
- error "GitHub repo name is invalid, it should be on the form 'owner/repo'" unless self.slug.include?("/")
+ error "GitHub repo name is invalid, it should be of the form 'owner/repo'" unless self.slug.include?("/")
self.api_endpoint = detect_api_endpoint
super
repository.load # makes sure we actually have access to the repo
end
@@ -66,19 +66,19 @@
git_remote = `git config --get branch.#{git_head}.remote 2>#{IO::NULL}`.chomp
git_remote = 'origin' if git_remote.empty?
git_info = `git ls-remote --get-url #{git_remote} 2>#{IO::NULL}`.chomp
if parse_remote(git_info) =~ GIT_REGEX
- detectected_slug = $1
+ detected_slug = $1
if interactive?
- if agree("Detected repository as #{color(detectected_slug, :info)}, is this correct? ") { |q| q.default = 'yes' }
- detectected_slug
+ if agree("Detected repository as #{color(detected_slug, :info)}, is this correct? ") { |q| q.default = 'yes' }
+ detected_slug
else
- ask("Repository slug (owner/name): ") { |q| q.default = detectected_slug }
+ ask("Repository slug (owner/name): ") { |q| q.default = detected_slug }
end
else
- info "detected repository as #{color(detectected_slug, :bold)}"
- detectected_slug
+ info "detected repository as #{color(detected_slug, :bold)}"
+ detected_slug
end
end
end
def parse_remote(url)