Skip to content

Commit 3215b42

Browse files
authored
Merge pull request #6 from adriangodong/bugfixes
Bugfixes
2 parents 738af0f + 6e3e54b commit 3215b42

File tree

7 files changed

+310
-48
lines changed

7 files changed

+310
-48
lines changed

.gitignore

Lines changed: 295 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,295 @@
1-
Medium/*.user
2-
Medium/bin
3-
Medium/obj
4-
Medium.Tests/*.user
5-
Medium.Tests/bin
6-
Medium.Tests/obj
7-
packages/*
8-
artifacts/*
9-
/.vs
10-
/.vscode
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.userosscache
10+
*.sln.docstates
11+
12+
# User-specific files (MonoDevelop/Xamarin Studio)
13+
*.userprefs
14+
15+
# Build results
16+
[Dd]ebug/
17+
[Dd]ebugPublic/
18+
[Rr]elease/
19+
[Rr]eleases/
20+
x64/
21+
x86/
22+
bld/
23+
[Bb]in/
24+
[Oo]bj/
25+
[Ll]og/
26+
27+
# Visual Studio 2015 cache/options directory
28+
.vs/
29+
# Uncomment if you have tasks that create the project's static files in wwwroot
30+
#wwwroot/
31+
32+
# MSTest test Results
33+
[Tt]est[Rr]esult*/
34+
[Bb]uild[Ll]og.*
35+
36+
# NUNIT
37+
*.VisualState.xml
38+
TestResult.xml
39+
40+
# Build Results of an ATL Project
41+
[Dd]ebugPS/
42+
[Rr]eleasePS/
43+
dlldata.c
44+
45+
# Benchmark Results
46+
BenchmarkDotNet.Artifacts/
47+
48+
# .NET Core
49+
project.lock.json
50+
project.fragment.lock.json
51+
artifacts/
52+
**/Properties/launchSettings.json
53+
54+
*_i.c
55+
*_p.c
56+
*_i.h
57+
*.ilk
58+
*.meta
59+
*.obj
60+
*.pch
61+
*.pdb
62+
*.pgc
63+
*.pgd
64+
*.rsp
65+
*.sbr
66+
*.tlb
67+
*.tli
68+
*.tlh
69+
*.tmp
70+
*.tmp_proj
71+
*.log
72+
*.vspscc
73+
*.vssscc
74+
.builds
75+
*.pidb
76+
*.svclog
77+
*.scc
78+
79+
# Chutzpah Test files
80+
_Chutzpah*
81+
82+
# Visual C++ cache files
83+
ipch/
84+
*.aps
85+
*.ncb
86+
*.opendb
87+
*.opensdf
88+
*.sdf
89+
*.cachefile
90+
*.VC.db
91+
*.VC.VC.opendb
92+
93+
# Visual Studio profiler
94+
*.psess
95+
*.vsp
96+
*.vspx
97+
*.sap
98+
99+
# TFS 2012 Local Workspace
100+
$tf/
101+
102+
# Guidance Automation Toolkit
103+
*.gpState
104+
105+
# ReSharper is a .NET coding add-in
106+
_ReSharper*/
107+
*.[Rr]e[Ss]harper
108+
*.DotSettings.user
109+
110+
# JustCode is a .NET coding add-in
111+
.JustCode
112+
113+
# TeamCity is a build add-in
114+
_TeamCity*
115+
116+
# DotCover is a Code Coverage Tool
117+
*.dotCover
118+
119+
# Visual Studio code coverage results
120+
*.coverage
121+
*.coveragexml
122+
123+
# NCrunch
124+
_NCrunch_*
125+
.*crunch*.local.xml
126+
nCrunchTemp_*
127+
128+
# MightyMoose
129+
*.mm.*
130+
AutoTest.Net/
131+
132+
# Web workbench (sass)
133+
.sass-cache/
134+
135+
# Installshield output folder
136+
[Ee]xpress/
137+
138+
# DocProject is a documentation generator add-in
139+
DocProject/buildhelp/
140+
DocProject/Help/*.HxT
141+
DocProject/Help/*.HxC
142+
DocProject/Help/*.hhc
143+
DocProject/Help/*.hhk
144+
DocProject/Help/*.hhp
145+
DocProject/Help/Html2
146+
DocProject/Help/html
147+
148+
# Click-Once directory
149+
publish/
150+
151+
# Publish Web Output
152+
*.[Pp]ublish.xml
153+
*.azurePubxml
154+
# Note: Comment the next line if you want to checkin your web deploy settings,
155+
# but database connection strings (with potential passwords) will be unencrypted
156+
*.pubxml
157+
*.publishproj
158+
159+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
160+
# checkin your Azure Web App publish settings, but sensitive information contained
161+
# in these scripts will be unencrypted
162+
PublishScripts/
163+
164+
# NuGet Packages
165+
*.nupkg
166+
# The packages folder can be ignored because of Package Restore
167+
**/packages/*
168+
# except build/, which is used as an MSBuild target.
169+
!**/packages/build/
170+
# Uncomment if necessary however generally it will be regenerated when needed
171+
#!**/packages/repositories.config
172+
# NuGet v3's project.json files produces more ignorable files
173+
*.nuget.props
174+
*.nuget.targets
175+
176+
# Microsoft Azure Build Output
177+
csx/
178+
*.build.csdef
179+
180+
# Microsoft Azure Emulator
181+
ecf/
182+
rcf/
183+
184+
# Windows Store app package directories and files
185+
AppPackages/
186+
BundleArtifacts/
187+
Package.StoreAssociation.xml
188+
_pkginfo.txt
189+
*.appx
190+
191+
# Visual Studio cache files
192+
# files ending in .cache can be ignored
193+
*.[Cc]ache
194+
# but keep track of directories ending in .cache
195+
!*.[Cc]ache/
196+
197+
# Others
198+
ClientBin/
199+
~$*
200+
*~
201+
*.dbmdl
202+
*.dbproj.schemaview
203+
*.jfm
204+
*.pfx
205+
*.publishsettings
206+
orleans.codegen.cs
207+
208+
# Since there are multiple workflows, uncomment next line to ignore bower_components
209+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
210+
#bower_components/
211+
212+
# RIA/Silverlight projects
213+
Generated_Code/
214+
215+
# Backup & report files from converting an old project file
216+
# to a newer Visual Studio version. Backup files are not needed,
217+
# because we have git ;-)
218+
_UpgradeReport_Files/
219+
Backup*/
220+
UpgradeLog*.XML
221+
UpgradeLog*.htm
222+
223+
# SQL Server files
224+
*.mdf
225+
*.ldf
226+
*.ndf
227+
228+
# Business Intelligence projects
229+
*.rdl.data
230+
*.bim.layout
231+
*.bim_*.settings
232+
233+
# Microsoft Fakes
234+
FakesAssemblies/
235+
236+
# GhostDoc plugin setting file
237+
*.GhostDoc.xml
238+
239+
# Node.js Tools for Visual Studio
240+
.ntvs_analysis.dat
241+
node_modules/
242+
243+
# Typescript v1 declaration files
244+
typings/
245+
246+
# Visual Studio 6 build log
247+
*.plg
248+
249+
# Visual Studio 6 workspace options file
250+
*.opt
251+
252+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
253+
*.vbw
254+
255+
# Visual Studio LightSwitch build output
256+
**/*.HTMLClient/GeneratedArtifacts
257+
**/*.DesktopClient/GeneratedArtifacts
258+
**/*.DesktopClient/ModelManifest.xml
259+
**/*.Server/GeneratedArtifacts
260+
**/*.Server/ModelManifest.xml
261+
_Pvt_Extensions
262+
263+
# Paket dependency manager
264+
.paket/paket.exe
265+
paket-files/
266+
267+
# FAKE - F# Make
268+
.fake/
269+
270+
# JetBrains Rider
271+
.idea/
272+
*.sln.iml
273+
274+
# CodeRush
275+
.cr/
276+
277+
# Python Tools for Visual Studio (PTVS)
278+
__pycache__/
279+
*.pyc
280+
281+
# Cake - Uncomment if you are using it
282+
# tools/**
283+
# !tools/packages.config
284+
285+
# Tabs Studio
286+
*.tss
287+
288+
# Telerik's JustMock configuration file
289+
*.jmconfig
290+
291+
# BizTalk build output
292+
*.btp.cs
293+
*.btm.cs
294+
*.odx.cs
295+
*.xsd.cs

Medium.Tests/Client.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Client
1515

1616
public Client() {
1717
var configuration = new ConfigurationBuilder().
18-
AddJsonFile("config.json").
18+
AddEnvironmentVariables("MEDIUMSDK_").
1919
Build();
2020
_accessToken = configuration["AccessToken"];
2121
_testPublicationId = configuration["TestPublicationId"];
@@ -80,7 +80,7 @@ public void CreatePost()
8080
{
8181
var client = new Medium.Client();
8282
var title = "Liverpool FC";
83-
var tags = new[] { "football", "sport", "liverpool" };
83+
var tags = new[] { "football", "sports", "liverpool" };
8484
var canonicalUrl = "http://jamietalbot.com/posts/liverpool-fc";
8585
var publishStatus = PublishStatus.Unlisted;
8686
var license = License.Cc40By;
@@ -124,7 +124,7 @@ public void CreatePostUnderPublication()
124124
{
125125
var client = new Medium.Client();
126126
var title = "Liverpool FC";
127-
var tags = new[] { "football", "sport", "liverpool" };
127+
var tags = new[] { "football", "sports", "liverpool" };
128128
var canonicalUrl = "http://jamietalbot.com/posts/liverpool-fc";
129129
var publishStatus = PublishStatus.Public;
130130
var license = License.Cc40By;

Medium.Tests/Medium.Tests.csproj

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,15 @@
1010
<IsPackable>False</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
14-
<None Update="config.json">
15-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16-
</None>
17-
</ItemGroup>
18-
1913
<ItemGroup>
2014
<ProjectReference Include="..\Medium\Medium.csproj" />
2115
</ItemGroup>
2216

2317
<ItemGroup>
24-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
18+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
2520
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
26-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.1" />
27-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.2" />
2822
<PackageReference Include="xunit" Version="2.2.0" />
2923
</ItemGroup>
3024

Medium.Tests/config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)