Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (GH-153) Upgrade -r should always return a value
  (GH-141) Handle option w/surrounding apostrophes
  (maint) Correcting typos
  • Loading branch information
ferventcoder committed Mar 6, 2015
2 parents 1d8448c + 76dfd59 commit 9f2f6d3
Show file tree
Hide file tree
Showing 31 changed files with 116 additions and 90 deletions.
4 changes: 2 additions & 2 deletions src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static void Main(string[] args)

trap_exit_scenarios(config);

if (config.RegularOuptut)
if (config.RegularOutput)
{
"logfile".Log().Info(() => "".PadRight(60, '='));
#if DEBUG
Expand All @@ -83,7 +83,7 @@ private static void Main(string[] args)
}


if (warnings.Count != 0 && config.RegularOuptut)
if (warnings.Count != 0 && config.RegularOutput)
{
foreach (var warning in warnings.or_empty_list_if_null())
{
Expand Down
1 change: 1 addition & 0 deletions src/chocolatey.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ limitations under the License.</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=474957be_002Df1f1_002D44f8_002Da1ba_002D6fbd8a61587b/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Public" Description="Properties"&gt;&lt;ElementKinds&gt;&lt;Kind Name="PROPERTY" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=b229e86b_002D47e7_002D493e_002D9c0f_002D2b53080cdad9/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="Methods, Events"&gt;&lt;ElementKinds&gt;&lt;Kind Name="METHOD" /&gt;&lt;Kind Name="EVENT" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/Environment/Hierarchy/PsiConfigurationSettingsKey/LocationType/@EntryValue">SOLUTION_FOLDER</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>
2 changes: 1 addition & 1 deletion src/chocolatey.tests.integration/Scenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static ChocolateyConfiguration baseline_configuration()
config.OverrideArguments = false;
config.Prerelease = false;
config.PromptForConfirmation = false;
config.RegularOuptut = true;
config.RegularOutput = true;
config.SkipPackageInstallProvider = false;
config.Sources = _fileSystem.get_full_path(_fileSystem.combine_paths(get_top_level(), "packages"));
config.Version = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void should_not_create_a_shim_for_mismatched_case_ignored_executable_in_t
}

[Fact]
public void should_not_create_an_extensions_folder_for_the_pacakge()
public void should_not_create_an_extensions_folder_for_the_package()
{
var extensionsDirectory = Path.Combine(Scenario.get_top_level(), "extensions", Configuration.PackageNames);

Expand Down
8 changes: 4 additions & 4 deletions src/chocolatey.tests/GetChocolateySpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public override void Because()
}

[Fact]
public void should_get_chocolotey()
public void should_get_chocolatey()
{
_chocolatey.ShouldNotBeNull();
}

[Fact]
public void should_conigure_log4net()
public void should_configure_log4net()
{
LogManager.GetRepository().Configured.ShouldBeTrue();
}
Expand All @@ -61,13 +61,13 @@ public override void Because()
}

[Fact]
public void should_get_instantiated_chocolotey1()
public void should_get_instantiated_chocolatey1()
{
_chocolatey1.ShouldNotBeNull();
}

[Fact]
public void should_get_instantiated_chocolotey2()
public void should_get_instantiated_chocolatey2()
{
_chocolatey2.ShouldNotBeNull();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void should_not_be_empty()
}

[Fact]
public void should_be_transferrable_to_Version()
public void should_be_transferable_to_Version()
{
new Version(result).ShouldNotBeNull();
}
Expand Down
2 changes: 1 addition & 1 deletion src/chocolatey/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IEnumerable or_empty_list_if_null(this IEnumerable source)
}

