Skip to content

Commit

Permalink
...add files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vict0rynox committed Jul 14, 2020
1 parent a8c87ab commit 44753eb
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
target
.nrepl-port
.idea
.as
.lein-repl-history
http-test
build.sh
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.PHONY: dev build uberjar deps check-formatting clean test

LEIN ?= lein
EDITOR ?= vim

all: build

dev:
rlwrap $(LEIN) trampoline run

build: uberjar
$(LEIN) native

uberjar:
$(LEIN) uberjar

deps:
$(LEIN) deps

check-formatting:
$(LEIN) cljfmt check

clean:
rm -rf target

test:
$(LEIN) trampoline test
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Http Request Tool

Tools for run [JB Http Request file](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html)

Supported features

- [x] Basic http call
- [ ] Configuration env
- [x] Response handler scripts


## Build

```shell script
export LEIN_JVM_OPTS='-Dpolyglot.js.ecmascript-version=2020'
lein run
```


For build
> Required installed graal-vm native-image
```shell script
make build
```

Clean after install
```shell script
make clean
```

## Run

```shell script
./jb-http-test
```


45 changes: 45 additions & 0 deletions http-test.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<module cursive.leiningen.project.LeiningenProjectsManager.displayName="http-test:0.1.0-SNAPSHOT" cursive.leiningen.project.LeiningenProjectsManager.isLeinModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/target/default/classes" />
<output-test url="file://$MODULE_DIR$/target/default/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/dev-resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/clj" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target/default" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Leiningen: cheshire:5.3.1" level="project" />
<orderEntry type="library" name="Leiningen: clj-radix:0.1.0" level="project" />
<orderEntry type="library" name="Leiningen: clj-time:0.11.0" level="project" />
<orderEntry type="library" name="Leiningen: clojure-complete:0.2.5" level="project" />
<orderEntry type="library" name="Leiningen: com.fasterxml.jackson.core/jackson-core:2.3.1" level="project" />
<orderEntry type="library" name="Leiningen: com.fasterxml.jackson.dataformat/jackson-dataformat-smile:2.3.1" level="project" />
<orderEntry type="library" name="Leiningen: commons-codec:1.6" level="project" />
<orderEntry type="library" name="Leiningen: flames:0.4.0" level="project" />
<orderEntry type="library" name="Leiningen: http-kit:2.3.0" level="project" />
<orderEntry type="library" name="Leiningen: interval-metrics:1.0.0" level="project" />
<orderEntry type="library" name="Leiningen: joda-time:2.8.2" level="project" />
<orderEntry type="library" name="Leiningen: nrepl:0.6.0" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/clojure:1.10.0" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/core.match:1.0.0" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/core.specs.alpha:0.2.44" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/spec.alpha:0.2.176" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/tools.cli:1.0.194" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/tools.logging:0.2.6" level="project" />
<orderEntry type="library" name="Leiningen: org.martinklepsch/clj-http-lite:0.4.3" level="project" />
<orderEntry type="library" name="Leiningen: pjstadig/humane-test-output:0.10.0" level="project" />
<orderEntry type="library" name="Leiningen: primitive-math:0.1.4" level="project" />
<orderEntry type="library" name="Leiningen: riemann-jvm-profiler:0.1.0" level="project" />
<orderEntry type="library" name="Leiningen: ring/ring-codec:1.0.1" level="project" />
<orderEntry type="library" name="Leiningen: ring/ring-core:1.6.3" level="project" />
<orderEntry type="library" name="Leiningen: slingshot:0.12.2" level="project" />
<orderEntry type="library" name="Leiningen: tigris:0.1.1" level="project" />
</component>
</module>
45 changes: 45 additions & 0 deletions project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
(defproject http-test "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "https://www.eclipse.org/legal/epl-2.0/"}
:source-paths #{"src/clj"}
:java-source-paths #{"src/java"}
:test-paths #{"test"}
:resource-paths #{"resources"}
:dependencies [[org.clojure/clojure "1.10.0"]
;; [clj-http "3.10.0"]
;; [cheshire "5.9.0"]

;;http client
;;[aleph "0.4.6"]
[org.martinklepsch/clj-http-lite "0.4.3"]

;;cli-tool
[org.clojure/tools.cli "1.0.194"]

;;match
[org.clojure/core.match "1.0.0"]]
:main http-test.core
:target-path "target/%s"
:aot [http-test.engine.types]

:profiles {:uberjar {:aot :all}
:dev {:plugins [[lein-cljfmt "0.5.4"]
[lein-shell "0.5.0"]]
:cljfmt {:indentation? false
:file-pattern #"\.clj$"
:remove-consecutive-blank-lines? false}
:dependencies [[flames "0.4.0"]
[pjstadig/humane-test-output "0.10.0"]]
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]}}
:aliases {"native" ["shell"
"native-image" "--report-unsupported-elements-at-runtime"
"--initialize-at-build-time"
"--no-server" "-jar" "./target/uberjar//${:uberjar-name:-${:name}-${:version}-standalone.jar}"
"-H:EnableURLProtocols=https"
"-H:EnableURLProtocols=http"
"--language:js"
"-H:ReflectionConfigurationFiles=./resources/reflectconfig.json"
"-H:Name=./${:name}"]})

0 comments on commit 44753eb

Please sign in to comment.