Comments (6)
@nholden Very nice catch. I'll get this into a bug fix release as soon as I can. Thanks!
from mailgun-ruby.
Sorry about that! I will look into it and fix it up on Monday!
from mailgun-ruby.
@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.
@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.
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.
Hi, has there been a release yet where this is included?
from mailgun-ruby.
Related Issues (20)
- TypeError: no implicit conversion of nil into String HOT 1
- Use multiple domains with different sending keys HOT 4
- Is there a way to handle different recipient variables with same email HOT 1
- The delete_bounce method requires email addresses to be escaped. HOT 2
- NoMethodError (undefined method 'proxy_url' for Mailgun:Module) HOT 2
- Error api_host after update to 1.2.7 HOT 2
- TypeError (no implicit conversion of nil into String) HOT 5
- Primitive types are serialized twice to JSON HOT 1
- Abandoned dependency: rest-client abandoned in 2019 HOT 7
- mailgun-ruby 1.2.9 not on rubygems HOT 1
- Response object can be nil HOT 2
- Getting error : NameError: uninitialized constant MailgunRetriesCron HOT 2
- delete_if returning true from function when encountering a nil value HOT 3
- Follow up error while processing response of an unauthorized request
- single-verification HOT 1
- Next page HOT 1
- Headers are always downcased when using Railgun HOT 1
- events abstraction issues
- Missing docs for Templates
- Remove `OpenStruct` usage, will warn in Ruby 3.4, raise in Ruby 3.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailgun-ruby.