Skip to content

Commit 01450c5

Browse files
Manu ChaudharyManu Chaudhary
authored andcommitted
updated test case and readme
1 parent 20390d3 commit 01450c5

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Table of contents -
2020

2121
## Installation
2222

23-
## For Gradle:
24-
Step 1. Add it in your root `build.gradle` at the end of repositories:
23+
### Requirements
24+
25+
- Java 1.8 or later
26+
27+
### Gradle users
28+
Step 1. Add the JitPack repository to your build file
2529
```
2630
allprojects {
2731
repositories {
@@ -33,33 +37,31 @@ allprojects {
3337
Step 2. Add the dependency on project's `build.gradle`:
3438
```
3539
dependencies {
36-
implementation 'com.github.imagekit-developer:imagekit-java:v1.0.0'
40+
implementation 'com.github.imagekit-developer:imagekit-java:1.0.0'
3741
}
3842
```
39-
### For Maven:
40-
Step 1. Add the JitPack repository to your build file:
43+
### Maven users
44+
Step 1. Add the JitPack repository to your build file
4145
```
4246
<repositories>
43-
<repository>
44-
<id>jitpack.io</id>
45-
<url>https://jitpack.io</url>
46-
</repository>
47+
<repository>
48+
<id>jitpack.io</id>
49+
<url>https://jitpack.io</url>
50+
</repository>
4751
</repositories>
4852
```
4953
Step 2. Add the dependency in POM file:
5054
```
5155
<dependency>
5256
<groupId>com.github.imagekit-developer</groupId>
5357
<artifactId>imagekit-java</artifactId>
54-
<version>v1.0.0</version>
58+
<version>1.0.0</version>
5559
</dependency>
5660
```
5761

58-
59-
6062
## Initialization
6163

62-
Step 1. Create a `config.properties` file inside `src/main/resources` of your project. And put essential values of keys [UrlEndpoint, PrivateKey, PublicKey], no need to use any quote(',") in values.
64+
Step 1. Create a `config.properties` file inside `src/main/resources` of your project. And put essential values of keys [UrlEndpoint, PrivateKey, PublicKey], no need to use quote(`'` or `"`) in values.
6365

6466
```editorconfig
6567
# Put essential values of keys [UrlEndpoint, PrivateKey, PublicKey]

imagekit-sdk/src/test/java/io/imagekit/sdk/tasks/UrlGenTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,12 @@ public void signUrl_tests_expire_zero() {
2121
assertThat("41b3075c40bc84147eb71b8b49ae7fbf349d0f00",is(signature));
2222

2323
}
24+
25+
@Test
26+
public void signUrl_tests_without_slash_expire_zero() {
27+
String url="https://test-domain.com/test-endpoint/tr:w-100/test-signed-url.png";
28+
String signature = UrlGen.signUrl("private_key_test", url, "https://test-domain.com/test-endpoint", 0);
29+
assertThat("41b3075c40bc84147eb71b8b49ae7fbf349d0f00",is(signature));
30+
31+
}
2432
}

0 commit comments

Comments
 (0)