Giter VIP home page Giter VIP logo

Comments (6)

pirogoeth avatar pirogoeth commented on July 29, 2024 1

@nholden Very nice catch. I'll get this into a bug fix release as soon as I can. Thanks!

from mailgun-ruby.

pirogoeth avatar pirogoeth commented on July 29, 2024

Sorry about that! I will look into it and fix it up on Monday!

from mailgun-ruby.

KnownSubset avatar KnownSubset commented on July 29, 2024

@pirogoeth I started to look into this myself. An easily solvable blocker is that Rails isn't listed a dev dependency in the gemspec. Is there any reason why and if not, is there a minimum version of Rails that should be supported? I couldn't find any reference in the repo.

from mailgun-ruby.

pirogoeth avatar pirogoeth commented on July 29, 2024

@KnownSubset I didn't pin Rails into the gemspec since I packaged Railgun into the same gem. A solution would be to split Railgun into a separate repo but I do not see much benefit to that. In my railgun-sample application I have rails >= 5.0.0.1 as the minimum dependency.

Any recommendations on how to handle this?

from mailgun-ruby.

nholden avatar nholden commented on July 29, 2024

I ran into this error message as well when I tried to configure a Rails app to use the :mailgun ActiveMailer delivery method. It looks like there's some code in Railgun that tried to anticipate this, but I'm not sure it's working as intended.

# reject blank values
message.delete_if do |k, v|
  v.nil? or (v.respond_to?(:empty) and v.empty?)
end

For a message that includes { cc: [''] }, that blank value won't be rejected. First, [''].respond_to?(:empty) will return false (I think it should be respond_to(:empty?)). Even then, we'd need to ignore the empty string, since [].empty? is true, but [''].empty? is false.

Could we try something like this?

# reject blank values
message.delete_if do |k, v|
  v.nil? || (v.is_a?(Array) && v.reject(&:empty?).empty?)
end

from mailgun-ruby.

rept avatar rept commented on July 29, 2024

Hi, has there been a release yet where this is included?

from mailgun-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.