ask-honeybadger 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +46 -13
- data/lib/ask/honeybadger/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bf6c5d3a01d7ad34fd5a976a9f927c69264da6a08f59cbfeed18301910be668
|
|
4
|
+
data.tar.gz: b36b5150b323c82d0907869536ceb04ef138d0cd511ba7262a7b7f7143b154ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c95ac0e3b959955cc81d1322fda99600faa191036866ad3dce431b232def9562da806864c01404b69bb871b2388be58ce0291f8ae17216a9ac68c2ae1091da3
|
|
7
|
+
data.tar.gz: cbed75aa023d85409605cb4a1035364ec11dbeec88de2ccb26c3ba8d481e16b939cda3cf9f4dc5446fa25c9bceee28611bc8382f92d21fc8c5b85c6dd70d27a6
|
data/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# ask-honeybadger
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/rb/ask-honeybadger)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Honeybadger service context for AI agents in the ask-rb ecosystem. It provides
|
|
6
|
+
an authenticated HTTP client for the Honeybadger Data API, metadata constants
|
|
7
|
+
for system prompts, and a structured error guide for common Honeybadger API
|
|
8
|
+
issues.
|
|
6
9
|
|
|
7
10
|
## Installation
|
|
8
11
|
|
|
@@ -10,27 +13,32 @@ Part of the [ask-rb](https://github.com/ask-rb) ecosystem.
|
|
|
10
13
|
gem "ask-honeybadger"
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
##
|
|
16
|
+
## Quick Start
|
|
14
17
|
|
|
15
18
|
```ruby
|
|
16
19
|
require "ask-honeybadger"
|
|
17
20
|
|
|
18
|
-
#
|
|
19
|
-
|
|
21
|
+
# List all projects
|
|
22
|
+
Ask::Honeybadger.projects
|
|
20
23
|
|
|
21
|
-
#
|
|
22
|
-
faults =
|
|
24
|
+
# Recent faults for a project
|
|
25
|
+
faults = Ask::Honeybadger.recent_faults(project_id: "PROJECT_ID", limit: 10)
|
|
23
26
|
|
|
24
|
-
#
|
|
25
|
-
Ask::Honeybadger.recent_faults(project_id: "PROJECT_ID", limit: 10)
|
|
27
|
+
# Summary counts for a project
|
|
26
28
|
Ask::Honeybadger.fault_summary(project_id: "PROJECT_ID")
|
|
29
|
+
|
|
30
|
+
# A single fault
|
|
27
31
|
Ask::Honeybadger.fault(project_id: "PROJECT_ID", fault_id: 42)
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
# Or use the raw client (base URL: https://app.honeybadger.io/v2)
|
|
34
|
+
client = Ask::Honeybadger.client
|
|
35
|
+
client.get("/v2/projects/PROJECT_ID/faults")
|
|
29
36
|
```
|
|
30
37
|
|
|
31
38
|
## Authentication
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
`Ask::Honeybadger.client` resolves a token via
|
|
41
|
+
`Ask::Auth.resolve(:honeybadger_token)`. Set it in your environment:
|
|
34
42
|
|
|
35
43
|
```bash
|
|
36
44
|
export HONEYBADGER_TOKEN=your_token_here
|
|
@@ -42,11 +50,36 @@ Or add it to `~/.ask/credentials.yml`:
|
|
|
42
50
|
honeybadger_token: your_token_here
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Credentials can also come from Rails credentials, a database, or an OAuth
|
|
54
|
+
provider, depending on your `ask-auth` configuration. The token is sent as
|
|
55
|
+
HTTP Basic auth with the token as the username and a blank password. Get your
|
|
56
|
+
token at [app.honeybadger.io/users/edit](https://app.honeybadger.io/users/edit).
|
|
57
|
+
|
|
58
|
+
## Key entry points
|
|
59
|
+
|
|
60
|
+
- `Ask::Honeybadger.client` - an authenticated Faraday client with base URL
|
|
61
|
+
`https://app.honeybadger.io/v2`. It is wrapped in a proxy that converts
|
|
62
|
+
auth failures into `Ask::Auth::InvalidCredential`.
|
|
63
|
+
- `Ask::Honeybadger.recent_faults(project_id:, limit: 25, **params)` - fetch
|
|
64
|
+
recent faults with optional query params (`q`, `order`, `environment`).
|
|
65
|
+
- `Ask::Honeybadger.fault_summary(project_id:)`, `fault(project_id:, fault_id:)`,
|
|
66
|
+
and `projects` - other convenience helpers.
|
|
67
|
+
- `Ask::Honeybadger::Errors` - structured error knowledge for agents:
|
|
68
|
+
guidance by exception class, HTTP status descriptions, and rate limit info.
|
|
69
|
+
- `Ask::Honeybadger::DESCRIPTION`, `DOCS_URL`, `AUTH_NAME`, `GEM_NAME`, and
|
|
70
|
+
`QUICK_START` - metadata constants for system prompts.
|
|
71
|
+
|
|
72
|
+
## Full documentation
|
|
73
|
+
|
|
74
|
+
The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
|
|
75
|
+
[Services: Honeybadger](https://ask-rb.github.io/ask-docs/services/honeybadger)
|
|
76
|
+
covers ask-honeybadger in depth, including the client, error guide, and
|
|
77
|
+
constants. API reference: https://ask-rb.github.io/ask-docs/reference/api.
|
|
46
78
|
|
|
47
79
|
## Development
|
|
48
80
|
|
|
49
|
-
```
|
|
81
|
+
```
|
|
82
|
+
bundle install
|
|
50
83
|
bundle exec rake test
|
|
51
84
|
```
|
|
52
85
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ask-honeybadger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaka Ruto
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: 0.3.2
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
39
|
+
version: 0.3.2
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: faraday
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
173
|
version: '0'
|
|
174
174
|
requirements: []
|
|
175
|
-
rubygems_version: 4.0.
|
|
175
|
+
rubygems_version: 4.0.18
|
|
176
176
|
specification_version: 4
|
|
177
177
|
summary: Honeybadger — error tracking via the Honeybadger API
|
|
178
178
|
test_files: []
|