Skip to content

Commit

Permalink
Merge pull request #256 from akkadotnet/dev
Browse files Browse the repository at this point in the history
v2.0.3 Release
  • Loading branch information
Aaronontheweb authored Feb 28, 2020
2 parents ad18d89 + 27d61c4 commit 9ff5adc
Show file tree
Hide file tree
Showing 77 changed files with 3,506 additions and 6,661 deletions.
19 changes: 19 additions & 0 deletions Hocon.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.Extensions.Configurat
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.Extensions.Configuration.Tests", "src\Hocon.Extensions.Configuration.Tests\Hocon.Extensions.Configuration.Tests.csproj", "{F7862234-3330-43DE-86BB-D6E67F2146BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.Immutable", "src\Hocon.Immutable\Hocon.Immutable.csproj", "{FB439177-CA10-4BA8-993D-A51D1BEE2A0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.Immutable.Tests", "src\Hocon.Immutable.Tests\Hocon.Immutable.Tests.csproj", "{FEEC6F6B-2511-4BEC-9568-4E6AE6C1D275}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializationDebug", "src\examples\SerializationDebug\SerializationDebug.csproj", "{6D1D4813-7AB6-4268-A9DF-627A60E08FB1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.API.Tests", "src\Hocon.API.Tests\Hocon.API.Tests.csproj", "{2EC48C29-E5A7-4C3F-AB26-1C121E098867}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hocon.Tests.Performance", "src\Hocon.Tests.Performance\Hocon.Tests.Performance.csproj", "{BD958665-7CE8-4DEF-89EA-8933393016D8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetWebApp", "src\examples\AspNetWebApp\AspNetWebApp.csproj", "{181D6251-3B11-4F2D-92E5-631C99D9F791}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -89,6 +95,14 @@ Global
{F7862234-3330-43DE-86BB-D6E67F2146BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7862234-3330-43DE-86BB-D6E67F2146BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7862234-3330-43DE-86BB-D6E67F2146BC}.Release|Any CPU.Build.0 = Release|Any CPU
{FB439177-CA10-4BA8-993D-A51D1BEE2A0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB439177-CA10-4BA8-993D-A51D1BEE2A0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB439177-CA10-4BA8-993D-A51D1BEE2A0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB439177-CA10-4BA8-993D-A51D1BEE2A0E}.Release|Any CPU.Build.0 = Release|Any CPU
{FEEC6F6B-2511-4BEC-9568-4E6AE6C1D275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEEC6F6B-2511-4BEC-9568-4E6AE6C1D275}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEEC6F6B-2511-4BEC-9568-4E6AE6C1D275}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEEC6F6B-2511-4BEC-9568-4E6AE6C1D275}.Release|Any CPU.Build.0 = Release|Any CPU
{6D1D4813-7AB6-4268-A9DF-627A60E08FB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D1D4813-7AB6-4268-A9DF-627A60E08FB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D1D4813-7AB6-4268-A9DF-627A60E08FB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -101,6 +115,10 @@ Global
{BD958665-7CE8-4DEF-89EA-8933393016D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD958665-7CE8-4DEF-89EA-8933393016D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD958665-7CE8-4DEF-89EA-8933393016D8}.Release|Any CPU.Build.0 = Release|Any CPU
{181D6251-3B11-4F2D-92E5-631C99D9F791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{181D6251-3B11-4F2D-92E5-631C99D9F791}.Debug|Any CPU.Build.0 = Debug|Any CPU
{181D6251-3B11-4F2D-92E5-631C99D9F791}.Release|Any CPU.ActiveCfg = Release|Any CPU
{181D6251-3B11-4F2D-92E5-631C99D9F791}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -111,6 +129,7 @@ Global
{603AC356-4D9D-490C-BE69-685B792D2FD4} = {C3695FA9-B189-4881-864A-8377EE987B74}
{1437D06E-EA95-4599-A6D0-80C1EC774A5A} = {C3695FA9-B189-4881-864A-8377EE987B74}
{7A497666-0799-4165-88A4-1DB37DB65A8D} = {C3695FA9-B189-4881-864A-8377EE987B74}
{181D6251-3B11-4F2D-92E5-631C99D9F791} = {C3695FA9-B189-4881-864A-8377EE987B74}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {557DB117-9178-4935-B327-3017C53186FE}
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1113,3 +1113,18 @@ way to get rid of default fallback values they don't want.

Config keys are encouraged to be `hyphen-separated` rather than
`camelCase`.

# Hocon.Extensions.Configuration
`Hocon.Extensions.Configuration` is an extension of HOCON that
allows HOCON configuration files to be read and loaded into `Microsoft.Extensions.Configuration`

## Installation
To install [`Microsoft.Extensions.Configuration` via NuGet](https://www.nuget.org/packages/Hocon.Extensions.Configuration/):

```
PS> Install-Package Hocon.Extensions.Configuration
```

## Examples
An example project on how to use `Hocon.Extensions.Configuration` with ASP.NET Core
Web Application can be seen [in the examples folder](https://github.com/akkadotnet/HOCON/tree/dev/src/examples/AspNetWebApp)
11 changes: 8 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
### 2.0.2 February 27 2020 ####
HOCON 2.0.2 contains a final stabilization of the HOCON 2.0 milestone, designed to provide 100% immutability to HOCON objects and high performance on reads.
### 2.0.3 February 28 2020 ####
Bugfixes and improvements made to HOCON 2.0.0

See [the HOCON 2.0.2 milestone for a full set of changes](https://github.com/akkadotnet/HOCON/milestone/8).
* [Bugfix: HoconValue.TryGetObject can throw System.ArgumentNullException](https://github.com/akkadotnet/HOCON/issues/233)
* [Bugfix: System.InvalidOperationException : Collection was modified; enumeration operation may not execute](https://github.com/akkadotnet/HOCON/issues/234)
* [Bugfix: unquoted key error during serialization](https://github.com/akkadotnet/HOCON/pull/223)
* [Fixed NuGet symbol package publication](https://github.com/akkadotnet/HOCON/issues/222)

For more details, please [see the issues in the HOCON v2.0.1 milestone here](https://github.com/akkadotnet/HOCON/milestone/7).
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NUGET_EXE=$TOOLS_DIR/nuget.exe
NUGET_URL=https://dist.nuget.org/win-x86-commandline/v4.0.0/nuget.exe
FAKE_VERSION=4.61.2
FAKE_EXE=$TOOLS_DIR/FAKE/tools/FAKE.exe
DOTNET_VERSION=2.1.504
DOTNET_VERSION=2.1.500
DOTNET_INSTALLER_URL=https://raw.githubusercontent.com/dotnet/cli/v$DOTNET_VERSION/scripts/obtain/dotnet-install.sh
DOTNET_CHANNEL=LTS;
DOCFX_VERSION=2.40.5
Expand Down
2 changes: 1 addition & 1 deletion src/HOCON.Tests/Extensions/IsStringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class IsStringTests
}
";

public HoconObject TestHocon => HoconParser.Parse(RawTestHocon);
public HoconRoot TestHocon => HoconParser.Parse(RawTestHocon);

[Fact]
public void IsString_should_detect_String_literals()
Expand Down
6 changes: 3 additions & 3 deletions src/HOCON.Tests/QuotedString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public void Bugfix_190_should_unquote_quotedstrings_on_parse()
";

var parsed = HoconParser.Parse(hocon);
var unwrapped = parsed.GetObject("adapters").Unwrapped;
var unwrapped = parsed.GetObject("adapters").ToDictionary(x => x.Key, v => v.Value.GetString());

// check to make sure these strings aren't quoted
unwrapped["gremlin"].Should().Equals("Akka.Remote.Transport.FailureInjectorProvider,Akka.Remote");
unwrapped["trttl"].Should().Equals("Akka.Remote.Transport.ThrottlerProvider,Akka.Remote");
unwrapped["gremlin"].Should().Be("Akka.Remote.Transport.FailureInjectorProvider,Akka.Remote");
unwrapped["trttl"].Should().Be("Akka.Remote.Transport.ThrottlerProvider,Akka.Remote");
}
}
}
1 change: 1 addition & 0 deletions src/Hocon.API.Tests/Hocon.API.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<ItemGroup>
<ProjectReference Include="..\Hocon.Configuration\Hocon.Configuration.csproj" />
<ProjectReference Include="..\Hocon.Extensions.Configuration\Hocon.Extensions.Configuration.csproj" />
<ProjectReference Include="..\Hocon.Immutable\Hocon.Immutable.csproj" />
<ProjectReference Include="..\Hocon\Hocon.csproj" />
</ItemGroup>

Expand Down
28 changes: 15 additions & 13 deletions src/Hocon.API.Tests/HoconAPISpec.ApproveConfiguration.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@ namespace Hocon
protected CDataConfigurationElement() { }
protected override void DeserializeElement(System.Xml.XmlReader reader, bool serializeCollectionKey) { }
}
public class Config : Hocon.HoconObject, System.IEquatable<Hocon.Config>, System.Runtime.Serialization.ISerializable
public class Config : Hocon.HoconRoot, System.IEquatable<Hocon.Config>, System.Runtime.Serialization.ISerializable
{
public Config(Hocon.HoconElement root) { }
[System.ObsoleteAttribute("For json serialization/deserialization only", true)]
protected Config() { }
protected Config(Hocon.HoconValue value) { }
protected Config(Hocon.HoconValue value, Hocon.Config fallback) { }
public Config(Hocon.HoconRoot root) { }
public Config(Hocon.HoconRoot root, Hocon.Config fallback) { }
[System.ObsoleteAttribute("Used for serialization only", true)]
protected Config(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public Config(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public static Hocon.Config Empty { get; }
public virtual System.Collections.Generic.IReadOnlyList<Hocon.HoconObject> Fallbacks { get; }
public virtual System.Collections.Generic.IReadOnlyList<Hocon.HoconValue> Fallbacks { get; }
public virtual bool IsEmpty { get; }
public Hocon.HoconObject Root { get; }
protected System.Collections.Generic.List<Hocon.HoconObject> _fallbacks { get; }
public override System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Hocon.HoconElement>> AsEnumerable() { }
public static Hocon.Config Create(Hocon.HoconElement root) { }
public static Hocon.Config Deserialize(string raw) { }
public Hocon.HoconValue Root { get; }
protected System.Collections.Generic.List<Hocon.HoconValue> _fallbacks { get; }
public override System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Hocon.HoconField>> AsEnumerable() { }
public virtual bool Equals(Hocon.Config other) { }
public override bool Equals(object obj) { }
public virtual Hocon.Config GetConfig(string path) { }
public virtual Hocon.Config GetConfig(Hocon.HoconPath path) { }
[System.ObsoleteAttribute("Used for serialization only", true)]
protected override Hocon.HoconValue GetNode(Hocon.HoconPath path) { }
public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public override Hocon.HoconElement GetValue(Hocon.HoconPath path) { }
public string Serialize() { }
public string ToString(bool useFallbackValues) { }
public override bool TryGetValue(Hocon.HoconPath path, out Hocon.HoconElement result) { }
protected override bool TryGetNode(Hocon.HoconPath path, out Hocon.HoconValue result) { }
public virtual Hocon.Config WithFallback(Hocon.Config fallback) { }
public static Hocon.Config +(Hocon.Config config, string fallback) { }
public static Hocon.Config +(string configHocon, Hocon.Config fallbackConfig) { }
Expand Down Expand Up @@ -65,6 +66,7 @@ namespace Hocon
public static Hocon.Config FromResource(string resourceName, object instanceInAssembly) { }
public static Hocon.Config FromResource<TAssembly>(string resourceName) { }
public static Hocon.Config FromResource(string resourceName, System.Reflection.Assembly assembly) { }
[System.ObsoleteAttribute("Call the ConfigurationFactory.Default method instead.")]
public static Hocon.Config Load() { }
public static Hocon.Config Load(string sectionName) { }
public static Hocon.Config ParseString(string hocon, Hocon.HoconIncludeCallbackAsync includeCallback) { }
Expand Down
Loading

0 comments on commit 9ff5adc

Please sign in to comment.