Skip to content

Commit

Permalink
URI bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Paula Gearon committed Jan 8, 2021
1 parent 124767d commit 9b6cf6d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [1.2.9] - 2021-01-07
### Fixed
- Auto generated connection URIs were malformed, and have been fixed.

## [1.2.8] - 2020-12-14
### Changed
- Updated to Zuko 0.3.3 for performance improvement in loading entities.
Expand Down Expand Up @@ -89,7 +93,8 @@
### Added
- Introduced Update Annotations

[Unreleased]: https://github.com/threatgrid/asami/compare/1.2.8...HEAD
[Unreleased]: https://github.com/threatgrid/asami/compare/1.2.9...HEAD
[1.2.9]: https://github.com/threatgrid/asami/compare/1.2.8...1.2.9
[1.2.8]: https://github.com/threatgrid/asami/compare/1.2.7...1.2.8
[1.2.7]: https://github.com/threatgrid/asami/compare/1.2.6...1.2.7
[1.2.6]: https://github.com/threatgrid/asami/compare/1.2.5...1.2.6
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Asami can be made available to clojure by adding the following to a `deps.edn` f
```clojure
{
:deps {
org.clojars.quoll/asami {:mvn/version "1.2.8"}
org.clojars.quoll/asami {:mvn/version "1.2.9"}
}
}
```
Expand All @@ -37,7 +37,7 @@ This makes Asami available to a repl that is launched with the `clj` or `clojure

Alternatively, Asami can be added for the Leiningen build tool by adding this to the `:dependencies` section of the `project.clj` file:
```clojure
[org.clojars.quoll/asami "1.2.8"]
[org.clojars.quoll/asami "1.2.9"]
```

### Running
Expand Down Expand Up @@ -270,7 +270,7 @@ If functions are provided to Loom, then they can be used to provide labels for c

## License

Copyright © 2016-2020 Cisco
Copyright © 2016-2021 Cisco

Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.clojars.quoll/asami "1.2.8"
(defproject org.clojars.quoll/asami "1.2.9"
:description "An in memory graph store for Clojure and ClojureScript"
:url "http://github.com/threatgrid/asami"
:license {:name "Eclipse Public License"
Expand Down
5 changes: 3 additions & 2 deletions src/asami/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
uri
(if-let [[_ db-type db-name] (re-find #"asami:([^:]+)://(.+)" uri)]
{:type db-type
:name db-name})))
:name db-name}
(throw (ex-info (str "Invalid URI: " uri) {:uri uri})))))

(defn- connection-for
"Creates a connection for a URI"
Expand Down Expand Up @@ -84,7 +85,7 @@
"Creates a Database/Connection around an existing Graph.
graph: The graph or graph wrapper to build a database around.
uri: The uri of the database."
([graph :- Graphable] (as-connection graph (name (gensym "asami:mem/internal"))))
([graph :- Graphable] (as-connection graph (str (gensym "asami:mem://internal"))))
([graph :- Graphable
uri :- s/Str]
(let [{:keys [name]} (parse-uri uri)
Expand Down

0 comments on commit 9b6cf6d

Please sign in to comment.