Skip to content

Commit 32c37e1

Browse files
feat: java sdk resolve dependabot prs (#167)
* chore(deps): bump actions/checkout from 3.2.0 to 5.0.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@755da8c...08c6903) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> fix: github workflow * chore(deps): bump JamesIves/github-pages-deploy-action Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.4.1 to 4.7.3. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](JamesIves/github-pages-deploy-action@ba14867...6c2d9db) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 754f414 commit 32c37e1

11 files changed

Lines changed: 68 additions & 26 deletions

File tree

.buddy/cd.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
- "echo \"SDK version: ${SDK_VERSION}\""
2222
- ""
2323
- "# Only proceed if on master branch"
24-
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
25-
- "if [ \"${CURRENT_BRANCH}\" != \"master\" ]; then"
26-
- " echo \"Not on master branch. Current branch: ${CURRENT_BRANCH}\""
24+
- "if [ \"${BUDDY_RUN_BRANCH}\" != \"master\" ]; then"
25+
- " echo \"Not on master branch. Current branch: ${BUDDY_RUN_BRANCH}\""
2726
- ' echo "Skipping deployment."'
2827
- ' exit 0'
2928
- fi

.buddy/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- export MOZ_HEADLESS=1
2020
- export MOZ_NO_REMOTE=1
2121
- "export PATH=${HOME}/firefox-latest/firefox:$PATH"
22+
- "export FIREFOX_BINARY_PATH=${HOME}/firefox-latest/firefox/firefox"
2223
- firefox --version
2324
- firefox &
2425
- ""
@@ -101,9 +102,9 @@
101102
- "tar -xJf /tmp/firefox-latest.tar.xz -C ${HOME}/firefox-latest"
102103
- ""
103104
- "# Download Geckodriver"
104-
- wget -O /tmp/geckodriver.tar.xz 'https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz'
105+
- wget -O /tmp/geckodriver.tar.gz 'https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz'
105106
- "mkdir -p ${HOME}/geckodriver"
106-
- "tar -xzf /tmp/geckodriver.tar.xz -C ${HOME}/geckodriver"
107+
- "tar -xzf /tmp/geckodriver.tar.gz -C ${HOME}/geckodriver"
107108
services:
108109
- type: SELENIUM_FIREFOX
109110
connection:

.github/workflows/javadocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
17+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
1818

1919
- name: Set up JDK
20-
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b
20+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
2121
with:
2222
distribution: 'temurin'
2323
java-version: '11'
@@ -27,6 +27,6 @@ jobs:
2727
run: ./gradlew javadoc
2828

2929
- name: Publish to GitHub Pages
30-
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6
30+
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8
3131
with:
3232
folder: docs

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ The recommended method for obtaining the SDK is via Gradle or Maven through the
1010

1111
### Gradle
1212
```groovy
13-
compile "com.smartcar.sdk:java-sdk:4.7.3"
13+
compile "com.smartcar.sdk:java-sdk:4.5.3"
1414
```
1515

1616
### Maven
1717
```xml
1818
<dependency>
1919
<groupId>com.smartcar.sdk</groupId>
2020
<artifactId>java-sdk</artifactId>
21-
<version>4.7.3</version>
21+
<version>4.5.3</version>
2222
</dependency>
2323
```
2424

