File tree Expand file tree Collapse file tree 6 files changed +20
-14
lines changed Expand file tree Collapse file tree 6 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ by adding `gnuplot` to your list of dependencies in `mix.exs`:
100
100
``` elixir
101
101
def deps do
102
102
[
103
- {:gnuplot , " ~> 0.19.86 " }
103
+ {:gnuplot , " ~> 0.19.87 " }
104
104
]
105
105
end
106
106
```
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ defmodule Gnuplot do
24
24
25
25
alias Gnuplot.Commands
26
26
import Gnuplot.Dataset
27
+ import Gnuplot.Bin
27
28
28
29
@ type command_term :: atom ( ) | charlist ( ) | number ( ) | Range . t ( ) | String . t ( )
29
30
@@ -65,17 +66,6 @@ defmodule Gnuplot do
65
66
|> Stream . run ( )
66
67
end
67
68
68
- @ doc """
69
- Find the gnuplot executable.
70
- """
71
- @ spec gnuplot_bin ( ) :: { :error , :gnuplot_missing } | { :ok , :file . name ( ) }
72
- def gnuplot_bin do
73
- case :os . find_executable ( String . to_charlist ( "gnuplot" ) ) do
74
- false -> { :error , :gnuplot_missing }
75
- path -> { :ok , path }
76
- end
77
- end
78
-
79
69
@ doc "Build a comma separated list from a list of terms."
80
70
def list ( xs ) when is_list ( xs ) , do: % Commands.List { xs: xs }
81
71
Original file line number Diff line number Diff line change
1
+ defmodule Gnuplot.Bin do
2
+ @ moduledoc false
3
+
4
+ @ doc """
5
+ Find the gnuplot executable.
6
+ """
7
+ @ spec gnuplot_bin ( ) :: { :error , :gnuplot_missing } | { :ok , :file . name ( ) }
8
+ def gnuplot_bin do
9
+ case :os . find_executable ( String . to_charlist ( "gnuplot" ) ) do
10
+ false -> { :error , :gnuplot_missing }
11
+ path -> { :ok , path }
12
+ end
13
+ end
14
+ end
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ defmodule Gnuplot.Commands do
5
5
6
6
defprotocol Command do
7
7
@ spec formatg ( term ( ) ) :: String . t ( )
8
+
9
+ @ doc "Format Elixir term as a Gnuplot String"
8
10
def formatg ( cmd )
9
11
end
10
12
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ defmodule Gnuplot.MixProject do
4
4
def project do
5
5
[
6
6
app: :gnuplot ,
7
- version: "0.19.86 " ,
7
+ version: "0.19.87 " ,
8
8
elixir: "~> 1.6" ,
9
9
start_permanent: Mix . env ( ) == :prod ,
10
10
description: "Interface between Elixir and Gnuplot graphing library" ,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ defmodule GnuplotTest do
54
54
55
55
@ tag gnuplot: true
56
56
test "Gnuplot is installed" do
57
- assert { :ok , path } = G . gnuplot_bin ( )
57
+ assert { :ok , path } = Gnuplot.Bin . gnuplot_bin ( )
58
58
assert File . exists? ( path )
59
59
end
60
60
You can’t perform that action at this time.
0 commit comments