Skip to content
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

feat: add middleware support #371

Merged
merged 7 commits into from Dec 8, 2021
Merged

feat: add middleware support #371

merged 7 commits into from Dec 8, 2021

Conversation

qingzhuozhen
Copy link
Collaborator

Summary

  • add middleware support
  • add unit tests

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

Sources/Amplitude/Amplitude.m Outdated Show resolved Hide resolved
[client setServerZone:EU];
XCTAssertEqualObjects(kAMPEventLogEuUrl, [client valueForKey:@"serverUrl"]);
}

- (void)testSetServerZoneWithoutUpdateServerUrl {
Amplitude *client = [Amplitude instanceWithName:@"eu_zone_2"];
XCTAssertEqualObjects(kAMPEventLogUrl, [client valueForKey:@"serverUrl"]);
[client initializeApiKey:@"eu_api_ket"];
[client initializeApiKey:@"eu_api_key"];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sources/Amplitude/AMPMiddleware.m Outdated Show resolved Hide resolved
Tests/MiddlewareRunnerTests.m Outdated Show resolved Hide resolved
XCTAssertEqualObjects([event objectForKey:@"device_model"], deviceModel);
}

- (void)testRunWithNotPassMiddleware {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testRunWithoutPassMiddleware?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotPassMiddleware is the name of middleware, trying to test if it stops on further action

@qingzhuozhen qingzhuozhen merged commit 02a0994 into main Dec 8, 2021
@qingzhuozhen qingzhuozhen deleted the middleware-support branch December 8, 2021 00:58
github-actions bot pushed a commit that referenced this pull request Dec 8, 2021
# [8.6.0](v8.5.0...v8.6.0) (2021-12-08)

### Bug Fixes

* Add watchOS scheme for building with Carthage ([#351](#351)) ([4b893a8](4b893a8))

### Features

* add middleware support ([#371](#371)) ([02a0994](02a0994))
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

🎉 This PR is included in version 8.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants