Merge branch 'master' into master

This commit is contained in:
Prayank Mathur
2016-03-14 10:18:32 +05:30
10 changed files with 63 additions and 17 deletions
@@ -19,7 +19,8 @@ namespace Octokit.Reactive
/// https://developer.github.com/v3/users/keys/#list-your-public-keys
/// </remarks>
/// <returns></returns>
IObservable<PublicKey> GetAll();
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<PublicKey> GetAllForCurrent();
/// <summary>
/// Gets all verified public keys for a user.
@@ -29,9 +29,9 @@ namespace Octokit.Reactive
/// https://developer.github.com/v3/users/keys/#list-your-public-keys
/// </remarks>
/// <returns></returns>
public IObservable<PublicKey> GetAll()
public IObservable<PublicKey> GetAllForCurrent()
{
return _client.GetAll().ToObservable().SelectMany(k => k);
return _client.GetAllForCurrent().ToObservable().SelectMany(k => k);
}
/// <summary>
@@ -14,7 +14,7 @@ namespace Octokit.Tests.Integration.Clients
using (var context = await github.CreatePublicKeyContext())
{
var keys = await github.User.Keys.GetAll();
var keys = await github.User.Keys.GetAllForCurrent();
Assert.NotEmpty(keys);
var first = keys[0];
@@ -72,7 +72,7 @@ namespace Octokit.Tests.Integration.Clients
await github.User.Keys.Delete(key.Id);
// Verify key no longer exists
var keys = await github.User.Keys.GetAll();
var keys = await github.User.Keys.GetAllForCurrent();
Assert.False(keys.Any(k => k.Title == keyTitle && k.Key == keyData));
}
}
@@ -21,7 +21,7 @@ namespace Octokit.Tests.Integration.Clients
{
using (var context = await _github.CreatePublicKeyContext())
{
var observable = _github.User.Keys.GetAll();
var observable = _github.User.Keys.GetAllForCurrent();
var keys = await (observable.ToList());
Assert.NotEmpty(keys);
@@ -80,7 +80,7 @@ namespace Octokit.Tests.Integration.Clients
await _github.User.Keys.Delete(key.Id);
// Verify key no longer exists
var keys = await (_github.User.Keys.GetAll().ToList());
var keys = await (_github.User.Keys.GetAllForCurrent().ToList());
Assert.False(keys.Any(k => k.Title == keyTitle && k.Key == keyData));
}
}
+2 -2
View File
@@ -8,7 +8,7 @@ namespace Octokit.Tests.Clients
{
public class UserKeysClientTests
{
public class TheGetAllMethod
public class TheGetAllForCurrentMethod
{
[Fact]
public void RequestsTheCorrectUrl()
@@ -17,7 +17,7 @@ namespace Octokit.Tests.Clients
var client = new UserKeysClient(connection);
var expectedUri = "user/keys";
client.GetAll();
client.GetAllForCurrent();
connection.Received().GetAll<PublicKey>(
Arg.Is<Uri>(u => u.ToString() == expectedUri));
@@ -8,7 +8,7 @@ namespace Octokit.Tests.Reactive
{
public class ObservableUserKeysClientTests
{
public class TheGetAllMethod
public class TheGetAllForCurrentMethod
{
[Fact]
public void CallsIntoClient()
@@ -16,9 +16,9 @@ namespace Octokit.Tests.Reactive
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableUserKeysClient(gitHubClient);
client.GetAll();
client.GetAllForCurrent();
gitHubClient.User.Keys.Received().GetAll();
gitHubClient.User.Keys.Received().GetAllForCurrent();
}
}
+2 -1
View File
@@ -19,7 +19,8 @@ namespace Octokit
/// https://developer.github.com/v3/users/keys/#list-your-public-keys
/// </remarks>
/// <returns></returns>
Task<IReadOnlyList<PublicKey>> GetAll();
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
Task<IReadOnlyList<PublicKey>> GetAllForCurrent();
/// <summary>
/// Gets all verified public keys for a user.
+1 -1
View File
@@ -23,7 +23,7 @@ namespace Octokit
/// https://developer.github.com/v3/users/keys/#list-your-public-keys
/// </remarks>
/// <returns></returns>
public Task<IReadOnlyList<PublicKey>> GetAll()
public Task<IReadOnlyList<PublicKey>> GetAllForCurrent()
{
return ApiConnection.GetAll<PublicKey>(ApiUrls.Keys());
}
+44
View File
@@ -1,3 +1,47 @@
### New in 0.19.0 (released 2016/03/11)
**Features**
- Add `GetLatest` endpoint for Releases API - #975 via @chenjiaming93
- Add Enterprise License and Organization APIs - #1073 via @ryangribble
- Add Locked property to `PullRequest` - #1089 via @M-Zuber
- Add Enterprise Search Indexing API - #1095 via @ryangribble
- Add support for `Visibility` and `Affiliation` to repository search - #1096, #1132 via @Sarmad93, @AlexP11223
- Add Enterprise LDAP API - #1099 via @ryangribble
- Add `CreateBranch` extension methods to IReferencesClient - #1103 via @M-Zuber
- Additional Enterprise methods on User Administration Client - #1108 via @ryangribble
- Complete `UserKeysClient` API - #1112 via @ryangribble
- `RepositoryContentsClient` create, update and delete actions now specify branch - #1093 via @M-Zuber
**Fixes**
- `StatisticsClient` should not clobber /api/v3/ in path - #1085 via @shiftkey
- Fix JSON deserialization of string containing hyphens to List<string> property - #1094 via @ryangribble
- Incorrect reference passed to `RepositoryContentsClient.GetArchive` - #1113 via @michael-kokorin
**Other**
- Add failing integration test for Issue Search API - #1083 via @hahmed
- Add integration tests for `IReleasesClient.GetLatest` - #1090 via @M-Zuber
- Remove extraneous Bcl .targets reference - #1100 via @shana
- Add proper syntax highlighting to exploring-pull-requests.md - #1117 via @tiesmaster
- Fix issue with optional parameters in .\script\configure-integration-tests - #1118 via @Anubhav10
- Update Issue creation sample code - #1131 via @AlexP11223
- `IJsonSerializer` not used inside `Connection` - #1133 via @devkhan
**Breaking Changes**
`ISshKeysClient` has a number of methods which at the time should have been
implemented in `IUserKeysClient` - these methods are marked as obsolete and will
be removed in a future release:
- `ISshKeysClient.Get(int id)`
- `ISshKeysClient.GetAll(string user)`
- `ISshKeysClient.GetAllForCurrent()`
- `ISshKeysClient.Create(SshKeyUpdate key)`
- `ISshKeysClient.Update(int id, SshKeyUpdate key)`
- `ISshKeysClient.Delete(int id)`
### New in 0.18.0 (released 2016/02/03)
* New: support for User Administration API (GitHub Enterprise) - #1068 via @paladique
+3 -3
View File
@@ -3,11 +3,11 @@ using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProductAttribute("Octokit")]
[assembly: AssemblyVersionAttribute("0.18.0")]
[assembly: AssemblyFileVersionAttribute("0.18.0")]
[assembly: AssemblyVersionAttribute("0.19.0")]
[assembly: AssemblyFileVersionAttribute("0.19.0")]
[assembly: ComVisibleAttribute(false)]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.18.0";
internal const string Version = "0.19.0";
}
}