Skip to content

Commit

Permalink
Docs and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Jul 7, 2023
1 parent 680a899 commit d23d4a5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
# run: rebar3 ct -c
- name: Run Unit Tests
run: rebar3 as test lfe ltest -tall
- name: Test Coverage
run: rebar3 as test do proper -c, cover -v --min_coverage=0
# - name: Test Coverage
# run: rebar3 as test do proper -c, cover -v --min_coverage=0

older-builds:
name: Old Erlang ${{ matrix.otp_version }} build
Expand Down Expand Up @@ -69,5 +69,5 @@ jobs:
# run: rebar3 ct -c
- name: Run Unit Tests
run: rebar3 as test lfe ltest -tall
- name: Test Coverage
run: rebar3 as test do proper -c, cover -v --min_coverage=0
# - name: Test Coverage
# run: rebar3 as test do proper -c, cover -v --min_coverage=0
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@

## About [↟](#table-of-contents)

TBD
This library is serves a handful of purposes:

* provides additional parsing of URI data on top of what the Erlang `uri_string` library already does;
* does conversions for bytestring URIs
* provides a URI encode function
* wraps some basic `uri_string` functions (like `parse` and `quote`) for convenience

## Build [↟](#table-of-contents)

```shell
rebar3 lfe compile
```

# Start the Project REPL [↟](#table-of-contents)

```shell
rebar3 lfe repl
```

# Tests [↟](#table-of-contents)

```shell
rebar3 as test lfe test
rebar3 as test ltest
```

## Usage [↟](#table-of-contents)
Expand Down
20 changes: 15 additions & 5 deletions src/yuri.lfe
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
(defmodule yuri
(export
(encode 1) (encode 2)
(parse 1)))
(encode 1) (encode 2))
(export
(parse 1)
(quote 1) (quote 2)))

;;; uri_string library wrappers

(defun parse (uri)
(uri_string:parse uri))

(defun quote (uri)
(uri_string:quote uri))

(defun quote (uri safe)
(uri_string:quote uri safe))

;; Code for this was converted from Erlang written by Renato Albano, CapnKernul
;; (Github user), erlangexamples.com, and the erlang docs for the edoc lib.
Expand All @@ -19,9 +32,6 @@
((chars _)
(encode-string chars)))

(defun parse (uri)
(uri_string:parse uri))

;;; Private functions

(defun encode-binary (data)
Expand Down

0 comments on commit d23d4a5

Please sign in to comment.