Skip to content

Commit bddd198

Browse files
author
Jon Elverkilde
authored
Merge pull request #104 from pusher/PusherClient.1.2.0
PusherClient now targets net45, net472, netstandard1.3 and netstandard2.0
2 parents d2a6ddb + edde360 commit bddd198

File tree

131 files changed

+10515
-2592
lines changed

Some content is hidden

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

131 files changed

+10515
-2592
lines changed

.gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.github/stale.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 90
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 7
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- pinned
16+
- security
17+
18+
# Set to true to ignore issues with an assignee (defaults to false)
19+
exemptAssignees: true
20+
21+
# Comment to post when marking as stale. Set to `false` to disable
22+
markComment: >
23+
This issue has been automatically marked as stale because it has not had
24+
recent activity. It will be closed if no further activity occurs. If you'd
25+
like this issue to stay open please leave a comment indicating how this issue
26+
is affecting you. Thank you.

.github/workflows/build.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ master, develop ]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: windows-2019
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Setup MS Build
16+
uses: microsoft/[email protected]
17+
- name: Setup VSTest
18+
uses: darenm/Setup-VSTest@v1
19+
- name: Restore dependencies
20+
run: nuget restore pusher-dotnet-client.sln
21+
- name: Build
22+
run: msbuild /p:deterministic=true /p:msbuildArchitecture=x64 /p:configuration=Release pusher-dotnet-client.sln
23+
- name: Test
24+
env:
25+
PUSHER_APP_ID: ${{ secrets.CI_APP_ID }}
26+
PUSHER_APP_KEY: ${{ secrets.CI_APP_KEY }}
27+
PUSHER_APP_SECRET: ${{ secrets.CI_APP_SECRET }}
28+
PUSHER_APP_CLUSTER: ${{ secrets.CI_APP_CLUSTER }}
29+
run: vstest.console.exe /Parallel /Platform:x64 "./PusherClient.Tests/bin/Release/PusherClient.Tests.dll" /TestAdapterPath:"./PusherClient.Tests/bin/Release/"
30+
- name: Test pack
31+
run: msbuild /t:Pack /p:configuration=release PusherClient/PusherClient.csproj

.github/workflows/gh-release.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Github Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
create-release:
9+
name: Create Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
- name: Setup git
15+
run: |
16+
git config user.email "[email protected]"
17+
git config user.name "Pusher CI"
18+
- name: Prepare description
19+
run: |
20+
csplit -s CHANGELOG.md "/##/" {1}
21+
cat xx01 > CHANGELOG.tmp
22+
- name: Prepare tag
23+
run: |
24+
export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2)
25+
echo "TAG=$TAG" >> $GITHUB_ENV
26+
- name: Create Release
27+
uses: actions/create-release@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
tag_name: ${{ env.TAG }}
32+
release_name: ${{ env.TAG }}
33+
body_path: CHANGELOG.tmp
34+
draft: false
35+
prerelease: false

.github/workflows/publish.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: windows-2019
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup MS Build
15+
uses: microsoft/[email protected]
16+
- name: Restore dependencies
17+
run: nuget restore pusher-dotnet-client.sln
18+
- name: Build
19+
run: msbuild /p:deterministic=true /p:msbuildArchitecture=x64 /p:configuration=Release pusher-dotnet-client.sln
20+
- name: Pack
21+
run: msbuild /t:Pack /p:configuration=release PusherClient/PusherClient.csproj
22+
- name: Publish
23+
run: nuget push PusherClient\bin\release\PusherClient.*.nupkg -NonInteractive -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_API_KEY }}

