Skip to content

Commit b585d21

Browse files
committed
adds gitattributes and normalizes line endings
1 parent 68a3728 commit b585d21

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3389
-3381
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* text=auto
2+
3+
*.jpg binary
4+
*.jpeg binary
5+
*.png binary
6+
*.gif binary
7+
8+
*.sh text eol=lf

.github/stale.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Number of days of inactivity before an issue becomes stale
2-
daysUntilStale: 60
3-
# Number of days of inactivity before a stale issue is closed
4-
daysUntilClose: 7
5-
# Issues with these labels will never be considered stale
6-
exemptLabels:
7-
- pinned
8-
- security
9-
# Label to use when marking an issue as stale
10-
staleLabel: wontfix
11-
# Comment to post when marking an issue as stale. Set to `false` to disable
12-
markComment: >
13-
This issue has been automatically marked as stale because it has not had
14-
recent activity. It will be closed if no further activity occurs. Thank you
15-
for your contributions.
16-
# Comment to post when closing a stale issue. Set to `false` to disable
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
1717
closeComment: false

.gitignore

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
bin
2-
obj
3-
packages
4-
.vs
5-
pgp_private_key.txt
6-
pgp_password.txt
7-
*.pem
8-
*.pubxml
9-
*.pubxml.user
10-
*.csproj.user
11-
local.settings.json
12-
appsettings.json
13-
node_modules
14-
lib
15-
.DS_Store
1+
bin
2+
obj
3+
packages
4+
.vs
5+
pgp_private_key.txt
6+
pgp_password.txt
7+
*.pem
8+
*.pubxml
9+
*.pubxml.user
10+
*.csproj.user
11+
local.settings.json
12+
appsettings.json
13+
node_modules
14+
lib
15+
.DS_Store
1616
UserPrefs.xml

Common/Common.csproj

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
</PropertyGroup>
6-
7-
<ItemGroup>
8-
<PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
9-
</ItemGroup>
10-
11-
<Import Project="../ImgBot.targets" />
12-
13-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
9+
</ItemGroup>
10+
11+
<Import Project="../ImgBot.targets" />
12+
13+
</Project>

Common/KnownGitHubs.cs

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
namespace Common
2-
{
3-
public static class KnownGitHubs
4-
{
5-
public const int AppId = 4706;
6-
7-
public const string AppPrivateKey = "imgbot.2017-08-23.private-key.pem";
8-
9-
public const string PGPPrivateKeyFilename = "pgp_private_key.txt";
10-
11-
public const string PGPPasswordFilename = "pgp_password.txt";
12-
13-
public const string ImgBotLogin = "ImgBotApp";
14-
15-
public const string ImgBotEmail = "ImgBotHelp@gmail.com";
16-
17-
public const string CommitMessageTitle = "[ImgBot] optimizes images";
18-
19-
public const string Username = "x-access-token";
20-
21-
public const string BranchName = "imgbot";
22-
}
23-
}
1+
namespace Common
2+
{
3+
public static class KnownGitHubs
4+
{
5+
public const int AppId = 4706;
6+
7+
public const string AppPrivateKey = "imgbot.2017-08-23.private-key.pem";
8+
9+
public const string PGPPrivateKeyFilename = "pgp_private_key.txt";
10+
11+
public const string PGPPasswordFilename = "pgp_password.txt";
12+
13+
public const string ImgBotLogin = "ImgBotApp";
14+
15+
public const string ImgBotEmail = "ImgBotHelp@gmail.com";
16+
17+
public const string CommitMessageTitle = "[ImgBot] optimizes images";
18+
19+
public const string Username = "x-access-token";
20+
21+
public const string BranchName = "imgbot";
22+
}
23+
}

Common/KnownImgPatterns.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
namespace Common
2-
{
3-
public static class KnownImgPatterns
4-
{
5-
public static readonly string[] ImgPatterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", };
6-
7-
public static readonly string[] ImgExtensions = { ".png", ".jpg", ".jpeg", ".gif", };
8-
}
9-
}
1+
namespace Common
2+
{
3+
public static class KnownImgPatterns
4+
{
5+
public static readonly string[] ImgPatterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", };
6+
7+
public static readonly string[] ImgExtensions = { ".png", ".jpg", ".jpeg", ".gif", };
8+
}
9+
}

