diff options
Diffstat (limited to 'priv')
-rw-r--r-- | priv/shell-completion/bash/rebar3 | 40 | ||||
-rw-r--r-- | priv/shell-completion/fish/rebar3.fish | 8 | ||||
-rw-r--r-- | priv/shell-completion/zsh/_rebar3 | 8 | ||||
-rw-r--r-- | priv/templates/app.erl | 4 | ||||
-rw-r--r-- | priv/templates/escript_mod.erl | 2 | ||||
-rw-r--r-- | priv/templates/escript_rebar.config | 6 | ||||
-rw-r--r-- | priv/templates/gitignore | 6 | ||||
-rw-r--r-- | priv/templates/mod.erl | 2 | ||||
-rw-r--r-- | priv/templates/otp_app.app.src | 6 | ||||
-rw-r--r-- | priv/templates/otp_lib.app.src | 4 | ||||
-rw-r--r-- | priv/templates/plugin.erl | 4 | ||||
-rw-r--r-- | priv/templates/provider.erl | 4 | ||||
-rw-r--r-- | priv/templates/relx_rebar.config | 4 | ||||
-rw-r--r-- | priv/templates/sup.erl | 2 | ||||
-rw-r--r-- | priv/templates/sys.config | 2 |
15 files changed, 55 insertions, 47 deletions
diff --git a/priv/shell-completion/bash/rebar3 b/priv/shell-completion/bash/rebar3 index 771297c..f436bad 100644 --- a/priv/shell-completion/bash/rebar3 +++ b/priv/shell-completion/bash/rebar3 @@ -10,7 +10,8 @@ _rebar3() if [[ ${prev} == rebar3 ]] ; then sopts="-h -v" lopts="--help --version" - cmdsnvars="as \ + cmdsnvars=" \ + as \ clean \ compile \ cover \ @@ -37,7 +38,8 @@ _rebar3() update \ upgrade \ version \ - xref" + xref \ + " elif [[ ${prev} == as ]] ; then : elif [[ ${prev} == clean ]] ; then @@ -50,7 +52,8 @@ _rebar3() lopts="--reset --verbose" elif [[ ${prev} == ct ]] ; then sopts="-c -v" - lopts="--dir \ + lopts=" \ + --dir \ --suite \ --group \ --case \ @@ -74,8 +77,9 @@ _rebar3() --multiply_timetraps \ --scale_timetraps \ --create_priv_dir \ - --verbose" \ - --auto_compile + --verbose \ + --auto_compile \ + " elif [[ ${prev} == deps ]] ; then : elif [[ ${prev} == dialyzer ]] ; then @@ -88,7 +92,7 @@ _rebar3() elif [[ ${prev} == escriptize ]] ; then : elif [[ ${prev} == eunit ]] ; then - sopts="-c -e -v" + sopts="-c -e -v -d -f -m -s" lopts="--app --application --cover --dir --error_on_warning --file --module --suite --verbose" elif [[ ${prev} == help ]] ; then : @@ -97,7 +101,8 @@ _rebar3() lopts="--force" elif [[ ${prev} == path ]] ; then sopts="-s" - lopts="--app \ + lopts=" \ + --app \ --base \ --bin \ --ebin \ @@ -105,14 +110,16 @@ _rebar3() --priv \ --separator \ --src \ - --rel" + --rel \ + " elif [[ ${prev} == pkgs ]] ; then : elif [[ ${prev} == plugins ]] ; then : elif [[ ${prev} == release ]] ; then sopts="-n -v -g -u -o -h -l -p -V -d -i -a -c -r" - lopts="--relname \ + lopts=" \ + --relname \ --relvsn \ --goal \ --upfrom \ @@ -131,10 +138,12 @@ _rebar3() --sys_config \ --system_libs \ --version \ - --root" + --root \ + " elif [[ ${prev} == relup ]] ; then sopts="-n -v -g -u -o -h -l -p -V -d -i -a -c -r" - lopts="--relname \ + lopts=" \ + --relname \ --relvsn \ --goal \ --upfrom \ @@ -153,14 +162,16 @@ _rebar3() --sys_config \ --system_libs \ --version \ - --root" + --root \ + " elif [[ ${prev} == report ]] ; then : elif [[ ${prev} == shell ]] ; then : elif [[ ${prev} == tar ]] ; then sopts="-n -v -g -u -o -h -l -p -V -d -i -a -c -r" - lopts="--relname \ + lopts=" \ + --relname \ --relvsn \ --goal \ --upfrom \ @@ -179,7 +190,8 @@ _rebar3() --sys_config \ --system_libs \ --version \ - --root" + --root \ + " elif [[ ${prev} == tree ]] ; then sopts="-v" lopts="--verbose" diff --git a/priv/shell-completion/fish/rebar3.fish b/priv/shell-completion/fish/rebar3.fish index 7b63e20..770feea 100644 --- a/priv/shell-completion/fish/rebar3.fish +++ b/priv/shell-completion/fish/rebar3.fish @@ -130,11 +130,11 @@ complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a eunit -d "Run EUnit complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l app -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`" complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l application -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`" complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s c -l cover -d "Generate cover data" -complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l dir -d "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`" +complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s d -l dir -d "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`" complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunut' -s e -l error_on_warning -d "Error on invalid test specifications instead of warning" -complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l file -d "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`" -complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l module -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`" -complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`" +complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s f -l file -d "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`" +complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s m -l module -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`" +complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s s -l suite -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`" complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s v -l verbose -d "Verbose output" complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Lists of test suites to run" diff --git a/priv/shell-completion/zsh/_rebar3 b/priv/shell-completion/zsh/_rebar3 index f0fb351..a3c9c58 100644 --- a/priv/shell-completion/zsh/_rebar3 +++ b/priv/shell-completion/zsh/_rebar3 @@ -89,11 +89,11 @@ _rebar3 () { '(--app)--app[Comma separated list of application test suites to run]:suites' \ '(--application)--application[Comma separated list of application test suites to run]:applications' \ '(-c --cover)'{-c,--cover}'[Generate cover data]' \ - '(--dir)--dir[Comma separated list of dirs to load tests from]:dirs' \ + '(-d --dir)'{-d,--dir}'[Comma separated list of dirs to load tests from]:dirs' \ '(-e --error_on_warning)'{-e,--error_on_warning}'[Error on invalid test specifications instead of warning]' \ - '(--file)--file[Comma separated list of files to load tests from]:files' \ - '(--module)--module[Comma separated list of modules to load tests from]:modules' \ - '(--suite)--suite[Comma separated list of modules to load tests from]:modules' \ + '(-f --file)'{-f,--file}'[Comma separated list of files to load tests from]:files' \ + '(-m --module)'{-m,--module}'[Comma separated list of modules to load tests from]:modules' \ + '(-s --suite)'{-s,--suite}'[Comma separated list of modules to load tests from]:modules' \ '(-v --verbose)'{-v,--verbose}'[Verbose output]' \ && ret=0 ;; diff --git a/priv/templates/app.erl b/priv/templates/app.erl index 2e7b909..83eb9a3 100644 --- a/priv/templates/app.erl +++ b/priv/templates/app.erl @@ -3,7 +3,7 @@ %% @end %%%------------------------------------------------------------------- --module('{{name}}_app'). +-module({{name}}_app). -behaviour(application). @@ -16,7 +16,7 @@ %%==================================================================== start(_StartType, _StartArgs) -> - '{{name}}_sup':start_link(). + {{name}}_sup:start_link(). %%-------------------------------------------------------------------- stop(_State) -> diff --git a/priv/templates/escript_mod.erl b/priv/templates/escript_mod.erl index dd2feb8..f8a779b 100644 --- a/priv/templates/escript_mod.erl +++ b/priv/templates/escript_mod.erl @@ -1,4 +1,4 @@ --module('{{name}}'). +-module({{name}}). %% API exports -export([main/1]). diff --git a/priv/templates/escript_rebar.config b/priv/templates/escript_rebar.config index c0a3301..196f835 100644 --- a/priv/templates/escript_rebar.config +++ b/priv/templates/escript_rebar.config @@ -2,9 +2,9 @@ {deps, []}. {escript_incl_apps, - ['{{name}}']}. -{escript_top_level_app, '{{name}}'}. -{escript_name, '{{name}}'}. + [{{name}}]}. +{escript_top_level_app, {{name}}}. +{escript_name, {{name}}}. {escript_emu_args, "%%! +sbtu +A0\n"}. %% Profiles diff --git a/priv/templates/gitignore b/priv/templates/gitignore index a939dce..ced0c5e 100644 --- a/priv/templates/gitignore +++ b/priv/templates/gitignore @@ -11,9 +11,5 @@ ebin log erl_crash.dump .rebar -_rel -_deps -_plugins -_tdeps logs -_build
\ No newline at end of file +_build diff --git a/priv/templates/mod.erl b/priv/templates/mod.erl index 208307e..2f5e09e 100644 --- a/priv/templates/mod.erl +++ b/priv/templates/mod.erl @@ -1,4 +1,4 @@ --module('{{name}}'). +-module({{name}}). %% API exports -export([]). diff --git a/priv/templates/otp_app.app.src b/priv/templates/otp_app.app.src index 09e4a48..c18f82c 100644 --- a/priv/templates/otp_app.app.src +++ b/priv/templates/otp_app.app.src @@ -1,8 +1,8 @@ -{application, '{{name}}', +{application, {{name}}, [{description, "{{desc}}"}, {vsn, "0.1.0"}, {registered, []}, - {mod, {'{{name}}_app', []}}, + {mod, { {{name}}_app, []}}, {applications, [kernel, stdlib @@ -10,7 +10,7 @@ {env,[]}, {modules, []}, - {contributors, []}, + {maintainers, []}, {licenses, []}, {links, []} ]}. diff --git a/priv/templates/otp_lib.app.src b/priv/templates/otp_lib.app.src index f07293e..5b98a51 100644 --- a/priv/templates/otp_lib.app.src +++ b/priv/templates/otp_lib.app.src @@ -1,4 +1,4 @@ -{application, '{{name}}', +{application, {{name}}, [{description, "{{desc}}"}, {vsn, "0.1.0"}, {registered, []}, @@ -9,7 +9,7 @@ {env,[]}, {modules, []}, - {contributors, []}, + {maintainers, []}, {licenses, []}, {links, []} ]}. diff --git a/priv/templates/plugin.erl b/priv/templates/plugin.erl index c6e5e40..218960d 100644 --- a/priv/templates/plugin.erl +++ b/priv/templates/plugin.erl @@ -1,8 +1,8 @@ --module('{{name}}'). +-module({{name}}). -export([init/1]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> - {ok, State1} = '{{name}}_prv':init(State), + {ok, State1} = {{name}}_prv:init(State), {ok, State1}. diff --git a/priv/templates/provider.erl b/priv/templates/provider.erl index 669df83..7639d97 100644 --- a/priv/templates/provider.erl +++ b/priv/templates/provider.erl @@ -1,8 +1,8 @@ --module('{{name}}_prv'). +-module({{name}}_prv). -export([init/1, do/1, format_error/1]). --define(PROVIDER, '{{name}}'). +-define(PROVIDER, {{name}}). -define(DEPS, [app_discovery]). %% =================================================================== diff --git a/priv/templates/relx_rebar.config b/priv/templates/relx_rebar.config index da32819..81b7dbe 100644 --- a/priv/templates/relx_rebar.config +++ b/priv/templates/relx_rebar.config @@ -1,8 +1,8 @@ {erl_opts, [debug_info]}. {deps, []}. -{relx, [{release, {'{{name}}', "0.1.0"}, - ['{{name}}', +{relx, [{release, { {{name}}, "0.1.0" }, + [{{name}}, sasl]}, {sys_config, "./config/sys.config"}, diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl index cd9192a..a2e7209 100644 --- a/priv/templates/sup.erl +++ b/priv/templates/sup.erl @@ -3,7 +3,7 @@ %% @end %%%------------------------------------------------------------------- --module('{{name}}_sup'). +-module({{name}}_sup). -behaviour(supervisor). diff --git a/priv/templates/sys.config b/priv/templates/sys.config index 7fd6bcb..d892fd6 100644 --- a/priv/templates/sys.config +++ b/priv/templates/sys.config @@ -1,3 +1,3 @@ [ - {'{{name}}', []} + { {{name}}, []} ]. |