Skip to content

Commit

Permalink
fix fetching library version for request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkittelson committed Apr 29, 2015
1 parent 3f6ed2f commit 5c9dcbd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Install the [Hex.pm](http://hex.pm) package
```elixir
def deps do
[
{:zencoder, "~> 1.0.0"},
{:zencoder, "~> 1.0.1"},
{:ibrowse, github: "cmullaparthi/ibrowse", tag: "v4.1.0"},
]
end
Expand Down
4 changes: 3 additions & 1 deletion lib/zencoder/resource.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ defmodule Zencoder.Resource do
end

def headers(options) do
{:ok, version} = :application.get_key(:zencoder, :vsn)

[
{"Accept", "application/json"},
{"Content-Type", "application/json"},
{"Zencoder-Api-Key", options[:api_key] || Zencoder.api_key},
{"User-Agent", "Zencoder-Elixir v#{Zencoder.Mixfile.project[:version]}"}
{"User-Agent", "Zencoder-Elixir v#{version}"}
]
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Zencoder.Mixfile do
def project do
[
app: :zencoder,
version: "1.0.0",
version: "1.0.1",
elixir: "~> 1.0.0",
test_coverage: [tool: ExCoveralls],
deps: deps,
Expand Down

0 comments on commit 5c9dcbd

Please sign in to comment.