Skip to content

datetime format fix #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Verify tag
run: |
VERSION=$(grep '<Version>' Analytics-CSharp.csproj | sed "s@.*<Version>\(.*\)</Version>.*@\1@")
VERSION=$(grep '<Version>' Analytics-CSharp/Analytics-CSharp.csproj | sed "s@.*<Version>\(.*\)</Version>.*@\1@")
if [ "${{ steps.vars.outputs.tag }}" != "$VERSION" ]; then {
echo "Tag ${{ steps.vars.outputs.tag }} does not match the package version ($VERSION)"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion Analytics-CSharp/Analytics-CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Coroutine.NET" Version="1.0.0" />
<PackageReference Include="Serialization.NET" Version="0.1.0" />
<PackageReference Include="Serialization.NET" Version="1.0.0" />
<PackageReference Include="Sovran.NET" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override void Configure(Analytics analytics)

private void ApplyContextData(RawEvent @event)
{
var context = new JsonObject(@event.context?.content)
var context = new JsonObject(@event.context?.Content)
{
[LibraryKey] = _library
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private async Task Finish()
var file = CurrentFile();
if (!file.Exists) return;

var contents = "],\"sentAt\":\"" + DateTime.UtcNow + "\",\"writeKey\":\"" + _writeKey + "\"}";
var contents = "],\"sentAt\":\"" + DateTime.UtcNow.ToString("o") + "\",\"writeKey\":\"" + _writeKey + "\"}";
await WriteToFile(contents.GetBytes(), file);
_fs.Close();

Expand Down
2 changes: 1 addition & 1 deletion Analytics-CSharp/Segment/Analytics/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace Segment.Analytics
{
internal static class Version
{
internal const string SegmentVersion = "1.2.4";
internal const string SegmentVersion = "1.0.2";
}
}
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Update Version
==========
* update `<Version>` value in `Analytics-CSharp.csproj`
* update `SegmentVersion` value in `Segment/Analytics/Version.cs`

Release to Nuget
==========
Expand Down
16 changes: 8 additions & 8 deletions Tests/EventsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void TestTrackNoProperties()
_analytics.Track(expectedEvent);

Assert.NotEmpty(actual);
Assert.True(actual[0].properties.count == 0);
Assert.True(actual[0].properties.Count == 0);
Assert.Equal(expectedEvent, actual[0].@event);
}

Expand Down Expand Up @@ -103,7 +103,7 @@ public void TestTrackTNoProperties()
_analytics.Track<FooBar>(expectedEvent);

Assert.NotEmpty(actual);
Assert.True(actual[0].properties.count == 0);
Assert.True(actual[0].properties.Count == 0);
Assert.Equal(expectedEvent, actual[0].@event);
}

Expand Down Expand Up @@ -139,7 +139,7 @@ public async Task TestIdentifyNoTraits()
var actualUserId = await _analytics.UserIdAsync();

Assert.NotEmpty(actual);
Assert.True(actual[0].traits.count == 0);
Assert.True(actual[0].traits.Count == 0);
Assert.Equal(expectedUserId, actualUserId);
}

Expand Down Expand Up @@ -192,7 +192,7 @@ public async Task TestIdentifyTNoTraits()
var actualUserId = await _analytics.UserIdAsync();

Assert.NotEmpty(actual);
Assert.True(actual[0].traits.count == 0);
Assert.True(actual[0].traits.Count == 0);
Assert.Equal(expectedUserId, actualUserId);
}

Expand Down Expand Up @@ -244,7 +244,7 @@ public void TestScreenWithNulls()
_analytics.Screen(null, null, null);

Assert.NotEmpty(actual);
Assert.True(actual[0].properties.count == 0);
Assert.True(actual[0].properties.Count == 0);
Assert.Null(actual[0].name);
Assert.Null(actual[0].category);
}
Expand Down Expand Up @@ -277,7 +277,7 @@ public void TestScreenTWithNulls()
_analytics.Screen<FooBar>(null, null, null);

Assert.NotEmpty(actual);
Assert.True(actual[0].properties.count == 0);
Assert.True(actual[0].properties.Count == 0);
Assert.Null(actual[0].name);
Assert.Null(actual[0].category);
}
Expand Down Expand Up @@ -312,7 +312,7 @@ public void TestGroupNoProperties()
_analytics.Group(expectedGroupId);

Assert.NotEmpty(actual);
Assert.True(actual[0].traits.count == 0);
Assert.True(actual[0].traits.Count == 0);
Assert.Equal(expectedGroupId, actual[0].groupId);
}

Expand Down Expand Up @@ -343,7 +343,7 @@ public void TestGroupTNoProperties()
_analytics.Group<FooBar>(expectedGroupId);

Assert.NotEmpty(actual);
Assert.True(actual[0].traits.count == 0);
Assert.True(actual[0].traits.Count == 0);
Assert.Equal(expectedGroupId, actual[0].groupId);
}

Expand Down