You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Struct has been used in Pushover since version 3. The keyword_init: true argument is being used, and this isn't available in Ruby 2.4 or earlier.
To Reproduce
Run unit tests in Ruby 2.4 & 2.3, etc.
The unit tests will fail:
An error occurred while loading ./spec/pushover/response_spec.rb.
Failure/Error:
Message = Struct.new(:token, :user, :message, :attachment, :device, :title, :url, :url_title, :priority, :sound, :timestamp, :expire, :retry, :callback, keyword_init: true) do
# push the configured message to pushover.
# @return [Response] response for the receipt request
def push
%i[token user message].each { |param| raise "#{param} must be supplied" unless send param }
Response.create_from_excon_response Excon.post(path: '1/messages.json', query: to_h)
end
end
TypeError:
{:keyword_init=>true} is not a symbol
# ./lib/pushover/message.rb:29:in `new'
# ./lib/pushover/message.rb:29:in `<module:Pushover>'
# ./lib/pushover/message.rb:1:in `<top (required)>'
# ./lib/pushover.rb:4:in `<top (required)>'
# ./spec/spec_helper.rb:17:in `<top (required)>'
# ./spec/pushover/response_spec.rb:1:in `<top (required)>'
Ruby 2.4 (and earlier) are EOL. So fixing the issue is one option, but just adding a Ruby version constraint to the gemspec is another option. e.g. spec.required_ruby_version = '~> 2.5'.
I'm happy to make a PR for either option.
Can I also suggest adding multiple ruby versions to the TravisCI tests?
The text was updated successfully, but these errors were encountered:
Describe the bug
Can't use v3.x.x in Ruby <= 2.4.
Struct
has been used in Pushover since version 3. Thekeyword_init: true
argument is being used, and this isn't available in Ruby 2.4 or earlier.To Reproduce
Run unit tests in Ruby 2.4 & 2.3, etc.
The unit tests will fail:
Ruby 2.4 (and earlier) are EOL. So fixing the issue is one option, but just adding a Ruby version constraint to the gemspec is another option. e.g.
spec.required_ruby_version = '~> 2.5'
.I'm happy to make a PR for either option.
Can I also suggest adding multiple ruby versions to the TravisCI tests?
The text was updated successfully, but these errors were encountered: