ask-honeybadger 0.1.2 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18083370cefeff9d036b53bf1a6ac15ad030817b33f82b823a0967eb530bb811
4
- data.tar.gz: 3353dc3b808a6263ea64f18f0822b26aea7820f736a471db470388ebc551c288
3
+ metadata.gz: e550cb2e8d8a147643add248ac0ec512bfc0a4d577ea25272bde46d45ec19d64
4
+ data.tar.gz: 4fb041a5ab70d6ca3bfa6c0f3aad71d4d40898533ab5268bebd4ee21b17d0fe5
5
5
  SHA512:
6
- metadata.gz: ebc3912e26fcd986856a11715436f0528239843310cd37d1ee5849297a4de16d44b4e2d5859dffbc9829bf11279d96f1793f49943f98425f439f81404409592d
7
- data.tar.gz: f3f4ee0ff4c3833c452d1d579eec626b64f49d5a56816f047059b1da82859f19db1a17a53f0bbc9e405b003fa1bb3a2fd12f6f875bf48f5e5d5e2e563bbb24e9
6
+ metadata.gz: b5edb5e60292789c2b7e4c001bdf231c5426b8688c7c5594b82af1f92f9900c09179b6cf4864f0cc4a8b00c4271dd8e58ae1dca9dd473ff9cf63fd7c5cd123c7
7
+ data.tar.gz: 3d2692037a8c3c32b25ae03303064460cd82453513fad56696b2064b4c7781aeab18c7a088782898bf68a0bb311817f939695c6516a17ebe4cc15308f1beb6f1
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # ask-honeybadger
2
2
 
3
- Honeybadger — error tracking via the Honeybadger API
3
+ [![Gem Version](https://badge.fury.io/rb/ask-honeybadger.svg)](https://badge.fury.io/rb/ask-honeybadger)
4
4
 
5
- Part of the [ask-rb](https://github.com/ask-rb) ecosystem.
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
- ## Usage
16
+ ## Quick Start
14
17
 
15
18
  ```ruby
16
19
  require "ask-honeybadger"
17
20
 
18
- # Get an authenticated client:
19
- client = Ask::Honeybadger.client
21
+ # List all projects
22
+ Ask::Honeybadger.projects
20
23
 
21
- # List faults for a project:
22
- faults = client.get("/v2/projects/PROJECT_ID/faults")
24
+ # Recent faults for a project
25
+ faults = Ask::Honeybadger.recent_faults(project_id: "PROJECT_ID", limit: 10)
23
26
 
24
- # Or use the convenience helpers:
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
- Ask::Honeybadger.projects
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
- Set your Honeybadger API token in the environment:
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
- Get your token at https://app.honeybadger.io/users/edit
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
- ```bash
81
+ ```
82
+ bundle install
50
83
  bundle exec rake test
51
84
  ```
52
85
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Honeybadger
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
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.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '0.1'
18
+ version: 0.11.3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '0.1'
25
+ version: 0.11.3
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ask-auth
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '0.1'
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: '0.1'
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.3
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: []