-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from tumugin/develop
ver 1.5リリース
- Loading branch information
Showing
82 changed files
with
1,378 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
BUNDLE_PATH: "vendor/bundler" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,4 +258,7 @@ paket-files/ | |
|
||
# Python Tools for Visual Studio (PTVS) | ||
__pycache__/ | ||
*.pyc | ||
*.pyc | ||
|
||
# Ruby | ||
vendor/bundler/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "FluentWPF"] | ||
path = FluentWPF | ||
url = https://github.com/tumugin/FluentWPF.git | ||
[submodule "foo_nowplayingv2/SDK"] | ||
path = foo_nowplayingv2/SDK | ||
url = https://github.com/tumugin/foobar2000_sdk.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Ignore inline messages which lay outside a diff's range of PR | ||
github.dismiss_out_of_range_messages | ||
|
||
# PR | ||
if github.pr_title.include? "[WIP]" || github.pr_labels.include?("WIP") | ||
warn("PR is classed as Work in Progress") | ||
end | ||
|
||
# Warn when there is a big PR | ||
warn("a large PR") if git.lines_of_code > 500 | ||
|
||
# Warn when PR has no assignees | ||
warn("A pull request must have some assignees") if github.pr_json["assignee"].nil? | ||
|
||
resharper_inspectcode.base_path = Dir.pwd | ||
resharper_inspectcode.report "report.xml" |
Submodule FluentWPF
deleted from
e38f83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'danger' | ||
gem 'danger-resharper_inspectcode' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.7.0) | ||
public_suffix (>= 2.0.2, < 5.0) | ||
ansi (1.5.0) | ||
ast (2.4.0) | ||
claide (1.0.3) | ||
claide-plugins (0.9.2) | ||
cork | ||
nap | ||
open4 (~> 1.3) | ||
colored2 (3.1.2) | ||
cork (0.3.0) | ||
colored2 (~> 3.1) | ||
danger (6.1.0) | ||
claide (~> 1.0) | ||
claide-plugins (>= 0.9.2) | ||
colored2 (~> 3.1) | ||
cork (~> 0.1) | ||
faraday (~> 0.9) | ||
faraday-http-cache (~> 2.0) | ||
git (~> 1.5) | ||
kramdown (~> 2.0) | ||
kramdown-parser-gfm (~> 1.0) | ||
no_proxy_fix | ||
octokit (~> 4.7) | ||
terminal-table (~> 1) | ||
danger-plugin-api (1.0.0) | ||
danger (> 2.0) | ||
danger-resharper_inspectcode (1.0.2) | ||
danger-plugin-api (~> 1.0) | ||
oga (~> 2.15) | ||
faraday (0.17.0) | ||
multipart-post (>= 1.2, < 3) | ||
faraday-http-cache (2.0.0) | ||
faraday (~> 0.8) | ||
git (1.5.0) | ||
kramdown (2.1.0) | ||
kramdown-parser-gfm (1.1.0) | ||
kramdown (~> 2.0) | ||
multipart-post (2.1.1) | ||
nap (1.1.0) | ||
no_proxy_fix (0.1.2) | ||
octokit (4.14.0) | ||
sawyer (~> 0.8.0, >= 0.5.3) | ||
oga (2.15) | ||
ast | ||
ruby-ll (~> 2.1) | ||
open4 (1.3.4) | ||
public_suffix (4.0.1) | ||
ruby-ll (2.1.2) | ||
ansi | ||
ast | ||
sawyer (0.8.2) | ||
addressable (>= 2.3.5) | ||
faraday (> 0.8, < 2.0) | ||
terminal-table (1.8.0) | ||
unicode-display_width (~> 1.1, >= 1.1.1) | ||
unicode-display_width (1.6.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
danger | ||
danger-resharper_inspectcode | ||
|
||
BUNDLED WITH | ||
1.17.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Mastonet; | ||
using Mastonet.Entities; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace NowPlayingCore.ConfigConverter | ||
{ | ||
class MastodonClientConverter : JsonConverter | ||
{ | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
var mastodonClient = value as MastodonClient; | ||
if (mastodonClient == null) | ||
{ | ||
writer.WriteNull(); | ||
return; | ||
} | ||
|
||
writer.WriteStartObject(); | ||
|
||
writer.WritePropertyName("AppRegistration"); | ||
writer.WriteStartObject(); | ||
if (mastodonClient.AppRegistration != null) | ||
{ | ||
writer.WritePropertyName("ClientId"); | ||
writer.WriteValue(mastodonClient.AppRegistration.ClientId); | ||
writer.WritePropertyName("ClientSecret"); | ||
writer.WriteValue(mastodonClient.AppRegistration.ClientSecret); | ||
writer.WritePropertyName("Id"); | ||
writer.WriteValue(mastodonClient.AppRegistration.Id); | ||
writer.WritePropertyName("Instance"); | ||
writer.WriteValue(mastodonClient.AppRegistration.Instance); | ||
writer.WritePropertyName("RedirectUri"); | ||
writer.WriteValue(mastodonClient.AppRegistration.RedirectUri); | ||
writer.WritePropertyName("Scope"); | ||
writer.WriteValue(mastodonClient.AppRegistration.Scope); | ||
} | ||
else | ||
{ | ||
writer.WriteNull(); | ||
} | ||
|
||
writer.WriteEndObject(); | ||
|
||
writer.WritePropertyName("AuthToken"); | ||
writer.WriteStartObject(); | ||
if (mastodonClient.AuthToken != null) | ||
{ | ||
writer.WritePropertyName("AccessToken"); | ||
writer.WriteValue(mastodonClient.AuthToken.AccessToken); | ||
writer.WritePropertyName("TokenType"); | ||
writer.WriteValue(mastodonClient.AuthToken.TokenType); | ||
writer.WritePropertyName("Scope"); | ||
writer.WriteValue(mastodonClient.AuthToken.Scope); | ||
writer.WritePropertyName("CreatedAt"); | ||
writer.WriteValue(mastodonClient.AuthToken.CreatedAt); | ||
} | ||
else | ||
{ | ||
writer.WriteNull(); | ||
} | ||
|
||
writer.WriteEndObject(); | ||
|
||
writer.WriteEndObject(); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, | ||
JsonSerializer serializer) | ||
{ | ||
var appRegistration = new AppRegistration(); | ||
var authToken = new Auth(); | ||
var jsonObject = JObject.Load(reader); | ||
appRegistration.ClientId = jsonObject["AppRegistration"]["ClientId"].Value<string>(); | ||
appRegistration.ClientSecret = jsonObject["AppRegistration"]["ClientSecret"].Value<string>(); | ||
appRegistration.Id = jsonObject["AppRegistration"]["Id"].Value<long>(); | ||
appRegistration.Instance = jsonObject["AppRegistration"]["Instance"].Value<string>(); | ||
appRegistration.RedirectUri = jsonObject["AppRegistration"]["RedirectUri"].Value<string>(); | ||
var scope = jsonObject["AppRegistration"]["Scope"].Value<long>(); | ||
appRegistration.Scope = (Scope) Enum.ToObject(typeof(Scope), scope); | ||
|
||
authToken.AccessToken = jsonObject["AuthToken"]["AccessToken"].Value<string>(); | ||
authToken.TokenType = jsonObject["AuthToken"]["TokenType"].Value<string>(); | ||
authToken.Scope = jsonObject["AuthToken"]["Scope"].Value<string>(); | ||
authToken.CreatedAt = jsonObject["AuthToken"]["CreatedAt"].Value<string>(); | ||
|
||
return new MastodonClient(appRegistration, authToken); | ||
} | ||
|
||
public override bool CanConvert(Type objectType) | ||
{ | ||
return objectType == typeof(MastodonClient); | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
NowPlayingCore/ConfigConverter/TwitterAuthTokenConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using CoreTweet; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
using NowPlayingCore.Tsumugi; | ||
|
||
namespace NowPlayingCore.ConfigConverter | ||
{ | ||
class TwitterAuthTokenConverter : JsonConverter | ||
{ | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
var authToken = value as Tokens; | ||
if (authToken == null) | ||
{ | ||
writer.WriteNull(); | ||
return; | ||
} | ||
|
||
writer.WriteStartObject(); | ||
writer.WritePropertyName("AccessToken"); | ||
writer.WriteValue(authToken.AccessToken); | ||
writer.WritePropertyName("AccessTokenSecret"); | ||
writer.WriteValue(authToken.AccessTokenSecret); | ||
writer.WritePropertyName("UserId"); | ||
writer.WriteValue(authToken.UserId); | ||
writer.WritePropertyName("ScreenName"); | ||
writer.WriteValue(authToken.ScreenName); | ||
writer.WriteEndObject(); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, | ||
JsonSerializer serializer) | ||
{ | ||
var jsonObject = JObject.Load(reader); | ||
return Tokens.Create(APIKey.CONSUMER_KEY, APIKey.CONSUMER_SECRET, | ||
jsonObject["AccessToken"].Value<string>(), jsonObject["AccessTokenSecret"].Value<string>(), | ||
jsonObject["UserId"].Value<long>(), jsonObject["ScreenName"].Value<string>()); | ||
} | ||
|
||
public override bool CanConvert(Type objectType) | ||
{ | ||
return objectType == typeof(Tokens); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.