2525
### Jar Direct Download
26-
* [java-sdk-4.7.3.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.7.3/java-sdk-4.7.3.jar)
27-
* [java-sdk-4.7.3-sources.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.7.3/java-sdk-4.7.3-sources.jar)
28-
* [java-sdk-4.7.3-javadoc.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.7.3/java-sdk-4.7.3-javadoc.jar)
26+
* [java-sdk-4.5.3.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.5.3/java-sdk-4.5.3.jar)
27+
* [java-sdk-4.5.3-sources.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.5.3/java-sdk-4.5.3-sources.jar)
28+
* [java-sdk-4.5.3-javadoc.jar](https://repo1.maven.org/maven2/com/smartcar/sdk/java-sdk/4.5.3/java-sdk-4.5.3-javadoc.jar)
2929

30-
Signatures and other downloads available at [Maven Central](https://central.sonatype.com/artifact/com.smartcar.sdk/java-sdk/4.7.3).
30+
Signatures and other downloads available at [Maven Central](https://central.sonatype.com/artifact/com.smartcar.sdk/java-sdk/4.5.3).
3131

3232
## Usage
3333

@@ -136,7 +136,7 @@ In accordance with the Semantic Versioning specification, the addition of suppor
136136
[ci-url]: https://travis-ci.com/smartcar/java-sdk
137137
[coverage-image]: https://codecov.io/gh/smartcar/java-sdk/branch/master/graph/badge.svg?token=nZAITx7w3X
138138
[coverage-url]: https://codecov.io/gh/smartcar/java-sdk
139-
[javadoc-image]: https://img.shields.io/badge/javadoc-4.7.3-brightgreen.svg
139+
[javadoc-image]: https://img.shields.io/badge/javadoc-4.5.3-brightgreen.svg
140140
[javadoc-url]: https://smartcar.github.io/java-sdk
141141
[maven-image]: https://img.shields.io/maven-central/v/com.smartcar.sdk/java-sdk.svg?label=Maven%20Central
142142
[maven-url]: https://central.sonatype.com/artifact/com.smartcar.sdk/java-sdk

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55

66
id 'com.adarshr.test-logger' version '2.1.1'
77
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
8-
id 'org.unbroken-dome.test-sets' version '3.0.1'
8+
id 'org.unbroken-dome.test-sets' version '4.0.0'
99
}
1010

1111
apply plugin: 'jacoco'
@@ -52,13 +52,13 @@ dependencies {
5252
implementation 'org.apache.commons:commons-text:1.2'
5353
implementation 'javax.json:javax.json-api:1.0' // Java EE interfaces
5454
runtimeOnly 'org.glassfish:javax.json:1.1' // implementation for above interfaces
55-
compile 'commons-codec:commons-codec:1.10'
55+
implementation 'commons-codec:commons-codec:1.10'
5656

5757
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
5858
testImplementation 'org.powermock:powermock-release-with-testng-mockito-dependencies:1.6.2'
5959
testImplementation 'org.testng:testng:7.4.0'
6060

61-
integrationImplementation 'org.seleniumhq.selenium:selenium-java:3.13.0'
61+
integrationImplementation 'org.seleniumhq.selenium:selenium-java:4.11.0'
6262
}
6363

6464
/**

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
libGroup=com.smartcar.sdk
22
libName=java-sdk
3-
libVersion=4.7.3
3+
libVersion=4.5.3
44
libDescription=Smartcar Java SDK
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/integration/java/com/smartcar/sdk/AuthTest.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ public void beforeSuite() throws Exception {
1919
}
2020

2121
@Test
22-
public void testExchangeCode() throws SmartcarException {
22+
public void testExchangeCode() throws SmartcarException, InterruptedException {
2323
String code = AuthHelpers.runAuthFlow(this.authorizeUrl);
24+
// Add delay to prevent rate limiting
25+
Thread.sleep(5000);
2426
Auth access = client.exchangeCode(code);
2527

2628
assertNotNull(access.getAccessToken());
@@ -30,9 +32,13 @@ public void testExchangeCode() throws SmartcarException {
3032
}
3133

3234
@Test
33-
public void testExchangeRefreshToken() throws SmartcarException {
35+
public void testExchangeRefreshToken() throws SmartcarException, InterruptedException {
3436
String code = AuthHelpers.runAuthFlow(this.authorizeUrl);
37+
// Add delay to prevent rate limiting
38+
Thread.sleep(5000);
3539
Auth oldAccess = client.exchangeCode(code);
40+
// Add delay between token exchange calls
41+
Thread.sleep(5000);
3642
Auth newAccess = client.exchangeRefreshToken(oldAccess.getRefreshToken());
3743

3844
assertNotNull(newAccess.getAccessToken());
@@ -42,7 +48,9 @@ public void testExchangeRefreshToken() throws SmartcarException {
4248
}
4349

4450
@Test
45-
public void testOAuthError() {
51+
public void testOAuthError() throws InterruptedException {
52+
// Add delay to prevent rate limiting
53+
Thread.sleep(5000);
4654
boolean thrown = false;
4755
try {
4856
client.exchangeCode("bad code here");

src/integration/java/com/smartcar/sdk/SmartcarTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public void beforeSuite() throws Exception {
2424
this.client = AuthHelpers.getConfiguredAuthClientBuilder().build();
2525
this.authorizeUrl = client.authUrlBuilder(new String[]{"read_vehicle_info"}).build();
2626
String code = AuthHelpers.runAuthFlow(client.authUrlBuilder(this.scope).build());
27+
// Add delay to prevent rate limiting
28+
Thread.sleep(5000);
2729
this.accessToken = client.exchangeCode(code).getAccessToken();
2830
VehicleIds vehicleIds = Smartcar.getVehicles(this.accessToken);
2931
this.vehicleIds = vehicleIds;

src/integration/java/com/smartcar/sdk/VehicleIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public class VehicleIntegrationTest {
2626
private Vehicle getVehicle(String make, String[] scope) throws Exception {
2727
AuthClient client = AuthHelpers.getConfiguredAuthClientBuilder().build();
2828
String code = AuthHelpers.runAuthFlow(client.authUrlBuilder(scope).build(), make);
29+
// Add delay to prevent rate limiting
30+
Thread.sleep(5000);
2931
String accessToken = client.exchangeCode(code).getAccessToken();
3032
String[] vehiclesIds = Smartcar.getVehicles(accessToken).getVehicleIds();
3133
return new Vehicle(vehiclesIds[0], accessToken);

0 commit comments

Comments
 (0)