Commit fa340595746ba18fae3c6422ff4c9ea4af8e3023
1 parent
ae1a3148
Exists in
spb-stable
and in
3 other branches
Default message for SatelliteNotExistError
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
lib/gitlab/satellite/satellite.rb
| 1 | module Gitlab | 1 | module Gitlab |
| 2 | - class SatelliteNotExistError < StandardError; end | 2 | + class SatelliteNotExistError < StandardError |
| 3 | + def initialize(msg = "Satellite doesn't exist") | ||
| 4 | + super | ||
| 5 | + end | ||
| 6 | + end | ||
| 3 | 7 | ||
| 4 | module Satellite | 8 | module Satellite |
| 5 | class Satellite | 9 | class Satellite |
| @@ -17,12 +21,8 @@ module Gitlab | @@ -17,12 +21,8 @@ module Gitlab | ||
| 17 | Gitlab::Satellite::Logger.error(message) | 21 | Gitlab::Satellite::Logger.error(message) |
| 18 | end | 22 | end |
| 19 | 23 | ||
| 20 | - def raise_no_satellite | ||
| 21 | - raise SatelliteNotExistError.new("Satellite doesn't exist") | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | def clear_and_update! | 24 | def clear_and_update! |
| 25 | - raise_no_satellite unless exists? | 25 | + raise SatelliteNotExistError unless exists? |
| 26 | 26 | ||
| 27 | File.exists? path | 27 | File.exists? path |
| 28 | @repo = nil | 28 | @repo = nil |
| @@ -55,7 +55,7 @@ module Gitlab | @@ -55,7 +55,7 @@ module Gitlab | ||
| 55 | # * Changes the current directory to the satellite's working dir | 55 | # * Changes the current directory to the satellite's working dir |
| 56 | # * Yields | 56 | # * Yields |
| 57 | def lock | 57 | def lock |
| 58 | - raise_no_satellite unless exists? | 58 | + raise SatelliteNotExistError unless exists? |
| 59 | 59 | ||
| 60 | File.open(lock_file, "w+") do |f| | 60 | File.open(lock_file, "w+") do |f| |
| 61 | begin | 61 | begin |
| @@ -77,7 +77,7 @@ module Gitlab | @@ -77,7 +77,7 @@ module Gitlab | ||
| 77 | end | 77 | end |
| 78 | 78 | ||
| 79 | def repo | 79 | def repo |
| 80 | - raise_no_satellite unless exists? | 80 | + raise SatelliteNotExistError unless exists? |
| 81 | 81 | ||
| 82 | @repo ||= Grit::Repo.new(path) | 82 | @repo ||= Grit::Repo.new(path) |
| 83 | end | 83 | end |