-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #784 from commercetools/httpclient-solutioninfos
[DEVX-516] add HttpClient info to UserAgent
- Loading branch information
Showing
39 changed files
with
375 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
4 changes: 3 additions & 1 deletion
4
...-client/src/main/java/com/commercetools/http/apachehttp/ApacheHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...s-apachehttp-client/src/test/java/com/commercetools/http/apachehttp/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.apachehttp; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new ApacheHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isEqualTo("5.4.1"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...tp-client/src/main/java/com/commercetools/http/asynchttp/AsyncHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.asynchttp; | ||
|
||
import io.vrap.rmf.base.client.SolutionInfo; | ||
import io.vrap.rmf.base.client.VersionLoader; | ||
|
||
public class AsyncHttpClientSolutionInfo extends SolutionInfo { | ||
|
||
public AsyncHttpClientSolutionInfo() { | ||
setName("AsyncHttpAsyncClient"); | ||
setVersion(VersionLoader.loadVersionInfo("org.asynchttpclient", "async-http-client", "pom.properties", | ||
"version", this.getClass().getClassLoader())); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ync-http-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.commercetools.http.asynchttp.AsyncHttpClientSolutionInfo |
16 changes: 16 additions & 0 deletions
16
...nc-http-client/src/test/java/com/commercetools/http/asynchttpclient/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
package com.commercetools.http.asynchttpclient; | ||
|
||
import com.commercetools.http.asynchttp.AsyncHttpClientSolutionInfo; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new AsyncHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isEqualTo("2.12.4"); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...et-client/src/main/java/com/commercetools/http/javanet/JavaNetHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.javanet; | ||
|
||
import io.vrap.rmf.base.client.SolutionInfo; | ||
|
||
import org.apache.commons.lang3.SystemUtils; | ||
|
||
public class JavaNetHttpClientSolutionInfo extends SolutionInfo { | ||
|
||
public JavaNetHttpClientSolutionInfo() { | ||
setName("JavaNetHttpClient"); | ||
setVersion(SystemUtils.JAVA_RUNTIME_VERSION); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...-javanet-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.commercetools.http.javanet.JavaNetHttpClientSolutionInfo |
14 changes: 14 additions & 0 deletions
14
...cetools-javanet-client/src/test/java/com/commercetools/http/javanet/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.javanet; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new JavaNetHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isNotEmpty(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...okhttp-client3/src/main/java/com/commercetools/http/okhttp3/OkHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.okhttp3; | ||
|
||
import io.vrap.rmf.base.client.SolutionInfo; | ||
import io.vrap.rmf.base.client.VersionLoader; | ||
|
||
public class OkHttpClientSolutionInfo extends SolutionInfo { | ||
|
||
public OkHttpClientSolutionInfo() { | ||
setName("OkHttpClient"); | ||
setVersion(VersionLoader.loadVersionInfo("com.squareup.okhttp3", "okhttp", "pom.properties", "version", | ||
this.getClass().getClassLoader())); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...-okhttp-client3/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.commercetools.http.okhttp3.OkHttpClientSolutionInfo |
14 changes: 14 additions & 0 deletions
14
...cetools-okhttp-client3/src/test/java/com/commercetools/http/okhttp3/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.okhttp3; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new OkHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isEqualTo("3.14.9"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...okhttp-client4/src/main/java/com/commercetools/http/okhttp4/OkHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.okhttp4; | ||
|
||
import io.vrap.rmf.base.client.SolutionInfo; | ||
|
||
import okhttp3.OkHttp; | ||
|
||
public class OkHttpClientSolutionInfo extends SolutionInfo { | ||
|
||
public OkHttpClientSolutionInfo() { | ||
setName("OkHttpClient"); | ||
setVersion(OkHttp.VERSION); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...-okhttp-client4/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.commercetools.http.okhttp4.OkHttpClientSolutionInfo |
14 changes: 14 additions & 0 deletions
14
...cetools-okhttp-client4/src/test/java/com/commercetools/http/okhttp4/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.okhttp4; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new OkHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isEqualTo("4.12.0"); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...rnetty-client/src/main/java/com/commercetools/http/netty/NettyHttpClientSolutionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.netty; | ||
|
||
import io.vrap.rmf.base.client.SolutionInfo; | ||
|
||
import reactor.netty.http.client.HttpClient; | ||
|
||
public class NettyHttpClientSolutionInfo extends SolutionInfo { | ||
|
||
public NettyHttpClientSolutionInfo() { | ||
setName("NettyHttpClient"); | ||
setVersion(HttpClient.class.getPackage().getImplementationVersion()); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...tornetty-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.commercetools.http.netty.NettyHttpClientSolutionInfo |
14 changes: 14 additions & 0 deletions
14
...ools-reactornetty-client/src/test/java/com/commercetools/http/netty/SolutionInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package com.commercetools.http.netty; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SolutionInfoTest { | ||
@Test | ||
public void version() { | ||
String version = new NettyHttpClientSolutionInfo().getVersion(); | ||
|
||
Assertions.assertThat(version).isEqualTo("1.2.1"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.