summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2012-05-28 13:46:32 +0100
committerTim Watson <tim@rabbitmq.com>2012-05-28 13:46:32 +0100
commit64dbee37e5377532c68f14ac28913aaea0902fb7 (patch)
tree77aa156364aa2ee6866f5550567c1dd090acda1f
parentdacdf4e3616d49f3091c1f2831ca38cb64452d79 (diff)
downloadrabbitmq-server-64dbee37e5377532c68f14ac28913aaea0902fb7.tar.gz
cosmetic
-rw-r--r--src/rabbit.erl9
-rw-r--r--src/rabbit_plugins_main.erl16
2 files changed, 16 insertions, 9 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 8a25d9ff..6895dcb6 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -311,7 +311,8 @@ boot() ->
Plugins = rabbit_plugins:setup(),
ToBeLoaded = Plugins ++ ?APPS,
ok = app_utils:load_applications(ToBeLoaded),
- StartupApps = app_utils:app_dependency_order(ToBeLoaded, false),
+ StartupApps = app_utils:app_dependency_order(ToBeLoaded,
+ false),
ok = app_utils:start_applications(StartupApps),
ok = print_plugin_info(Plugins)
end).
@@ -468,7 +469,8 @@ sort_boot_steps(UnsortedSteps) ->
%% there is one, otherwise fail).
SortedSteps = lists:reverse(
[begin
- {StepName, Step} = digraph:vertex(G, StepName),
+ {StepName, Step} = digraph:vertex(G,
+ StepName),
Step
end || StepName <- digraph_utils:topsort(G)]),
digraph:delete(G),
@@ -550,7 +552,8 @@ insert_default_data() ->
ok = rabbit_vhost:add(DefaultVHost),
ok = rabbit_auth_backend_internal:add_user(DefaultUser, DefaultPass),
ok = rabbit_auth_backend_internal:set_tags(DefaultUser, DefaultTags),
- ok = rabbit_auth_backend_internal:set_permissions(DefaultUser, DefaultVHost,
+ ok = rabbit_auth_backend_internal:set_permissions(DefaultUser,
+ DefaultVHost,
DefaultConfigurePerm,
DefaultWritePerm,
DefaultReadPerm),
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl
index dbca391c..572cf150 100644
--- a/src/rabbit_plugins_main.erl
+++ b/src/rabbit_plugins_main.erl
@@ -104,7 +104,8 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) ->
end,
AllPlugins = rabbit_plugins:list(PluginsDir),
Enabled = rabbit_plugins:read_enabled(PluginsFile),
- ImplicitlyEnabled = rabbit_plugins:dependencies(false, Enabled, AllPlugins),
+ ImplicitlyEnabled = rabbit_plugins:dependencies(false,
+ Enabled, AllPlugins),
ToEnable = [list_to_atom(Name) || Name <- ToEnable0],
Missing = ToEnable -- plugin_names(AllPlugins),
case Missing of
@@ -115,7 +116,8 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) ->
end,
NewEnabled = lists:usort(Enabled ++ ToEnable),
write_enabled_plugins(PluginsFile, NewEnabled),
- NewImplicitlyEnabled = rabbit_plugins:dependencies(false, NewEnabled, AllPlugins),
+ NewImplicitlyEnabled = rabbit_plugins:dependencies(false,
+ NewEnabled, AllPlugins),
maybe_warn_mochiweb(NewImplicitlyEnabled),
case NewEnabled -- ImplicitlyEnabled of
[] -> io:format("Plugin configuration unchanged.~n");
@@ -145,7 +147,8 @@ action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) ->
false -> ImplicitlyEnabled =
rabbit_plugins:dependencies(false, Enabled, AllPlugins),
NewImplicitlyEnabled =
- rabbit_plugins:dependencies(false, NewEnabled, AllPlugins),
+ rabbit_plugins:dependencies(false,
+ NewEnabled, AllPlugins),
print_list("The following plugins have been disabled:",
ImplicitlyEnabled -- NewImplicitlyEnabled),
write_enabled_plugins(PluginsFile, NewEnabled),
@@ -178,14 +181,15 @@ format_plugins(Pattern, Opts, PluginsFile, PluginsDir) ->
AvailablePlugins = rabbit_plugins:list(PluginsDir),
EnabledExplicitly = rabbit_plugins:read_enabled(PluginsFile),
EnabledImplicitly =
- rabbit_plugins:dependencies(false, EnabledExplicitly, AvailablePlugins) --
- EnabledExplicitly,
+ rabbit_plugins:dependencies(false, EnabledExplicitly,
+ AvailablePlugins) -- EnabledExplicitly,
{ok, RE} = re:compile(Pattern),
Plugins = [ Plugin ||
Plugin = #plugin{name = Name} <- AvailablePlugins,
re:run(atom_to_list(Name), RE, [{capture, none}]) =:= match,
if OnlyEnabled -> lists:member(Name, EnabledExplicitly);
- OnlyEnabledAll -> (lists:member(Name, EnabledExplicitly) or
+ OnlyEnabledAll -> (lists:member(Name,
+ EnabledExplicitly) or
lists:member(Name, EnabledImplicitly));
true -> true
end],