fcm
fcm copied to clipboard
JSON Key Path Fails to Load Even When Readable
About this line: https://github.com/decision-labs/fcm/blob/ec489fa22dd11185d487f781c009bca782144d17/lib/fcm.rb#L296C22-L296C35
I suggest the json_key method should look like this:
def json_key
@json_key ||= if @json_key_path.respond_to?(:read)
@json_key_path.read
else
File.open(@json_key_path)
end
end
This will make it compatible with an instance of StringIO object etc.