Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
Corrections about typos and example code. Increase the version to 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ertgl committed Dec 20, 2017
1 parent fff5445 commit cb2ccb6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.elixir_ls

# The directory Mix will write compiled artifacts to.
/mix.lock
/_build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ end

def deps do
[
{:distributed, "~> 0.1.0"},
{:distributed, "~> 0.1.3"},
]
end
```
12 changes: 7 additions & 5 deletions lib/distributed.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,19 @@ defmodule Distributed do
end
def set(key, value) do
Distributed.Replicator.GenServer.cast(__MODULE__.process_id(), {:set, key, value})
|> List.first()
{_node_name, result} = Distributed.Replicator.GenServer.cast(__MODULE__.process_id(), {:set, key, value})
|> List.first()
result
end
def has?(key) do
Distributed.Scaler.GenServer.call(__MODULE__.process_id(), {:has, key})
end
def pop(key, default \\\\ nil) do
Distributed.Replicator.GenServer.call(__MODULE__.process_id(), {:pop, key, default})
|> List.first()
{_node_name, result} = Distributed.Replicator.GenServer.call(__MODULE__.process_id(), {:pop, key, default})
|> List.first()
result
end
end
Expand All @@ -80,7 +82,7 @@ defmodule Distributed do
def deps do
[
{:distributed, "~> 0.1.0"},
{:distributed, "~> 0.1.3"},
]
end
"""
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Distributed.Mixfile do
description: description(),
package: package(),
app: :distributed,
version: "0.1.2",
version: "0.1.3",
elixir: "~> 1.4",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit cb2ccb6

Please sign in to comment.