lib/shutl/resource/errors.rb in shutl_resource-1.5.2 vs lib/shutl/resource/errors.rb in shutl_resource-1.5.3

- old
+ new

@@ -8,18 +8,17 @@ # This NoQuotesGenerated is shutl specific corresponding to HTTP status 299. # The correct solution to this would be to remove this exception from the gem # and handle specifically in a QuoteCollection resource in for example the # 'shutl' gem. -Shutl::NoQuotesGenerated = Class.new Shutl::Resource::Error - -Shutl::BadRequest = Class.new Shutl::Resource::Error -Shutl::UnauthorizedAccess = Class.new Shutl::Resource::Error -Shutl::ForbiddenAccess = Class.new Shutl::Resource::Error -Shutl::ResourceNotFound = Class.new Shutl::Resource::Error -Shutl::ResourceConflict = Class.new Shutl::Resource::Error -Shutl::ResourceGone = Class.new Shutl::Resource::Error -Shutl::ResourceInvalid = Class.new Shutl::Resource::Error -Shutl::ServerError = Class.new Shutl::Resource::Error -Shutl::ServiceUnavailable = Class.new Shutl::Resource::Error - - +unless Shutl.const_defined?('NoQuotesGenerated') + Shutl::NoQuotesGenerated = Class.new Shutl::Resource::Error + Shutl::BadRequest = Class.new Shutl::Resource::Error + Shutl::UnauthorizedAccess = Class.new Shutl::Resource::Error + Shutl::ForbiddenAccess = Class.new Shutl::Resource::Error + Shutl::ResourceNotFound = Class.new Shutl::Resource::Error + Shutl::ResourceConflict = Class.new Shutl::Resource::Error + Shutl::ResourceGone = Class.new Shutl::Resource::Error + Shutl::ResourceInvalid = Class.new Shutl::Resource::Error + Shutl::ServerError = Class.new Shutl::Resource::Error + Shutl::ServiceUnavailable = Class.new Shutl::Resource::Error +end \ No newline at end of file