bug_bunny 4.8.1 → 4.9.1
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/CHANGELOG.md +11 -0
- data/CLAUDE.md +13 -7
- data/README.md +5 -3
- data/lib/bug_bunny/consumer.rb +21 -5
- data/lib/bug_bunny/controller.rb +1 -1
- data/lib/bug_bunny/otel.rb +47 -0
- data/lib/bug_bunny/producer.rb +13 -4
- data/lib/bug_bunny/request.rb +14 -2
- data/lib/bug_bunny/version.rb +1 -1
- data/lib/bug_bunny.rb +1 -0
- data/skill/SKILL.md +25 -2
- data/skill/references/client-middleware.md +17 -0
- data/skill/references/consumer.md +25 -7
- data/skills.lock +10 -1
- data/skills.yml +34 -9
- data/spec/integration/consumer_middleware_spec.rb +23 -2
- data/spec/unit/consumer_spec.rb +138 -6
- data/spec/unit/otel_spec.rb +54 -0
- data/spec/unit/producer_spec.rb +187 -0
- data/spec/unit/request_spec.rb +51 -0
- metadata +7 -15
- data/.agents/skills/documentation-writer/SKILL.md +0 -45
- data/.agents/skills/gem-release/SKILL.md +0 -114
- data/.agents/skills/quality-code/SKILL.md +0 -51
- data/.agents/skills/rabbitmq-expert/SKILL.md +0 -1555
- data/.agents/skills/sentry/SKILL.md +0 -135
- data/.agents/skills/sentry/references/api-endpoints.md +0 -147
- data/.agents/skills/sentry/scripts/sentry.rb +0 -194
- data/.agents/skills/skill-builder/SKILL.md +0 -232
- data/.agents/skills/skill-manager/SKILL.md +0 -172
- data/.agents/skills/skill-manager/scripts/sync.rb +0 -310
- data/.agents/skills/yard/SKILL.md +0 -311
- data/.agents/skills/yard/references/tipos.md +0 -144
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# YARD — Catálogo completo de Type Specifications
|
|
2
|
-
|
|
3
|
-
Los tipos se especifican entre corchetes `[Type]` en tags como `@param`, `@return`, `@yield`, etc.
|
|
4
|
-
|
|
5
|
-
## Tipos básicos
|
|
6
|
-
|
|
7
|
-
| Tipo | Descripción |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `String` | Clase Ruby estándar |
|
|
10
|
-
| `Integer` | Clase Ruby estándar |
|
|
11
|
-
| `Float` | Clase Ruby estándar |
|
|
12
|
-
| `Symbol` | Clase Ruby estándar |
|
|
13
|
-
| `Boolean` | Convención YARD: `TrueClass` o `FalseClass` |
|
|
14
|
-
| `nil` | Valor nil literal |
|
|
15
|
-
| `void` | Sin valor de retorno significativo |
|
|
16
|
-
| `self` | Retorna self (métodos encadenables) |
|
|
17
|
-
| `true` | Literal true |
|
|
18
|
-
| `false` | Literal false |
|
|
19
|
-
|
|
20
|
-
## Union types (múltiples tipos)
|
|
21
|
-
|
|
22
|
-
Separados por comas dentro de los corchetes:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
[String, Symbol] → String o Symbol
|
|
26
|
-
[Integer, nil] → Integer o nil
|
|
27
|
-
[String, Symbol, nil] → cualquiera de los tres
|
|
28
|
-
[Boolean, nil] → true, false o nil
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Parametrized types (generics)
|
|
32
|
-
|
|
33
|
-
Sintaxis: `Collection<ElementType>`
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
[Array<String>] → array de strings
|
|
37
|
-
[Array<String, Symbol>] → array de strings y/o symbols
|
|
38
|
-
[Set<Integer>] → set de integers
|
|
39
|
-
[Hash<Symbol, String>] → hash con keys symbol, values string
|
|
40
|
-
[Hash<Symbol, Array<Integer>>] → hash con values que son arrays de integers
|
|
41
|
-
[Enumerator<User>] → enumerator de users
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Hash con estructura explícita
|
|
45
|
-
|
|
46
|
-
Sintaxis: `Hash{KeyType => ValueType}`
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
[Hash{Symbol => String}] → hash con keys symbol, values string
|
|
50
|
-
[Hash{String => Object}] → hash con keys string, values cualquiera
|
|
51
|
-
[Hash{Symbol => Array<String>}] → hash con values que son arrays de strings
|
|
52
|
-
[Hash{String, Symbol => Integer}] → keys string o symbol, values integer
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Duck types
|
|
56
|
-
|
|
57
|
-
Prefijo `#` indica que el objeto responde a ese método:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
[#read] → cualquier objeto con método #read
|
|
61
|
-
[#call] → cualquier callable (Proc, Lambda, etc.)
|
|
62
|
-
[#to_s] → cualquier objeto convertible a string
|
|
63
|
-
[#read, #close] → debe responder a ambos métodos
|
|
64
|
-
[#each] → cualquier enumerable
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Order-dependent lists
|
|
68
|
-
|
|
69
|
-
Sintaxis: `Collection(Type1, Type2, ...)` — exactamente esos tipos en ese orden:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
[Array(String, Integer)] → array de exactamente 2 elementos: [string, integer]
|
|
73
|
-
[Array(String, Integer, Hash)] → array de exactamente 3 elementos en ese orden
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Combinaciones comunes
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
[String, nil] → string nullable
|
|
80
|
-
[Array<String>] → array de strings
|
|
81
|
-
[Hash{Symbol => Object}] → options hash
|
|
82
|
-
[Boolean] → true/false
|
|
83
|
-
[void] → sin retorno
|
|
84
|
-
[self] → chainable
|
|
85
|
-
[#read, #write] → IO-like
|
|
86
|
-
[Integer, Float] → numeric
|
|
87
|
-
[String, Symbol] → string-like identifier
|
|
88
|
-
[Array<Hash{Symbol => String}>] → array de hashes
|
|
89
|
-
[Hash{Symbol => String, nil}] → hash con values nullable
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Patrones por contexto
|
|
93
|
-
|
|
94
|
-
### Métodos de búsqueda
|
|
95
|
-
```ruby
|
|
96
|
-
# @return [User, nil] el usuario o nil si no existe
|
|
97
|
-
def find(id); end
|
|
98
|
-
|
|
99
|
-
# @return [User] el usuario
|
|
100
|
-
# @raise [RecordNotFound] si no existe
|
|
101
|
-
def find!(id); end
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Métodos booleanos
|
|
105
|
-
```ruby
|
|
106
|
-
# @return [Boolean] true si el usuario es admin
|
|
107
|
-
def admin?; end
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Métodos de mutación
|
|
111
|
-
```ruby
|
|
112
|
-
# @return [void]
|
|
113
|
-
def save!; end
|
|
114
|
-
|
|
115
|
-
# @return [self] para encadenar
|
|
116
|
-
def where(conditions); end
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Métodos de colección
|
|
120
|
-
```ruby
|
|
121
|
-
# @return [Array<User>] lista de usuarios
|
|
122
|
-
def all; end
|
|
123
|
-
|
|
124
|
-
# @yield [user] itera sobre cada usuario
|
|
125
|
-
# @yieldparam user [User]
|
|
126
|
-
# @return [Enumerator<User>] si no se pasa bloque
|
|
127
|
-
def each(&block); end
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Métodos con opciones
|
|
131
|
-
```ruby
|
|
132
|
-
# @param opts [Hash{Symbol => Object}] opciones
|
|
133
|
-
# @option opts [Integer] :limit (10) máximo de resultados
|
|
134
|
-
# @option opts [Integer] :offset (0) desde dónde empezar
|
|
135
|
-
# @option opts [Symbol] :order (:asc) dirección del ordenamiento
|
|
136
|
-
def search(query, **opts); end
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Callbacks y Procs
|
|
140
|
-
```ruby
|
|
141
|
-
# @param callback [Proc, #call] bloque a ejecutar
|
|
142
|
-
# @param filter [Proc<User, Boolean>] filtro que recibe user y retorna boolean
|
|
143
|
-
def on_create(callback); end
|
|
144
|
-
```
|