Skip to content

Commit 197b5ff

Browse files
author
Matt Bernier
authored
Merge branch 'master' into priefy-issue-48
2 parents 49a0c61 + c15405f commit 197b5ff

File tree

7 files changed

+161
-3
lines changed

7 files changed

+161
-3
lines changed

.env_sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export SENDGRID_API_KEY=''
1+
Environment.SetEnvironmentVariable("NAME_OF_THE_ENVIRONMENT_VARIABLE_FOR_YOUR_SENDGRID_KEY", value);

.github/PULL_REQUEST_TEMPLATE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines given above, then fill out the blanks below.
3+
4+
5+
Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged!
6+
e.g.
7+
Fixes #1
8+
Closes #2
9+
-->
10+
# Fixes #
11+
12+
### Checklist
13+
- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
14+
- [ ] I have read the [Contribution Guide] and my PR follows them.
15+
- [ ] I updated my branch with the master branch.
16+
- [ ] I have added tests that prove my fix is effective or that my feature works
17+
- [ ] I have added necessary documentation about the functionality in the appropriate .md file
18+
- [ ] I have added in line documentation to the code I modified
19+
20+
### Short description of what this PR does:
21+
-
22+
-
23+
24+
If you have questions, please send an email to [Sendgrid](mailto:dx@sendgrid.com), or file a Github Issue in this repository.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2016 SendGrid, Inc.
1+
Copyright (c) 2014-2017 SendGrid, Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
44
documentation files (the "Software"), to deal in the Software without restriction, including without limitation

Smtpapi/HeaderTests/SendGrid.SmtpApi.HeaderTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
</ItemGroup>
3939
<ItemGroup>
4040
<Compile Include="TestHeader.cs" />
41+
<Compile Include="TestRepositoryFiles.cs" />
4142
<Compile Include="TestTreeNode.cs" />
4243
<Compile Include="TestUtils.cs" />
4344
</ItemGroup>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using NUnit.Framework;
2+
using System;
3+
using System.IO;
4+
using System.Linq;
5+
6+
namespace SendGrid.SmtpApi.HeaderTests
7+
{
8+
[TestFixture]
9+
public class TestRepositoryFiles
10+
{
11+
[Test]
12+
public void TestLicenseEndYear()
13+
{
14+
string[] pathsArray = new string[] { "..", "..", "..", "..", "LICENSE.txt" };
15+
string licensePath = Path.Combine(pathsArray);
16+
17+
string line = File.ReadLines(licensePath).First();
18+
19+
Assert.AreEqual(DateTime.Now.Year.ToString(), line.Substring(19, 4));
20+
}
21+
}
22+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
32
<packages>
43
<package id="NUnit" version="2.6.3" targetFramework="net40" />
4+
<package id="NUnitTestAdapter" version="2.1.1" targetFramework="net40" />
55
</packages>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
namespace SendGrid.Tests
2+
{
3+
using System;
4+
using Xunit;
5+
6+
public class TestRequiredFilesExist
7+
{
8+
9+
// ./Docker or docker/Docker
10+
public void checkDockerExists()
11+
{
12+
bool dockerExists = File.Exists("./Dockerfile") ||
13+
File.Exists("./docker/Dockerfile");
14+
Assert.True(dockerExists);
15+
}
16+
17+
// ./docker-compose.yml or ./docker/docker-compose.yml
18+
public void checkDockerComposeExists()
19+
{
20+
bool dockerComposeExists = File.Exists("./docker-compose.yml") ||
21+
File.Exists("./docker/docker-compose.yml");
22+
Assert.True(dockerComposeExists);
23+
}
24+
25+
// ./.env_sample
26+
public void checkEnvSampleExists()
27+
{
28+
Assert.True(File.Exists("./.env_sample"));
29+
}
30+
31+
// ./.gitignore
32+
public void checkGitIgnoreExists()
33+
{
34+
Assert.True(File.Exists("./.gitignore"));
35+
}
36+
37+
// ./.travis.yml
38+
public void checkTravisExists()
39+
{
40+
Assert.True(File.Exists("./.travis.yml"));
41+
}
42+
43+
// ./.codeclimate.yml
44+
public void checkCodeClimateExists()
45+
{
46+
Assert.True(File.Exists("./.codeclimate.yml"));
47+
}
48+
49+
// ./CHANGELOG.md
50+
public void checkChangelogExists()
51+
{
52+
Assert.True(File.Exists("./CHANGELOG.md"));
53+
}
54+
55+
// ./CODE_OF_CONDUCT.md
56+
public void checkCodeOfConductExists()
57+
{
58+
Assert.True(File.Exists("./CODE_OF_CONDUCT.md"));
59+
}
60+
61+
// ./CONTRIBUTING.md
62+
public void checkContributingGuideExists()
63+
{
64+
Assert.True(File.Exists("./CONTRIBUTING.md"));
65+
}
66+
67+
// ./.github/ISSUE_TEMPLATE
68+
public void checkIssuesTemplateExists()
69+
{
70+
Assert.True(File.Exists("./.github/ISSUE_TEMPLATE"));
71+
}
72+
73+
// ./LICENSE.md
74+
public void checkLicenseExists()
75+
{
76+
bool licenseExists = File.Exists("./LICENSE.txt") ||
77+
File.Exists("./LICENSE.md");
78+
Assert.True(dockerExists);
79+
}
80+
81+
// ./.github/PULL_REQUEST_TEMPLATE
82+
public void checkPullRequestExists()
83+
{
84+
Assert.True(File.Exists("./.github/PULL_REQUEST_TEMPLATE"));
85+
}
86+
87+
// ./README.md
88+
public void checkReadMeExists()
89+
{
90+
Assert.True(File.Exists("./README.md"));
91+
}
92+
93+
// ./TROUBLESHOOTING.md
94+
public void checkTroubleShootingGuideExists()
95+
{
96+
Assert.True(File.Exists("./TROUBLESHOOTING.md"));
97+
}
98+
99+
// ./USAGE.md
100+
public void checkUsageGuideExists()
101+
{
102+
Assert.True(File.Exists("./USAGE.md"));
103+
}
104+
105+
// ./USE_CASES.md
106+
public void checkUseCases()
107+
{
108+
Assert.True(File.Exists("./USE_CASES.md"));
109+
}
110+
}
111+
}

0 commit comments

Comments
 (0)