Skip to content

Commit

Permalink
Merge pull request #57 from CityofSantaMonica/release
Browse files Browse the repository at this point in the history
v0.6.0 release
  • Loading branch information
thekaveman committed Jun 2, 2016
2 parents 4b2dcae + 9960703 commit 37676ef
Show file tree
Hide file tree
Showing 22 changed files with 205 additions and 352 deletions.
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ are passing, and you're happy with the state of things...

1. Create a branch named `release`
2. Update [`ReleaseNotes.md`](ReleaseNotes.md), following the existing format
3. Bump the (assembly & file) version number in [`SolutionInfo.cs`](SolutionInfo.cs) and the `.nuspec` files (if required)
3. Bump the version number in [`SolutionInfo.cs`](SolutionInfo.cs) and the `.nuspec` and `appveyor.yml` files (if required)
4. Push the branch to GitHub and create a pull request
5. Run `.\build CreatePackages` to create the NuGet packages (locally) for the new version
6. Test the NuGet packages! [How to install NuGet package locally](http://stackoverflow.com/questions/10240029/how-to-install-a-nuget-package-nupkg-file-locally)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 City of Santa Monica, CA
Copyright (c) 2016 City of Santa Monica, CA

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# SODA.NET
# SODA.NET [![Build status](https://ci.appveyor.com/api/projects/status/yub6lyl79573lufv?svg=true)](https://ci.appveyor.com/project/thekaveman/soda-net)

A [Socrata Open Data API](http://dev.socrata.com) (SODA) client library targeting
.NET 4.5 and above.

## Getting Started

SODA.NET is available as a [NuGet package](https://www.nuget.org/packages/CSM.SodaDotNet/).

Install-Package CSM.SodaDotNet

## Usage examples

Simple, read-only access
Expand Down Expand Up @@ -33,7 +39,7 @@ var first10Rows = dataset.GetRows(10);
var soql = new SoqlQuery().Select("column1", "column2")
.Where("something > nothing")
.Group("column3");

var results = dataset.Query<MyOtherClass>(soql);
```

Expand All @@ -53,31 +59,25 @@ IEnumerable<MyClass> payload = GetPayloadData();
client.Upsert(payload, "1234-wxyz");
```

## Dependencies

SODA.NET uses the popular [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/)
package for JSON (de)serialization.

[NUnit](https://www.nuget.org/packages/NUnit/) was used to build the test projects.
## Build

## Getting Started

SODA.NET is available as a [NuGet package](https://www.nuget.org/packages/CSM.SodaDotNet/).

Install-Package CSM.SodaDotNet
Compilation can be done using
[Visual Studio Community Edition](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx).

### Build
[NUnit](http://nunit.org/) was used to build and run the test projects. Check out the
[NUnit Test Adapter](https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d)
to run tests from within Visual Studio.

If you'd like to compile SODA.NET yourself, you will need:

- Visual Studio 2013

To clone it locally, click the "Clone in Windows" button above or run the follow git commands
You can also use the `build.cmd` script, which assumes `msbuild` and `nuget` are available:

git clone [email protected]:CityofSantaMonica/SODA.NET.git SODA.NET
cd SODA.NET
.\build.cmd

To create the Nuget package artifacts, pass an extra parameter:

.\build.cmd CreatePackages

## Contributing

Check out the
Expand All @@ -86,7 +86,7 @@ for more details.

## Copyright and License

Copyright 2014 City of Santa Monica, CA
Copyright 2016 City of Santa Monica, CA

Licensed under the
[MIT License](https://github.com/CityOfSantaMonica/SODA.NET/blob/master/LICENSE.txt)
Expand Down
15 changes: 15 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### New in 0.6.0 (Released 2016/06/02)

Bug fixes

- `SodaClient` no longer requires an AppToken [#49](https://github.com/CityofSantaMonica/SODA.NET/issues/49)
- `Query` methods behave as advertised and return full result sets [#56](https://github.com/CityofSantaMonica/SODA.NET/issues/56)

Deprecation Notices

- `ExcelOleDbHelper` in `SODA.Utilities` was deprecated in `v0.5.0` and has now been removed.

New features

- `SodaClient` can issue queries directly [#54](https://github.com/CityofSantaMonica/SODA.NET/issues/54)

### New in 0.5.0 (Released 2015/08/12)

Dependency Updates
Expand Down
8 changes: 3 additions & 5 deletions SODA.Tests/ResourceTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using NUnit.Framework;
using SODA.Tests.Mocks;
using System;

namespace SODA.Tests
{
Expand Down Expand Up @@ -69,7 +67,7 @@ public void New_Gets_Metadata_Identifier()

Assert.AreSame(metadata.Identifier, resource.Identifier);
}

[TestCase(StringMocks.EmptyInput)]
[TestCase(StringMocks.NullInput)]
[ExpectedException(typeof(ArgumentException))]
Expand Down
39 changes: 30 additions & 9 deletions SODA.Tests/SodaClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ public void New_With_Empty_Host_Throws_ArgumentException(string input)
new SodaClient(input, StringMocks.Host);
}

[TestCase(StringMocks.NullInput)]
[TestCase(StringMocks.EmptyInput)]
[ExpectedException(typeof(ArgumentException))]
[Category("SodaClient")]
public void New_With_Empty_AppToken_Throws_ArgumentException(string input)
{
new SodaClient(StringMocks.NonEmptyInput, input);
}

[TestCase("host.com")]
[TestCase("http://host.com")]
[Category("SodaClient")]
Expand Down Expand Up @@ -106,6 +97,36 @@ public void GetResource_With_Invalid_ResourceId_Throws_ArgumentOutOfRangeExcepti
mockClient.GetResource<object>(input);
}

[TestCase(StringMocks.NullInput)]
[TestCase(StringMocks.EmptyInput)]
[TestCase(StringMocks.NonEmptyInput)]
[ExpectedException(typeof(ArgumentOutOfRangeException))]
[Category("SodaClient")]
public void Query_With_Invalid_ResourceId_Throws_ArgumentOutOfRangeException(string input)
{
mockClient.Query<object>(new SoqlQuery(), input);
}

[Test]
[Category("SodaClient")]
public void Query_With_UndefinedLimit_UsesMaximum()
{
var query = new SoqlQuery();
var initialValue = query.LimitValue;

try
{
mockClient.Query<object>(query, StringMocks.ResourceId);
}
catch (WebException)
{
//pass
}

Assert.Greater(query.LimitValue, initialValue);
Assert.AreEqual(SoqlQuery.MaximumLimit, query.LimitValue);
}

[Test]
[ExpectedException(typeof(ArgumentOutOfRangeException))]
[Category("SodaClient")]
Expand Down
1 change: 0 additions & 1 deletion SODA.Tests/SodaRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public void New_Returns_Request_Using_HTTP_1_1()
Assert.AreEqual(new Version("1.1"), request.webRequest.ProtocolVersion);
}

[TestCase("")]
[TestCase("appToken1234")]
[Category("SodaRequest")]
public void New_Returns_Request_With_Specified_X_App_Token_Header(string input)
Expand Down
143 changes: 0 additions & 143 deletions SODA.Utilities.Tests/ExcelOleDbHelperTests.cs

This file was deleted.

1 change: 0 additions & 1 deletion SODA.Utilities.Tests/SODA.Utilities.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</Compile>
<Compile Include="DataRowExtensionsTests.cs" />
<Compile Include="ExcelDataReaderHelperTests.cs" />
<Compile Include="ExcelOleDbHelperTests.cs" />
<Compile Include="FileLoggingTests.cs" />
<Compile Include="Mocks\DataRowMocks.cs" />
<Compile Include="Mocks\EntityMock.cs" />
Expand Down
Loading

0 comments on commit 37676ef

Please sign in to comment.