/// <summary>
/// Joins the specified IEnumerables.
/// Joins the specified IEnumerable to required separator.
/// </summary>
/// <param name="source">The source.</param>
/// <param name="separator">The value to put in between elements</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ private static void set_global_options(IList<string> args, ChocolateyConfigurati
"NoOp - Don't actually do anything.",
option => config.Noop = option != null)
.Add("r|limitoutput|limit-output",
"LimitOuptut - Limit the output to essential information",
option => config.RegularOuptut = option == null)
"LimitOutput - Limit the output to essential information",
option => config.RegularOutput = option == null)
.Add("execution-timeout=",
"CommandExecutionTimeoutSeconds - Override the default execution timeout in the configuration of {0} seconds.".format_with(config.CommandExecutionTimeoutSeconds.to_string()),
option => config.CommandExecutionTimeoutSeconds = int.Parse(option))
option => config.CommandExecutionTimeoutSeconds = int.Parse(option.remove_surrounding_quotes()))
.Add("c=|cache=|cachelocation=|cache-location=",
"CacheLocation - Location for download cache, defaults to %TEMP% or value in chocolatey.config file.",
option => config.CacheLocation = option)
option => config.CacheLocation = option.remove_surrounding_quotes())
.Add("allowunofficial|allow-unofficial|allowunofficialbuild|allow-unofficial-build",
"AllowUnofficialBuild - When not using the official build you must set this flag for choco to continue.",
option => config.AllowUnofficialBuild = option != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("s=|source=",
"Source [REQUIRED] - The source location for the key",
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("k=|key=|apikey=|api-key=",
"ApiKey - The api key for the source.",
option => configuration.ApiKeyCommand.Key = option)
option => configuration.ApiKeyCommand.Key = option.remove_surrounding_quotes())
;
}

