Skip to content

Commit

Permalink
adds gitattributes and normalizes line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
dabutvin committed Aug 1, 2018
1 parent 68a3728 commit b585d21
Show file tree
Hide file tree
Showing 70 changed files with 3,389 additions and 3,381 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
@@ -0,0 +1,8 @@
* text=auto

*.jpg binary
*.jpeg binary
*.png binary
*.gif binary

*.sh text eol=lf
32 changes: 16 additions & 16 deletions .github/stale.yml
@@ -1,17 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
30 changes: 15 additions & 15 deletions .gitignore
@@ -1,16 +1,16 @@
bin
obj
packages
.vs
pgp_private_key.txt
pgp_password.txt
*.pem
*.pubxml
*.pubxml.user
*.csproj.user
local.settings.json
appsettings.json
node_modules
lib
.DS_Store
bin
obj
packages
.vs
pgp_private_key.txt
pgp_password.txt
*.pem
*.pubxml
*.pubxml.user
*.csproj.user
local.settings.json
appsettings.json
node_modules
lib
.DS_Store
UserPrefs.xml
26 changes: 13 additions & 13 deletions Common/Common.csproj
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
</ItemGroup>

<Import Project="../ImgBot.targets" />

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
</ItemGroup>

<Import Project="../ImgBot.targets" />

</Project>
46 changes: 23 additions & 23 deletions Common/KnownGitHubs.cs
@@ -1,23 +1,23 @@
namespace Common
{
public static class KnownGitHubs
{
public const int AppId = 4706;

public const string AppPrivateKey = "imgbot.2017-08-23.private-key.pem";

public const string PGPPrivateKeyFilename = "pgp_private_key.txt";

public const string PGPPasswordFilename = "pgp_password.txt";

public const string ImgBotLogin = "ImgBotApp";

public const string ImgBotEmail = "ImgBotHelp@gmail.com";

public const string CommitMessageTitle = "[ImgBot] optimizes images";

public const string Username = "x-access-token";

public const string BranchName = "imgbot";
}
}
namespace Common
{
public static class KnownGitHubs
{
public const int AppId = 4706;

public const string AppPrivateKey = "imgbot.2017-08-23.private-key.pem";

public const string PGPPrivateKeyFilename = "pgp_private_key.txt";

public const string PGPPasswordFilename = "pgp_password.txt";

public const string ImgBotLogin = "ImgBotApp";

public const string ImgBotEmail = "ImgBotHelp@gmail.com";

public const string CommitMessageTitle = "[ImgBot] optimizes images";

public const string Username = "x-access-token";

public const string BranchName = "imgbot";
}
}
18 changes: 9 additions & 9 deletions Common/KnownImgPatterns.cs
@@ -1,9 +1,9 @@
namespace Common
{
public static class KnownImgPatterns
{
public static readonly string[] ImgPatterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", };

public static readonly string[] ImgExtensions = { ".png", ".jpg", ".jpeg", ".gif", };
}
}
namespace Common
{
public static class KnownImgPatterns
{
public static readonly string[] ImgPatterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", };

public static readonly string[] ImgExtensions = { ".png", ".jpg", ".jpeg", ".gif", };
}
}
22 changes: 11 additions & 11 deletions Common/KnownScheduleSettings.cs
@@ -1,11 +1,11 @@
namespace Common
{
public static class KnownScheduleSettings
{
public const string Daily = "daily";

public const string Weekly = "weekly";

public const string Monthly = "monthly";
}
}
namespace Common
{
public static class KnownScheduleSettings
{
public const string Daily = "daily";

public const string Weekly = "weekly";

public const string Monthly = "monthly";
}
}
18 changes: 9 additions & 9 deletions Common/Mediation/IMediator.cs
@@ -1,9 +1,9 @@
using System.Threading.Tasks;

namespace Common.Mediation
{
public interface IMediator
{
Task SendAsync<T>(T message);
}
}
using System.Threading.Tasks;

namespace Common.Mediation
{
public interface IMediator
{
Task SendAsync<T>(T message);
}
}
48 changes: 24 additions & 24 deletions Common/Mediation/QueueMediator.cs
@@ -1,24 +1,24 @@
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Queue;
using Newtonsoft.Json;

namespace Common.Mediation
{
public class QueueMediator : IMediator
{
private readonly CloudQueueClient _queueClient;

public QueueMediator(CloudQueueClient queueClient)
{
_queueClient = queueClient;
}

public async Task SendAsync<T>(T message)
{
var queue = _queueClient.GetQueueReference(typeof(T).Name.ToLowerInvariant());
await queue.CreateIfNotExistsAsync();

await queue.AddMessageAsync(new CloudQueueMessage(JsonConvert.SerializeObject(message)));
}
}
}
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Queue;
using Newtonsoft.Json;

namespace Common.Mediation
{
public class QueueMediator : IMediator
{
private readonly CloudQueueClient _queueClient;

public QueueMediator(CloudQueueClient queueClient)
{
_queueClient = queueClient;
}

public async Task SendAsync<T>(T message)
{
var queue = _queueClient.GetQueueReference(typeof(T).Name.ToLowerInvariant());
await queue.CreateIfNotExistsAsync();

await queue.AddMessageAsync(new CloudQueueMessage(JsonConvert.SerializeObject(message)));
}
}
}
18 changes: 9 additions & 9 deletions Common/RepoConfiguration.cs
@@ -1,9 +1,9 @@
namespace Common
{
public class RepoConfiguration
{
public string Schedule { get; set; }

public string[] IgnoredFiles { get; set; }
}
}
namespace Common
{
public class RepoConfiguration
{
public string Schedule { get; set; }

public string[] IgnoredFiles { get; set; }
}
}
38 changes: 19 additions & 19 deletions Common/Repository/IRepository.cs
@@ -1,20 +1,20 @@
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Table;

namespace Common.Repository
{
public interface IRepository
{
Task InsertOrMergeAsync<T>(T entity)
where T : TableEntity, new();

Task<T> RetrieveAsync<T>(string partitionKey, string rowKey)
where T : TableEntity, new();

Task DeleteAsync<T>(string partitionKey, string rowKey)
where T : TableEntity, new();

Task<T[]> RetrievePartitionAsync<T>(string partitionKey)
where T : TableEntity, new();
}
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Table;

namespace Common.Repository
{
public interface IRepository
{
Task InsertOrMergeAsync<T>(T entity)
where T : TableEntity, new();

Task<T> RetrieveAsync<T>(string partitionKey, string rowKey)
where T : TableEntity, new();

Task DeleteAsync<T>(string partitionKey, string rowKey)
where T : TableEntity, new();

Task<T[]> RetrievePartitionAsync<T>(string partitionKey)
where T : TableEntity, new();
}
}

0 comments on commit b585d21

Please sign in to comment.