Current section

32 Versions

Jump to

Compare versions

4 files changed
+27 additions
-11 deletions
  @@ -1,6 +1,15 @@
1 1 # Changelog
2 2
3 - ## Unreleased changes
3 + ## 4.4.0 (2018-11-29)
4 +
5 + ### Enhancements
6 + - Interpolation of placeholders in table keys thanks to @kiurchv [#105]
7 +
8 + ### Bug fixes
9 + None
10 +
11 + ### Backwards incompatible changes
12 + None
4 13
5 14 ## 4.3.0 (2018-09-10)
  @@ -57,14 +57,14 @@
57 57 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/meadsteve/white-bread">>}]}.
58 58 {<<"name">>,<<"white_bread">>}.
59 59 {<<"requirements">>,
60 - [[{<<"app">>,<<"poison">>},
61 - {<<"name">>,<<"poison">>},
62 - {<<"optional">>,true},
63 - {<<"repository">>,<<"hexpm">>},
64 - {<<"requirement">>,<<"~> 3.1">>}],
65 - [{<<"app">>,<<"gherkin">>},
60 + [[{<<"app">>,<<"gherkin">>},
66 61 {<<"name">>,<<"gherkin">>},
67 62 {<<"optional">>,false},
68 63 {<<"repository">>,<<"hexpm">>},
69 - {<<"requirement">>,<<"~> 1.4">>}]]}.
70 - {<<"version">>,<<"4.3.0">>}.
64 + {<<"requirement">>,<<"~> 1.4">>}],
65 + [{<<"app">>,<<"poison">>},
66 + {<<"name">>,<<"poison">>},
67 + {<<"optional">>,true},
68 + {<<"repository">>,<<"hexpm">>},
69 + {<<"requirement">>,<<"~> 3.1">>}]]}.
70 + {<<"version">>,<<"4.4.0">>}.
  @@ -50,9 +50,16 @@ defmodule WhiteBread.Runners.ScenarioOutlineRunner do
50 50 placeholder = "<#{to_string(replace)}>"
51 51 updated_text = initial_text
52 52 |> String.replace(placeholder, with)
53 +
53 54 updated_table = for row <- initial_table do
54 - Map.new row, fn {key, value} -> {key, String.replace(value, placeholder, with)} end
55 + for {key, value} <- row, into: %{} do
56 + key = key |> Atom.to_string |> String.replace(placeholder, with) |> String.to_atom
57 + value = String.replace(value, placeholder, with)
58 +
59 + {key, value}
55 60 end
61 + end
62 +
56 63 %{step | text: updated_text, table_data: updated_table}
57 64 end
  @@ -13,7 +13,7 @@ defmodule WhiteBread.Mixfile do
13 13 licenses: ["MIT"],
14 14 links: %{"GitHub" => "https://github.com/meadsteve/white-bread"},
15 15 ],
16 - version: "4.3.0",
16 + version: "4.4.0",
17 17 elixir: "~> 1.2",
18 18 aliases: aliases(),
19 19 deps: deps()]