Skip to content

Commit

Permalink
Merge pull request #5 from change/mertens/switch-yaml-parser
Browse files Browse the repository at this point in the history
Swap out yomel for yaml_elixir
  • Loading branch information
mertonium authored May 25, 2018
2 parents 3cf9b44 + 56ac5ee commit 830ae7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/linguist/memorized_vocabulary.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ defmodule Linguist.MemorizedVocabulary do
:ets.new(:translations_registry, [:named_table, :set, :protected])
end

{decode_status, [file_data]} = Yomel.decode_file(source)
{decode_status, [file_data]} = YamlElixir.read_all_from_file(source)
if decode_status != :ok do
raise %TranslationDecodeError{message: "Decode failed for file #{source}"}
end
Expand All @@ -144,7 +144,7 @@ defmodule Linguist.MemorizedVocabulary do
"#{acc.current_prefix}.#{key}"
end

%{
%{
paths: Map.put(acc.paths, key_name, value),
current_prefix: acc.current_prefix
}
Expand Down
2 changes: 1 addition & 1 deletion lib/linguist/vocabulary.ex
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ defmodule Linguist.Vocabulary do
will not work as expected if called directly.
"""
def _load_yaml_file(source) do
{:ok, [result]} = Yomel.decode_file(source)
{:ok, [result]} = YamlElixir.read_all_from_file(source)
result
|> Enum.reduce([], &Linguist.Vocabulary._yaml_reducer/2)
end
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ defmodule Linguist.Mixfile do
end

def application do
[applications: []]
[applications: [:yaml_elixir]]
end

defp deps do
[
{:ex_cldr, "~> 1.5"},
{:jason, "~> 1.0"},
{:yomel, "~> 0.5"},
{:yaml_elixir, "~> 2.0"},
{:credo, "~> 0.9.0", only: [:dev, :test], runtime: false}
]
end
Expand Down

0 comments on commit 830ae7c

Please sign in to comment.