SparkPost / elixir-sparkpost

SparkPost client library for Elixir https://developers.sparkpost.com
Apache License 2.0
44 stars 13 forks source link

`:application.get_env(:sparkpost, :vsn)` returns undefined #23

Closed DavidAntaramian closed 7 years ago

DavidAntaramian commented 7 years ago

Discussed with @ewandennis on Slack, but filing this ticket for reference/

What probably want is the function Application.spec(:sparkpost, :vsn)…which will query the VM for the application version number. The problem currently is that it’s not going to be in the env for the app as far as I know. Although, I’m having problems getting any specs locally for it anyways. From our corporate app:

iex(1)> Application.spec(:sparkpost, :vsn)
nil
iex(2)> Application.spec(:poison, :vsn)   
'3.0.0'
iex(3)> Application.spec(:hackney, :vsn)
'1.6.3'
iex(4)> Application.spec(:phoenix, :vsn)
'1.2.1'

This may be because the release was built on an older version of Elixir, so it didn't package the necessary metadata for this.