lib/preservation/client.rb in preservation-client-1.0.0 vs lib/preservation/client.rb in preservation-client-2.0.0
- old
+ new
@@ -5,10 +5,11 @@
require 'active_support/core_ext/object/blank'
require 'faraday'
require 'singleton'
require 'zeitwerk'
+# Provides version exception to camels-case conversion
class PreservationClientInflector < Zeitwerk::Inflector
def camelize(basename, _abspath)
case basename
when 'version'
'VERSION'
@@ -22,9 +23,10 @@
loader.inflector = PreservationClientInflector.new
loader.push_dir(File.absolute_path("#{__FILE__}/../.."))
loader.setup
module Preservation
+ # REST API client wrapper for PreservationCatalog with error handling
class Client
class Error < StandardError; end
# Error that is raised when the remote server returns a 404 Not Found
class NotFoundError < Error; end