Skip to content

Commit

Permalink
update decorator, and fix context
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed May 16, 2018
1 parent 60b32da commit 026ad82
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/plug/add_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ defmodule Spandex.Plug.AddContext do
|> Map.put(:params, params)
|> route_name()
|> add_query_params(conn.params, opts[:query_params])
|> URI.decode_www_form()

%{
resource: String.upcase(conn.method) <> "/" <> route,
resource: String.upcase(conn.method) <> " /" <> route,
method: conn.method,
url: conn.request_path,
type: :web,
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ defmodule Spandex.Mixfile do
[
{:confex, "3.2.2"},
{:credo, "~> 0.8", only: [:dev, :test], runtime: false},
{:decorator, "~> 1.2.2"},
{:decorator, "~> 1.2.3"},
{:ex_doc, ">= 0.0.0", only: :dev},
{:excoveralls, "~> 0.6", only: :test},
{:httpoison, "~> 0.13"},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], [], "hexpm"},
"confex": {:hex, :confex, "3.2.2", "4fc6161d1bbbe3f24581758059dce285fa9d2719fe41a15b396c4f32250ef7c1", [:mix], []},
"credo": {:hex, :credo, "0.8.1", "137efcc99b4bc507c958ba9b5dff70149e971250813cbe7d4537ec7e36997402", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, optional: false]}]},
"decorator": {:hex, :decorator, "1.2.2", "28f88fe99b1ec462cb1a394e568f50fbd0e6e949602372a2d0365181c997ed7d", [:mix], [], "hexpm"},
"decorator": {:hex, :decorator, "1.2.3", "258681ae943e57bd92d821ea995e3994b4e0b62ae8404b5d892cb8b23b55b050", [:mix], [], "hexpm"},
"deep_merge": {:hex, :deep_merge, "0.1.1", "c27866a7524a337b6a039eeb8dd4f17d458fd40fbbcb8c54661b71a22fffe846", [:mix], []},
"dialyxir": {:hex, :dialyxir, "0.5.0", "5bc543f9c28ecd51b99cc1a685a3c2a1a93216990347f259406a910cf048d1d7", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], []},
Expand Down
2 changes: 1 addition & 1 deletion test/plug/add_context_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Spandex.Plug.AddContextTest do
assert type == :web
assert Map.get(meta, "http.url") == "/dashboard"
assert Map.get(meta, "http.method") == "GET"
assert resource == "GET dashboard"
assert resource == "GET /dashboard"
end
end
end

0 comments on commit 026ad82

Please sign in to comment.