Expand Down Expand Up @@ -112,7 +112,7 @@ public void run(ChocolateyConfiguration configuration)
{
_configSettingsService.get_api_key(configuration, (key) =>
{
if (configuration.RegularOuptut)
if (configuration.RegularOutput)
{
this.Log().Info(() => "{0} - {1}".format_with(key.Source, key.Key));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("n=|name=",
"Name - the name of the source. Required with some actions. Defaults to empty.",
option => configuration.FeatureCommand.Name = option)
option => configuration.FeatureCommand.Name = option.remove_surrounding_quotes())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to default feeds.",
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("version=",
"Version - A specific version to install. Defaults to unspecified.",
option => configuration.Version = option)
option => configuration.Version = option.remove_surrounding_quotes())
.Add("pre|prerelease",
"Prerelease - Include Prereleases? Defaults to false.",
option => configuration.Prerelease = option != null)
Expand All @@ -52,7 +52,7 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
option => configuration.ForceX86 = option != null)
.Add("ia=|installargs=|installarguments=|install-arguments=",
"InstallArguments - Install Arguments to pass to the native installer in the package. Defaults to unspecified.",
option => configuration.InstallArguments = option)
option => configuration.InstallArguments = option.remove_surrounding_quotes())
.Add("o|override|overrideargs|overridearguments|override-arguments",
"OverrideArguments - Should install arguments be used exclusively without appending to current package passed arguments? Defaults to false.",
option => configuration.OverrideArguments = option != null)
Expand All @@ -61,7 +61,7 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
option => configuration.NotSilent = option != null)
.Add("params=|parameters=|pkgparameters=|packageparameters=|package-parameters=",
"PackageParameters - Parameters to pass to the package. Defaults to unspecified.",
option => configuration.PackageParameters = option)
option => configuration.PackageParameters = option.remove_surrounding_quotes())
.Add("m|sxs|sidebyside|side-by-side|allowmultiple|allow-multiple|allowmultipleversions|allow-multiple-versions",
"AllowMultipleVersions - Should multiple versions of a package be installed? Defaults to false.",
option => configuration.AllowMultipleVersions = option != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("s=|source=",
"Source - Source location for install. Can include special 'webpi'. Defaults to sources.",
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("l|lo|localonly|local-only",
"LocalOnly - Only search against local machine items.",
option => configuration.ListCommand.LocalOnly = option != null)
.Add("pre|prerelease",
"Prerelease - Include Prereleases? Defaults to false.",
option => configuration.Prerelease = option != null)
.Add("p|includeprograms|include-programs",
"IncludePrograms - Used in conjuction with LocalOnly, filters out apps chocolatey has listed as packages and includes those in the list. Defaults to false.",
"IncludePrograms - Used in conjunction with LocalOnly, filters out apps chocolatey has listed as packages and includes those in the list. Defaults to false.",
option => configuration.ListCommand.IncludeRegistryPrograms = option != null)
.Add("a|all|allversions|all-versions",
"AllVersions - include results from all versions.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
"Name [Required]- the name of the package. Can be passed as first parameter without \"--name=\".",
option =>
{
configuration.NewCommand.Name = option;
configuration.NewCommand.TemplateProperties.Add(TemplateValues.NamePropertyName, option);
configuration.NewCommand.Name = option.remove_surrounding_quotes();
configuration.NewCommand.TemplateProperties.Add(TemplateValues.NamePropertyName, option.remove_surrounding_quotes());
})
.Add("version=",
"Version - the version of the package. Can also be passed as the property PackageVersion=somevalue",
option => configuration.NewCommand.TemplateProperties.Add(TemplateValues.VersionPropertyName, option))
option => configuration.NewCommand.TemplateProperties.Add(TemplateValues.VersionPropertyName, option.remove_surrounding_quotes()))
.Add("maintainer=",
"Maintainer - the name of the maintainer. Can also be passed as the property MaintainerName=somevalue",
option => configuration.NewCommand.TemplateProperties.Add(TemplateValues.MaintainerPropertyName, option))
option => configuration.NewCommand.TemplateProperties.Add(TemplateValues.MaintainerPropertyName, option.remove_surrounding_quotes()))
;
//todo: template type
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("version=",
"Version - The version you would like to insert into the package.",
option => configuration.Version = option)
option => configuration.Version = option.remove_surrounding_quotes())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("n=|name=",
"Name - the name of the package. Required with some actions. Defaults to empty.",
option => configuration.PinCommand.Name = option)
option => configuration.PinCommand.Name = option.remove_surrounding_quotes())
.Add("version=",
"Version - Used when multiple versions of a package are installed. Defaults to empty.",
option => configuration.Version = option)
option => configuration.Version = option.remove_surrounding_quotes())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("s=|source=",
"Source - The source we are pushing the package to. Use {0} to push to community feed.".format_with(ApplicationParameters.ChocolateyCommunityFeedPushSource),
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("k=|key=|apikey=|api-key=",
"ApiKey - The api key for the source. If not specified (and not local file source), does a lookup. If not specified and one is not found for an https source, push will fail.",
option => configuration.PushCommand.Key = option)
option => configuration.PushCommand.Key = option.remove_surrounding_quotes())
.Add("t=|timeout=",
"Timeout (in seconds) - The time to allow a package push to occur before timing out. Defaults to 300 seconds (5 minutes).",
option =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("n=|name=",
"Name - the name of the source. Required with some actions. Defaults to empty.",
option => configuration.SourceCommand.Name = option)
option => configuration.SourceCommand.Name = option.remove_surrounding_quotes())
.Add("s=|source=",
"Source - The source. Defaults to empty.",
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("u=|user=",
"User - used with authenticated feeds. Defaults to empty.",
option => configuration.SourceCommand.Username = option)
option => configuration.SourceCommand.Username = option.remove_surrounding_quotes())
.Add("p=|password=",
"Password - the user's password to the source. Encrypted in chocolatey.config file.",
option => configuration.SourceCommand.Password = option)
option => configuration.SourceCommand.Password = option.remove_surrounding_quotes())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
optionSet
.Add("version=",
"Version - A specific version to uninstall. Defaults to unspecified.",
option => configuration.Version = option)
option => configuration.Version = option.remove_surrounding_quotes())
.Add("a|allversions|all-versions",
"AllVersions - Uninstall all versions? Defaults to false.",
option => configuration.AllVersions = option != null)
.Add("ua=|uninstallargs=|uninstallarguments=|uninstall-arguments=",
"UninstallArguments - Uninstall Arguments to pass to the native installer in the package. Defaults to unspecified.",
option => configuration.InstallArguments = option)
option => configuration.InstallArguments = option.remove_surrounding_quotes())
.Add("o|override|overrideargs|overridearguments|override-arguments",
"OverrideArguments - Should uninstall arguments be used exclusively without appending to current package passed arguments? Defaults to false.",
option => configuration.OverrideArguments = option != null)
Expand All @@ -55,7 +55,7 @@ public void configure_argument_parser(OptionSet optionSet, ChocolateyConfigurati
option => configuration.NotSilent = option != null)
.Add("params=|parameters=|pkgparameters=|packageparameters=|package-parameters=",
"PackageParameters - Parameters to pass to the package. Defaults to unspecified.",
option => configuration.PackageParameters = option)
option => configuration.PackageParameters = option.remove_surrounding_quotes())
.Add("x|forcedependencies|force-dependencies|removedependencies|remove-dependencies",
"RemoveDependencies - Uninstall dependencies when uninstalling package(s). Defaults to false.",
option => configuration.ForceDependencies = option != null)
Expand Down
Loading

0 comments on commit 9f2f6d3

Please sign in to comment.