Skip to content

Commit

Permalink
Merge pull request #6 from robmckinnon/test-elixir-1.2
Browse files Browse the repository at this point in the history
Test elixir 1.2
  • Loading branch information
robmckinnon authored Aug 7, 2016
2 parents 166b99c + 353cc85 commit b6d2560
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: elixir
elixir:
- 1.2.6
- 1.3.1
after_script:
- mix deps.get --only docs
Expand Down
14 changes: 7 additions & 7 deletions lib/data_morph/csv.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ defmodule DataMorph.Csv do
## Examples
Convert blank string to empty stream.
iex> DataMorph.Csv.to_stream_of_maps("") \
iex> DataMorph.Csv.to_stream_of_maps("")
iex> |> Enum.to_list
[]
Map a string of lines separated by \n to a stream of maps with
header row as keys:
iex> "name,iso\n" <>
...> "New Zealand,nz\n" <>
...> "United Kingdom,gb" \
...> |> DataMorph.Csv.to_stream_of_maps \
...> "United Kingdom,gb"
...> |> DataMorph.Csv.to_stream_of_maps
...> |> Enum.to_list
[
%{"name" => "New Zealand", "iso" => "nz"},
Expand All @@ -29,10 +29,10 @@ defmodule DataMorph.Csv do
header row as keys:
iex> "name,iso\n" <>
...> "New Zealand,nz\n" <>
...> "United Kingdom,gb" \
...> |> String.split("\n") \
...> |> Stream.map(& &1) \
...> |> DataMorph.Csv.to_stream_of_maps \
...> "United Kingdom,gb"
...> |> String.split("\n")
...> |> Stream.map(& &1)
...> |> DataMorph.Csv.to_stream_of_maps
...> |> Enum.to_list
[
%{"name" => "New Zealand", "iso" => "nz"},
Expand Down
14 changes: 7 additions & 7 deletions lib/data_morph/tsv.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ defmodule DataMorph.Tsv do
## Examples
Convert blank string to empty stream.
iex> DataMorph.Tsv.to_stream_of_maps("") \
iex> DataMorph.Tsv.to_stream_of_maps("")
iex> |> Enum.to_list
[]
Map a string of lines separated by \n to a stream of maps with
header row as keys:
iex> "name\tiso\n" <>
...> "New Zealand\tnz\n" <>
...> "United Kingdom\tgb" \
...> |> DataMorph.Tsv.to_stream_of_maps \
...> "United Kingdom\tgb"
...> |> DataMorph.Tsv.to_stream_of_maps
...> |> Enum.to_list
[
%{"name" => "New Zealand", "iso" => "nz"},
Expand All @@ -29,10 +29,10 @@ defmodule DataMorph.Tsv do
header row as keys:
iex> "name\tiso\n" <>
...> "New Zealand\tnz\n" <>
...> "United Kingdom\tgb" \
...> |> String.split("\n") \
...> |> Stream.map(& &1) \
...> |> DataMorph.Tsv.to_stream_of_maps \
...> "United Kingdom\tgb"
...> |> String.split("\n")
...> |> Stream.map(& &1)
...> |> DataMorph.Tsv.to_stream_of_maps
...> |> Enum.to_list
[
%{"name" => "New Zealand", "iso" => "nz"},
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule DataMorph.Mixfile do
licenses: ["MIT"],
links: %{github: "https://github.com/robmckinnon/data_morph" },
files: ~w(lib) ++
~w(LICENSE mix.exs README.md),
~w(LICENSE mix.exs README.md CHANGELOG.md),
]
end
end

0 comments on commit b6d2560

Please sign in to comment.