Skip to content

Commit bbd3146

Browse files
committed
Version Bump
1 parent cf19576 commit bbd3146

File tree

198 files changed

+1816
-1076
lines changed

Some content is hidden

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

198 files changed

+1816
-1076
lines changed

constructorio-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>io.constructor.client</groupId>
55
<artifactId>constructorio-client</artifactId>
66
<packaging>jar</packaging>
7-
<version>7.0.0</version>
7+
<version>7.0.1</version>
88
<name>constructorio-client</name>
99
<url>https://github.com/Constructor-io/constructorio-java</url>
1010
<dependencies>

constructorio-client/src/main/java/io/constructor/client/ConstructorIO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ protected static String getResponseBody(Response response) throws ConstructorExc
20372037
* @return version number
20382038
*/
20392039
protected String getVersion() {
2040-
return "ciojava-7.0.0";
2040+
return "ciojava-7.0.1";
20412041
}
20422042

20432043
/**

constructorio-client/src/test/java/io/constructor/client/ConstructorIOAutocompleteUrlEncodingTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ public void AutocompleteWithPlusShouldBeEncodedInUrl() throws Exception {
3636
mockServer.enqueue(mockResponse);
3737

3838
ConstructorIO constructor =
39-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
39+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
4040
AutocompleteRequest request = new AutocompleteRequest("r+co");
4141
constructor.autocomplete(request, null);
4242

4343
RecordedRequest recordedRequest = mockServer.takeRequest();
4444
String expectedPath =
45-
String.format("/autocomplete/r%%2Bco?key=%s&c=ciojava-7.0.0", apiKey);
45+
String.format("/autocomplete/r%%2Bco?key=%s&c=ciojava-7.0.1", apiKey);
4646
String actualPath = recordedRequest.getPath();
4747
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
4848
}
@@ -54,13 +54,13 @@ public void AutocompleteWithSpaceShouldBeEncodedInUrl() throws Exception {
5454
mockServer.enqueue(mockResponse);
5555

5656
ConstructorIO constructor =
57-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
57+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
5858
AutocompleteRequest request = new AutocompleteRequest("r co");
5959
constructor.autocomplete(request, null);
6060

6161
RecordedRequest recordedRequest = mockServer.takeRequest();
6262
String expectedPath =
63-
String.format("/autocomplete/r%%20co?key=%s&c=ciojava-7.0.0", apiKey);
63+
String.format("/autocomplete/r%%20co?key=%s&c=ciojava-7.0.1", apiKey);
6464
String actualPath = recordedRequest.getPath();
6565
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
6666
}
@@ -72,13 +72,13 @@ public void AutocompleteWithSlashShouldBeEncodedInUrl() throws Exception {
7272
mockServer.enqueue(mockResponse);
7373

7474
ConstructorIO constructor =
75-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
75+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
7676
AutocompleteRequest request = new AutocompleteRequest("r/co");
7777
constructor.autocomplete(request, null);
7878

7979
RecordedRequest recordedRequest = mockServer.takeRequest();
8080
String expectedPath =
81-
String.format("/autocomplete/r%%2Fco?key=%s&c=ciojava-7.0.0", apiKey);
81+
String.format("/autocomplete/r%%2Fco?key=%s&c=ciojava-7.0.1", apiKey);
8282
String actualPath = recordedRequest.getPath();
8383
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
8484
}
@@ -90,12 +90,12 @@ public void AutocompleteWithSingleQuoteShouldBeAllowedInUrl() throws Exception {
9090
mockServer.enqueue(mockResponse);
9191

9292
ConstructorIO constructor =
93-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
93+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
9494
AutocompleteRequest request = new AutocompleteRequest("r'co");
9595
constructor.autocomplete(request, null);
9696

9797
RecordedRequest recordedRequest = mockServer.takeRequest();
98-
String expectedPath = String.format("/autocomplete/r'co?key=%s&c=ciojava-7.0.0", apiKey);
98+
String expectedPath = String.format("/autocomplete/r'co?key=%s&c=ciojava-7.0.1", apiKey);
9999
String actualPath = recordedRequest.getPath();
100100
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
101101
}

constructorio-client/src/test/java/io/constructor/client/ConstructorIOBasicTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void makeUrlShouldReturnAUrl() throws Exception {
143143
HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"));
144144
assertEquals("host is set", url.host(), "ac.cnstrc.com");
145145
assertEquals("protocol is set", url.scheme(), "https");
146-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
146+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
147147
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
148148
}
149149

@@ -160,7 +160,7 @@ public void makeUrlWithBasePathShouldReturnAUrl() throws Exception {
160160
assertEquals("Path is correct", url.encodedPath(), "/123/2345/getitUuuurl");
161161
assertEquals("host is set", url.host(), "ac.cnstrc.com");
162162
assertEquals("protocol is set", url.scheme(), "https");
163-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
163+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
164164
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
165165
}
166166

@@ -179,7 +179,7 @@ public void makeUrlWithBasePathAndUserInfoShouldReturnAUrl() throws Exception {
179179
assertEquals("Path is correct", url.encodedPath(), "/123/2345/getitUuuurl");
180180
assertEquals("host is set", url.host(), "ac.cnstrc.com");
181181
assertEquals("protocol is set", url.scheme(), "https");
182-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
182+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
183183
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
184184
}
185185

@@ -190,7 +190,7 @@ public void makeUrlWithUserIdShouldReturnAUrl() throws Exception {
190190
HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info);
191191
assertEquals("host is set", url.host(), "ac.cnstrc.com");
192192
assertEquals("protocol is set", url.scheme(), "https");
193-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
193+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
194194
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
195195
assertEquals("session id is set", url.queryParameter("s"), "2");
196196
assertEquals("client id is set", url.queryParameter("i"), "sideshow bob");
@@ -205,7 +205,7 @@ public void makeUrlWithUserInfoShouldReturnAUrl() throws Exception {
205205
HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info);
206206
assertEquals("host is set", url.host(), "ac.cnstrc.com");
207207
assertEquals("protocol is set", url.scheme(), "https");
208-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
208+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
209209
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
210210
assertEquals("session id is set", url.queryParameter("s"), "2");
211211
assertEquals("client id is set", url.queryParameter("i"), "sideshow bob");
@@ -220,7 +220,7 @@ public void makeUrlWithUserSegmentsShouldReturnAUrl() throws Exception {
220220
HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info);
221221
assertEquals("host is set", url.host(), "ac.cnstrc.com");
222222
assertEquals("protocol is set", url.scheme(), "https");
223-
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0");
223+
assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.1");
224224
assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey");
225225
assertEquals("session id is set", url.queryParameter("s"), "2");
226226
assertEquals("client id is set", url.queryParameter("i"), "sideshow bob");
@@ -238,7 +238,7 @@ public void verifyShouldReturnTrueWithValidKeyTokenPair() throws Exception {
238238
@Test
239239
public void getVersionShouldReturnClientVersion() throws Exception {
240240
ConstructorIO constructor = new ConstructorIO(token, apiKey, true, null);
241-
assertEquals("grabs version from pom.xml", constructor.getVersion(), "ciojava-7.0.0");
241+
assertEquals("grabs version from pom.xml", constructor.getVersion(), "ciojava-7.0.1");
242242
}
243243

244244
@Test

constructorio-client/src/test/java/io/constructor/client/ConstructorIOBrowseTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ public void BrowseShouldReturnAResultWithNow() throws Exception {
479479

480480
assertTrue("browse results exist", response.getResponse().getResults().size() >= 0);
481481
assertNotNull("now exists", response.getRequest().get("now"));
482+
System.out.println("HELLO");
483+
System.out.println(response.getRequest().get("now"));
482484
assertEquals(now, new DecimalFormat("#").format(response.getRequest().get("now")));
483485
}
484486

constructorio-client/src/test/java/io/constructor/client/ConstructorIOSearchUrlEncodingTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public void SearchWithPlusShouldBeEncodedInUrl() throws Exception {
3636
mockServer.enqueue(mockResponse);
3737

3838
ConstructorIO constructor =
39-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
39+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
4040
SearchRequest request = new SearchRequest("r+co");
4141
constructor.search(request, null);
4242

4343
RecordedRequest recordedRequest = mockServer.takeRequest();
4444
String expectedPath =
4545
String.format(
46-
"/search/r%%2Bco?key=%s&c=ciojava-7.0.0&section=Products&num_results_per_page=30",
46+
"/search/r%%2Bco?key=%s&c=ciojava-7.0.1&section=Products&num_results_per_page=30",
4747
apiKey);
4848
String actualPath = recordedRequest.getPath();
4949
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
@@ -56,14 +56,14 @@ public void SearchWithSpaceShouldBeEncodedInUrl() throws Exception {
5656
mockServer.enqueue(mockResponse);
5757

5858
ConstructorIO constructor =
59-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
59+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
6060
SearchRequest request = new SearchRequest("r co");
6161
constructor.search(request, null);
6262

6363
RecordedRequest recordedRequest = mockServer.takeRequest();
6464
String expectedPath =
6565
String.format(
66-
"/search/r%%20co?key=%s&c=ciojava-7.0.0&section=Products&num_results_per_page=30",
66+
"/search/r%%20co?key=%s&c=ciojava-7.0.1&section=Products&num_results_per_page=30",
6767
apiKey);
6868
String actualPath = recordedRequest.getPath();
6969
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
@@ -76,14 +76,14 @@ public void SearchWithSlashShouldBeEncodedInUrl() throws Exception {
7676
mockServer.enqueue(mockResponse);
7777

7878
ConstructorIO constructor =
79-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
79+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
8080
SearchRequest request = new SearchRequest("r/co");
8181
constructor.search(request, null);
8282

8383
RecordedRequest recordedRequest = mockServer.takeRequest();
8484
String expectedPath =
8585
String.format(
86-
"/search/r%%2Fco?key=%s&c=ciojava-7.0.0&section=Products&num_results_per_page=30",
86+
"/search/r%%2Fco?key=%s&c=ciojava-7.0.1&section=Products&num_results_per_page=30",
8787
apiKey);
8888
String actualPath = recordedRequest.getPath();
8989
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);
@@ -96,14 +96,14 @@ public void SearchWithSingleQuoteShouldBeAllowedInUrl() throws Exception {
9696
mockServer.enqueue(mockResponse);
9797

9898
ConstructorIO constructor =
99-
new ConstructorIO("", apiKey, false, "127.0.0.1", mockServer.getPort());
99+
new ConstructorIO("", apiKey, false, "127.0.1.1", mockServer.getPort());
100100
SearchRequest request = new SearchRequest("r'co");
101101
constructor.search(request, null);
102102

103103
RecordedRequest recordedRequest = mockServer.takeRequest();
104104
String expectedPath =
105105
String.format(
106-
"/search/r'co?key=%s&c=ciojava-7.0.0&section=Products&num_results_per_page=30",
106+
"/search/r'co?key=%s&c=ciojava-7.0.1&section=Products&num_results_per_page=30",
107107
apiKey);
108108
String actualPath = recordedRequest.getPath();
109109
assertEquals("recorded request is encoded correctly", actualPath, expectedPath);

0 commit comments

Comments
 (0)