lib/ezid/configuration.rb in ezid-client-1.7.1 vs lib/ezid/configuration.rb in ezid-client-1.8.0
- old
+ new
@@ -18,13 +18,10 @@
attr_accessor :host
# EZID TCP/IP port
attr_accessor :port
- # Use HTTPS?
- attr_accessor :use_ssl
-
# HTTP read timeout (seconds)
attr_accessor :timeout
# EZID user name
attr_accessor :user
@@ -42,11 +39,10 @@
def initialize
@user = ENV["EZID_USER"]
@password = ENV["EZID_PASSWORD"]
@host = ENV["EZID_HOST"] || HOST
@port = ENV["EZID_PORT"] || PORT
- @use_ssl = true unless ENV["EZID_USE_SSL"] == false.to_s
@timeout = ENV["EZID_TIMEOUT"] || TIMEOUT
@default_shoulder = ENV["EZID_DEFAULT_SHOULDER"]
end
def inspect
@@ -63,9 +59,20 @@
Identifier
end
def metadata
Metadata
+ end
+
+ def use_ssl
+ warn "[DEPRECATION] `use_ssl` is deprecated and will be removed in ezid-client v2.0." \
+ " EZID requires SSL as of April 30, 2017."
+ true
+ end
+
+ def use_ssl=(*)
+ warn "[DEPRECATION] `use_ssl=` is deprecated and will be removed in ezid-client v2.0." \
+ " EZID requires SSL as of April 30, 2017."
end
end
end