Common/KnownScheduleSettings.cs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
namespace Common
2-
{
3-
public static class KnownScheduleSettings
4-
{
5-
public const string Daily = "daily";
6-
7-
public const string Weekly = "weekly";
8-
9-
public const string Monthly = "monthly";
10-
}
11-
}
1+
namespace Common
2+
{
3+
public static class KnownScheduleSettings
4+
{
5+
public const string Daily = "daily";
6+
7+
public const string Weekly = "weekly";
8+
9+
public const string Monthly = "monthly";
10+
}
11+
}

Common/Mediation/IMediator.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Threading.Tasks;
2-
3-
namespace Common.Mediation
4-
{
5-
public interface IMediator
6-
{
7-
Task SendAsync<T>(T message);
8-
}
9-
}
1+
using System.Threading.Tasks;
2+
3+
namespace Common.Mediation
4+
{
5+
public interface IMediator
6+
{
7+
Task SendAsync<T>(T message);
8+
}
9+
}

Common/Mediation/QueueMediator.cs

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
using System.Threading.Tasks;
2-
using Microsoft.WindowsAzure.Storage.Queue;
3-
using Newtonsoft.Json;
4-
5-
namespace Common.Mediation
6-
{
7-
public class QueueMediator : IMediator
8-
{
9-
private readonly CloudQueueClient _queueClient;
10-
11-
public QueueMediator(CloudQueueClient queueClient)
12-
{
13-
_queueClient = queueClient;
14-
}
15-
16-
public async Task SendAsync<T>(T message)
17-
{
18-
var queue = _queueClient.GetQueueReference(typeof(T).Name.ToLowerInvariant());
19-
await queue.CreateIfNotExistsAsync();
20-
21-
await queue.AddMessageAsync(new CloudQueueMessage(JsonConvert.SerializeObject(message)));
22-
}
23-
}
24-
}
1+
using System.Threading.Tasks;
2+
using Microsoft.WindowsAzure.Storage.Queue;
3+
using Newtonsoft.Json;
4+
5+
namespace Common.Mediation
6+
{
7+
public class QueueMediator : IMediator
8+
{
9+
private readonly CloudQueueClient _queueClient;
10+
11+
public QueueMediator(CloudQueueClient queueClient)
12+
{
13+
_queueClient = queueClient;
14+
}
15+
16+
public async Task SendAsync<T>(T message)
17+
{
18+
var queue = _queueClient.GetQueueReference(typeof(T).Name.ToLowerInvariant());
19+
await queue.CreateIfNotExistsAsync();
20+
21+
await queue.AddMessageAsync(new CloudQueueMessage(JsonConvert.SerializeObject(message)));
22+
}
23+
}
24+
}

Common/RepoConfiguration.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
namespace Common
2-
{
3-
public class RepoConfiguration
4-
{
5-
public string Schedule { get; set; }
6-
7-
public string[] IgnoredFiles { get; set; }
8-
}
9-
}
1+
namespace Common
2+
{
3+
public class RepoConfiguration
4+
{
5+
public string Schedule { get; set; }
6+
7+
public string[] IgnoredFiles { get; set; }
8+
}
9+
}

Common/Repository/IRepository.cs

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
using System.Threading.Tasks;
2-
using Microsoft.WindowsAzure.Storage.Table;
3-
4-
namespace Common.Repository
5-
{
6-
public interface IRepository
7-
{
8-
Task InsertOrMergeAsync<T>(T entity)
9-
where T : TableEntity, new();
10-
11-
Task<T> RetrieveAsync<T>(string partitionKey, string rowKey)
12-
where T : TableEntity, new();
13-
14-
Task DeleteAsync<T>(string partitionKey, string rowKey)
15-
where T : TableEntity, new();
16-
17-
Task<T[]> RetrievePartitionAsync<T>(string partitionKey)
18-
where T : TableEntity, new();
19-
}
1+
using System.Threading.Tasks;
2+
using Microsoft.WindowsAzure.Storage.Table;
3+
4+
namespace Common.Repository
5+
{
6+
public interface IRepository
7+
{
8+
Task InsertOrMergeAsync<T>(T entity)
9+
where T : TableEntity, new();
10+
11+
Task<T> RetrieveAsync<T>(string partitionKey, string rowKey)
12+
where T : TableEntity, new();
13+
14+
Task DeleteAsync<T>(string partitionKey, string rowKey)
15+
where T : TableEntity, new();
16+
17+
Task<T[]> RetrievePartitionAsync<T>(string partitionKey)
18+
where T : TableEntity, new();
19+
}
2020
}

0 commit comments

Comments
 (0)