Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a parsing bug for project-id #33

Merged
merged 2 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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