lib/researchable/freedcamp_api/sessions/signed_session.rb in researchable-freedcamp-api-0.1.3 vs lib/researchable/freedcamp_api/sessions/signed_session.rb in researchable-freedcamp-api-0.1.4
- old
+ new
@@ -27,13 +27,13 @@
attr_reader :use_cache
# rubocop:enable Style/AccessorGrouping
sig { params(public_key: String, secret_key: String, use_cache: T::Boolean).void }
- def initialize(public_key: ENV['PUBLIC_KEY'], secret_key: ENV['SECRET_KEY'], use_cache: true)
+ def initialize(public_key: ENV['PUBLIC_KEY'], secret_key: ENV['SECRET_KEY'], use_cache: ENV['USE_CACHE'])
@public_key = public_key
@secret_key = secret_key
- @use_cache = use_cache
+ @use_cache = use_cache == 'true'
end
sig { override.params(path: String).returns(T::Hash[T.untyped, T.untyped]) }
def get(path)
call_url(path, :get)