From 4c3f62adf3c333fa615d2f70f478525af086f4f6 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Wed, 13 Apr 2016 15:20:28 +0300 Subject: [PATCH] Renamed actionUpdate to actionRefresh --- src/nimble.nim | 4 ++-- src/nimblepkg/options.nim | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/nimble.nim b/src/nimble.nim index 1d7dd26..9dda608 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -55,7 +55,7 @@ proc update(options: Options) = ## ## If the download is not successful, an exception is raised. let parameter = - if options.action.typ == actionUpdate: + if options.action.typ == actionRefresh: options.action.optionalURL else: "" @@ -895,7 +895,7 @@ proc doAction(options: Options) = echo("Pre-hook prevented further execution.") return case options.action.typ - of actionUpdate: + of actionRefresh: update(options) of actionInstall: let (_, pkgInfo) = install(options.action.packages, options) diff --git a/src/nimblepkg/options.nim b/src/nimblepkg/options.nim index 7970294..f673f8d 100644 --- a/src/nimblepkg/options.nim +++ b/src/nimblepkg/options.nim @@ -18,7 +18,7 @@ type pkgInfoCache*: TableRef[string, PackageInfo] ActionType* = enum - actionNil, actionUpdate, actionInit, actionDump, actionPublish, + actionNil, actionRefresh, actionInit, actionDump, actionPublish, actionInstall, actionSearch, actionList, actionBuild, actionPath, actionUninstall, actionCompile, actionCustom, actionTasks, actionVersion @@ -27,7 +27,7 @@ type case typ*: ActionType of actionNil, actionList, actionBuild, actionPublish, actionTasks, actionVersion: nil - of actionUpdate: + of actionRefresh: optionalURL*: string # Overrides default package list. of actionInstall, actionPath, actionUninstall: packages*: seq[PkgTuple] # Optional only for actionInstall. @@ -111,7 +111,7 @@ proc parseActionType*(action: string): ActionType = of "dump": result = actionDump of "update", "refresh": - result = actionUpdate + result = actionRefresh of "search": result = actionSearch of "list": @@ -141,7 +141,7 @@ proc initAction*(options: var Options, key: string) = options.action.projName = "" of actionDump: options.action.projName = "" - of actionUpdate: + of actionRefresh: options.action.optionalURL = "" of actionSearch: options.action.search = @[] @@ -215,7 +215,7 @@ proc parseArgument*(key: string, result: var Options) = result.action.packages.add(pkgTup) else: result.action.packages.add((key, VersionRange(kind: verAny))) - of actionUpdate: + of actionRefresh: result.action.optionalURL = key of actionSearch: result.action.search.add(key) @@ -320,4 +320,4 @@ proc getProxy*(options: Options): Proxy = else: "" return newProxy($parsed, auth) else: - return nil \ No newline at end of file + return nil