.github/workflows/release.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
types: [ labeled ]
6+
branches:
7+
- master
8+
9+
jobs:
10+
prepare-release:
11+
name: Prepare release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set major release
16+
if: ${{ github.event.label.name == 'release-major' }}
17+
run: echo "RELEASE=major" >> $GITHUB_ENV
18+
- name: Set minor release
19+
if: ${{ github.event.label.name == 'release-minor' }}
20+
run: echo "RELEASE=minor" >> $GITHUB_ENV
21+
- name: Set patch release
22+
if: ${{ github.event.label.name == 'release-patch' }}
23+
run: echo "RELEASE=patch" >> $GITHUB_ENV
24+
- name: Check release env
25+
run: |
26+
if [[ -z "${{ env.RELEASE }}" ]];
27+
then
28+
echo "You need to set a release label on PRs to the main branch"
29+
exit 1
30+
else
31+
exit 0
32+
fi
33+
- name: Install semver-tool
34+
run: |
35+
export DIR=$(mtemp)
36+
cd $DIR
37+
curl https://github.com/fsaintjacques/semver-tool/archive/3.2.0.tar.gz -L -o semver.tar.gz
38+
tar -xvf semver.tar.gz
39+
sudo cp semver-tool-3.2.0/src/semver /usr/local/bin
40+
- name: Bump version
41+
run: |
42+
export CURRENT=$(nuget list packageid:PusherClient | grep PusherClient | cut -d' ' -f 2)
43+
export NEW_VERSION=$(semver bump ${{ env.RELEASE }} $CURRENT)
44+
echo "VERSION=$NEW_VERSION" >> $GITHUB_ENV
45+
- name: Checkout code
46+
uses: actions/checkout@v2
47+
- name: Setup git
48+
run: |
49+
git config user.email "[email protected]"
50+
git config user.name "Pusher CI"
51+
git fetch
52+
git checkout ${{ github.event.pull_request.head.ref }}
53+
- name: Prepare package
54+
run: |
55+
sed -i 's/<Version>[^<]*<\/Version>/<Version>${{ env.VERSION }}<\/Version>/' Root.Build.props
56+
- name: Prepare CHANGELOG
57+
run: |
58+
echo "${{ github.event.pull_request.body }}" | csplit -s - "/##/"
59+
echo "# Changelog
60+
61+
## ${{ env.VERSION }}" >> CHANGELOG.tmp
62+
grep "^*" xx01 >> CHANGELOG.tmp
63+
grep -v "^# " CHANGELOG.md >> CHANGELOG.tmp
64+
cp CHANGELOG.tmp CHANGELOG.md
65+
git add Root.Build.props CHANGELOG.md
66+
git commit -m "Bump to version ${{ env.VERSION }}"
67+
- name: Push
68+
run: git push
69+

.gitignore

+45-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,50 @@
1+
# Visual Studio Code
2+
.vscode
3+
4+
# Rider
5+
.idea
6+
7+
# User-specific files
8+
*.suo
9+
*.user
10+
*.userosscache
11+
*.sln.docstates
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
build/
21+
bld/
22+
[Bb]in/
23+
[Oo]bj/
24+
[Oo]ut/
25+
msbuild.log
26+
msbuild.err
27+
msbuild.wrn
28+
29+
# Visual Studio
30+
.vs/
31+
TestResults/
32+
*.testsettings
33+
*.vsmdi
34+
35+
# Secrets file
36+
AppConfig.test.json
37+
38+
# Custom
139
_ReSharper.*/
40+
packages/
41+
nupkg/
242
_UpgradeReport_Files
343
UpgradeLog.XML
444
Backup
545
Download
6-
[Bb]in
7-
[Oo]bj
8-
*.suo
9-
*.user
10-
PusherRESTDotNet/PusherRESTDotNet.1.0.nupkg
11-
packages/
12-
PusherRESTDotNet.sln.docstates
13-
build
14-
*.testsettings
15-
*.vsmdi
16-
msbuild.log
46+
*.swp
47+
*.*~
48+
project.lock.json
49+
.DS_Store
50+
*.pyc

.travis.yml

-16
This file was deleted.

AppConfig.sample.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"AppId": "",
3+
"AppKey": "",
4+
"AppSecret": "",
5+
"Cluster": "mt1",
6+
"Encrypted": true
7+
}

AuthHost/App.config

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
<configuration>
33
<appSettings>
44
<add key="Port" value="8888" />
5-
<add key="PusherApplicationID" value="" />
6-
<add key="PusherApplicationKey" value="" />
7-
<add key="PusherApplicationSecret" value="" />
85
</appSettings>
96
<startup>
107
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />

0 commit comments

Comments
 (0)