lib/bundler/alive/client/source_code_client.rb in bundler-alive-0.1.2 vs lib/bundler/alive/client/source_code_client.rb in bundler-alive-0.1.3
- old
+ new
@@ -5,13 +5,15 @@
module Client
#
# Represents a source code client
#
class SourceCodeClient
+ # Error of searching repository
class SearchRepositoryError < StandardError
end
+ # Error of rate limit exceeded
class RateLimitExceededError < StandardError
end
SERVICE_WITH_STRATEGIES = {
SourceCodeRepository::Service::GITHUB => GitHubApi
@@ -29,13 +31,14 @@
# @return [SourceCodeClient]
#
def initialize(service_name:)
raise ArgumentError, "Unknown service: #{service_name}" unless SERVICE_WITH_STRATEGIES.key?(service_name)
- service = SERVICE_WITH_STRATEGIES[service_name]
- extend service
+ strategy = SERVICE_WITH_STRATEGIES[service_name]
+ extend strategy
@client = create_client
+ @error_messages = []
super()
end
end
end