Skip to content

Commit

Permalink
Merge pull request #33 from oiiku/master
Browse files Browse the repository at this point in the history
Fix a parsing bug for project-id
  • Loading branch information
martinklepsch committed Nov 2, 2022
2 parents 29fa64e + 6a5fada commit 144c85c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ server.
:some-other-value "foo bar"}})
```

Various interfaces are supported.
Various interfaces are supported.

#### HTTP

Expand Down Expand Up @@ -115,6 +115,11 @@ There are a variety of Clojure libraries for Sentry, a quick, not necessarily up

## Changes

- **1.7.0**
- Bump to Cheshire 5.11.0 (Emil Bengtsson, [#33](https://github.com/sethtrain/raven-clj/pull/33))
- Bump to clj-http-lite to org.clj-commons/clj-http-lite 1.0.13. Note it has switched to clj-commons
- Bump to prone 2021-04-23
- Fix parsing of project id number from sentry.io which caused an integer overflow. It now parses to long instead of integer.
- **1.6.0**
- Bump to Cheshire 5.9.0 (Kevin W. van Rooijen, [#29](https://github.com/sethtrain/raven-clj/pull/29))
- **1.6.0-alpha4**
Expand Down
12 changes: 6 additions & 6 deletions build.boot
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(set-env!
:resource-paths #{"src" "resources"}
:dependencies '[[org.clojure/clojure "1.8.0" :scope "provided"]
[cheshire "5.9.0"]
[org.martinklepsch/clj-http-lite "0.4.1"]
[prone "1.0.1"]
:dependencies '[[org.clojure/clojure "1.11.1" :scope "provided"]
[cheshire "5.11.0"]
[org.clj-commons/clj-http-lite "1.0.13"]
[prone "2021-04-23"]

[adzerk/bootlaces "0.1.13" :scope "test"]
[adzerk/boot-test "1.1.1" :scope "test"]])
[adzerk/bootlaces "0.2.0" :scope "test"]
[adzerk/boot-test "1.2.0" :scope "test"]])

(require '[raven-clj.core :as raven-clj]
'[adzerk.boot-test :refer [test]]
Expand Down
8 changes: 4 additions & 4 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:url "http://github.com/sethtrain/raven-clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1" :scope "provided"]
[cheshire "5.9.0"]
[clj-http-lite "0.3.0"]
[prone "1.0.1"]])
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]
[cheshire "5.11.0"]
[org.clj-commons/clj-http-lite "1.0.13"]
[prone "2021-04-23"]])
2 changes: 1 addition & 1 deletion resources/raven_clj/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
2 changes: 1 addition & 1 deletion src/raven_clj/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
(last)
(string/split #"\?")
(first)
(Integer/parseInt))}))
(parse-long))}))

(defn capture
"Send a message to a Sentry server.
Expand Down
7 changes: 7 additions & 0 deletions test/raven_clj/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
:uri "https://example.com"
:project-id 1})))

(testing "dsn parsing with long"
(is (= (parse-dsn "https://b70a31b3510c4cf793964a185cfe1fd0:b7d80b520139450f903720eb7991bf3d@example.com/99999999999")
{:key "b70a31b3510c4cf793964a185cfe1fd0"
:secret "b7d80b520139450f903720eb7991bf3d"
:uri "https://example.com"
:project-id 99999999999})))

(testing "dsn parsing without secret"
(is (= (parse-dsn "https://b70a31b3510c4cf793964a185cfe1fd0@example.com/1")
{:key "b70a31b3510c4cf793964a185cfe1fd0"
Expand Down

0 comments on commit 144c85c

Please sign in to comment.