inquiry_attrs 1.0.0 → 1.0.2

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: 615f0028c78433e7cd13171ce70724af8e5c535c9bc3ddac9127b6121cec6cc2
4
- data.tar.gz: 95d371d0ee8d484e6f80b353a62dc49c92d19df63eeb08c35abaccccacb1738f
3
+ metadata.gz: eaef756f9fda05436e3f930b7d0252712fea66dc7818b23b1238b2c098290c77
4
+ data.tar.gz: 61d886c923036fd403a0e2c780a1b45bb03de0f3f44f136a0a9cb44f48ebf7f5
5
5
  SHA512:
6
- metadata.gz: f1327f64dc6cc2aec05aa5ae6b97619ba1bfa95cfe394633c44f7e7ca67a8d2fc4da5cb9cd58c114b234dde4eef3e5db973a35ed19e9678c23befd188b4d4b5b
7
- data.tar.gz: a4ce3e81aab2b778aff6abf4c8532e5ed74765f457b49efc9a90134bf803d94f4396e5a3706875b73fa32159634e816779f4ad973b365f0ea105bc7ecd4bb8e5
6
+ metadata.gz: 38bb6a3e26e701fbcc4e8dbe874f329ff74b245b67e4552566883b5a7520d2feef0d0c170ce5a639fe730792aba01d208a237914e1d23f746be98d8adb302719
7
+ data.tar.gz: 241b76ab67af3f051a12d40113cfaac361294e7b88a254ec12ff93d2b1f8be60309b2fa22c6e69b289d5115ce8dcd0444eb872d8bc964468beb8fe5cd8826e34
data/AGENTS.md CHANGED
@@ -92,6 +92,26 @@ database in `test/test_helper.rb`.
92
92
 
93
93
  ---
94
94
 
95
+ ## Architecture — reserved predicate names
96
+
97
+ Some predicate names are **already defined as real methods** on the returned
98
+ objects. `method_missing` is never reached for them, so calling them does **not**
99
+ test whether the attribute value equals that word.
100
+
101
+ | Predicate | Defined on | What it actually does |
102
+ |---|---|---|
103
+ | `nil?` | Ruby `Object` | `false` for any present value; `true` for `NilInquiry` |
104
+ | `blank?` | ActiveSupport | `true` when value is blank — not when it equals `"blank"` |
105
+ | `present?` | ActiveSupport | Opposite of `blank?` — not when value equals `"present"` |
106
+ | `empty?` | Ruby `String` | `true` only for `""` — not when value equals `"empty"` |
107
+ | `frozen?` | Ruby `Object` | Reflects freeze state of the object |
108
+
109
+ **When generating or reviewing code:** if an attribute's domain values include
110
+ `nil`, `blank`, `present`, `empty`, or `frozen`, flag this and suggest direct
111
+ string comparison (`== 'blank'`) rather than a predicate.
112
+
113
+ ---
114
+
95
115
  ## Architecture — the `instance_method` capture pattern
96
116
 
97
117
  This is the **most important** design decision in `concern.rb`:
@@ -166,9 +186,11 @@ auto-include anything on load — that would be implicit and hard to audit.
166
186
  ### `NilInquiry` (`lib/inquiry_attrs/nil_inquiry.rb`)
167
187
 
168
188
  - Frozen singleton: `NilInquiry::INSTANCE`
169
- - `nil?` → `true`; `blank?` → `true`; `present?` → `false`
189
+ - `nil?` → `true`; `blank?` → `true`; `empty?` → `true`; `present?` → `false`
170
190
  - Any `?`-method → `false` via `method_missing`
171
191
  - `== nil`, `== ""`, `== INSTANCE` → `true`
192
+ - `is_a?(NilClass)`, `kind_of?(NilClass)`, `instance_of?(NilClass)` → `true`
193
+ (`NilClass` cannot be subclassed; methods are overridden explicitly)
172
194
  - Implements `to_s` / `to_str` / `inspect`
173
195
 
174
196
  ### `SymbolInquiry` (`lib/inquiry_attrs/symbol_inquiry.rb`)
@@ -177,7 +199,8 @@ auto-include anything on load — that would be implicit and hard to audit.
177
199
  - Raises `ArgumentError` for non-Symbol; unwraps nested `SymbolInquiry`
178
200
  - `?`-method returns `true` iff `sym.to_s == method_name.delete_suffix('?')`
179
201
  - `==` accepts `Symbol`, `String`, or `SymbolInquiry`
180
- - `is_a?(Symbol)` and `kind_of?(Symbol)` → `true`
202
+ - `is_a?(Symbol)`, `kind_of?(Symbol)`, `instance_of?(Symbol)` → `true`
203
+ (`Symbol` cannot be subclassed; methods are overridden explicitly)
181
204
  - `nil?` → `false`; `blank?` → `false`; `present?` → `true`
182
205
 
183
206
  ### `Concern` (`lib/inquiry_attrs/concern.rb`)
@@ -219,6 +242,7 @@ auto-include anything on load — that would be implicit and hard to audit.
219
242
  | Stub `Rails.root` in tests | Use `Installer.install!(tmpdir)` instead |
220
243
  | Add a dependency on anything outside ActiveSupport/ActiveRecord/Railties | This is a Rails gem; Rails is already the dependency |
221
244
  | Introduce allocation inside the hot path (e.g. `String.new.extend(...)`) | `NilInquiry::INSTANCE` is a frozen singleton for a reason |
245
+ | Suggest `.blank?` / `.nil?` / `.present?` / `.empty?` / `.frozen?` as inquiry predicates for those exact values | These are real methods, not inquiry predicates — they test object state, not string equality. Use `== 'blank'` etc. instead |
222
246
 
223
247
  ---
224
248
 
data/CHANGELOG.md CHANGED
@@ -1,11 +1,106 @@
1
1
  # Changelog
2
2
 
3
+ All notable changes to `inquiry_attrs` are documented in this file.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ---
13
+
14
+ ## [1.0.2] — 2026-02-27
15
+
16
+ ### Added
17
+
18
+ - **`NilInquiry#is_a?` / `#kind_of?` / `#instance_of?`** — all three type-check
19
+ methods now return `true` when called with `NilClass` as the argument.
20
+ `NilClass` cannot be subclassed in Ruby, so the methods are overridden
21
+ explicitly (the same technique already used by `SymbolInquiry` for `Symbol`).
22
+ `is_a?(InquiryAttrs::NilInquiry)` continues to return `true`.
23
+
24
+ - **`SymbolInquiry#kind_of?` / `#instance_of?`** — aliased to the existing
25
+ `is_a?` override so all three type-check methods consistently return `true`
26
+ for `Symbol` and the `SymbolInquiry` class itself.
27
+
28
+ - **README — ⚠️ Reserved predicate names** — new section documenting that
29
+ attribute values whose names match built-in Ruby/Rails `?`-methods (`nil`,
30
+ `blank`, `present`, `empty`, `frozen`) will invoke the real method rather than
31
+ testing string equality, and explaining the safe `== 'value'` alternative.
32
+
33
+ ---
34
+
3
35
  ## [1.0.0] — 2026-02-27
4
36
 
5
37
  ### Added
6
- - `InquiryAttrs::Concern` with `.inquirer(*attrs)` class macro
7
- - `InquiryAttrs::SymbolInquiry` — predicate wrapper for Symbol attributes
8
- - `InquiryAttrs::NilInquiry::INSTANCE` — frozen singleton for blank/nil attributes
9
- - Auto-include into `ActiveRecord::Base` via `ActiveSupport.on_load(:active_record)`
10
- - Support for StoreModel and plain Ruby classes via explicit `include`
11
- - LLM context files in `llms/`
38
+
39
+ #### Core
40
+
41
+ - **`InquiryAttrs::Concern`** `ActiveSupport::Concern` that adds the
42
+ `.inquirer(*attrs)` class macro to any model. Automatically included into
43
+ `ActiveRecord::Base` via the generated initializer; opt-in for StoreModel
44
+ and plain Ruby classes via explicit `include`.
45
+
46
+ - **`InquiryAttrs::NilInquiry`** — frozen singleton (`INSTANCE`) returned when
47
+ an inquired attribute is blank. Every `?`-predicate returns `false`; behaves
48
+ like `nil` in comparisons (`== nil`, `== ""`). Eliminates `NoMethodError` on
49
+ nil attributes.
50
+
51
+ - **`InquiryAttrs::SymbolInquiry`** — `SimpleDelegator` subclass returned when
52
+ an inquired attribute holds a `Symbol`. Predicate methods match against the
53
+ symbol name; compares equal to both `Symbol` and `String`; `is_a?(Symbol)`
54
+ returns `true`.
55
+
56
+ - **Return-type dispatch in `.inquirer`** — blank → `NilInquiry::INSTANCE`,
57
+ Symbol → `SymbolInquiry`, anything else → `ActiveSupport::StringInquirer`
58
+ (standard `"value".inquiry`).
59
+
60
+ - **`instance_method` capture pattern** — the original attribute reader is
61
+ captured with `instance_method(attr)` and called via `bind_call` inside the
62
+ wrapper, so `attr_accessor`, StoreModel, and AR readers all work without
63
+ relying on `super()`.
64
+
65
+ - **`remove_method` before `define_method`** — clears the reader from the
66
+ class's own method table before redefining, silencing Ruby's "method
67
+ redefined" warning that fires when AR/StoreModel define readers via
68
+ `define_method` and `inquirer` overwrites them.
69
+
70
+ #### Install task
71
+
72
+ - **`InquiryAttrs::Installer`** — pure Ruby class with `install!(rails_root)`
73
+ and `uninstall!(rails_root)` class methods. Accepts `Pathname` or `String`.
74
+ Returns `:created` / `:skipped` / `:removed` symbols. Testable without Rails
75
+ or Rake by passing a `Dir.mktmpdir` path.
76
+
77
+ - **`InquiryAttrs::Railtie`** — loaded when `Rails::Railtie` is defined;
78
+ exposes `rails inquiry_attrs:install` and `rails inquiry_attrs:uninstall` to
79
+ the host application via `rake_tasks { load ... }`.
80
+
81
+ - **`rails inquiry_attrs:install`** — writes
82
+ `config/initializers/inquiry_attrs.rb` containing the
83
+ `ActiveSupport.on_load(:active_record)` block. Skips silently if the file
84
+ already exists.
85
+
86
+ - **`rails inquiry_attrs:uninstall`** — removes the generated initializer.
87
+ Skips silently if the file is absent.
88
+
89
+ #### Developer experience
90
+
91
+ - **`Rakefile`** — `bundle exec rake` / `bundle exec rake test` runs the full
92
+ Minitest suite.
93
+
94
+ - **LLM context** — `AGENTS.md`, `CLAUDE.md`, `llms/overview.md`,
95
+ `llms/usage.md` shipped inside the gem for AI-assisted development.
96
+
97
+ ### Compatibility
98
+
99
+ - Ruby ≥ 3.0
100
+ - Rails 7.x and 8.x (`activesupport`, `activerecord`, `railties` — `>= 7.0, < 9`)
101
+
102
+ ---
103
+
104
+ [Unreleased]: https://github.com/pniemczyk/inquiry_attrs/compare/v1.0.2...HEAD
105
+ [1.0.2]: https://github.com/pniemczyk/inquiry_attrs/compare/v1.0.0...v1.0.2
106
+ [1.0.0]: https://github.com/pniemczyk/inquiry_attrs/releases/tag/v1.0.0
data/CLAUDE.md CHANGED
@@ -110,3 +110,28 @@ gem build inquiry_attrs.gemspec
110
110
  - **Never** call `inquirer` before `attr_accessor` in plain Ruby classes
111
111
  - **Never** broaden the `rescue` in `concern.rb`
112
112
  - **Never** stub `Rails.root` in tests — use `Installer.install!(tmpdir)` instead
113
+
114
+ ---
115
+
116
+ ## Reserved predicate names — gotcha
117
+
118
+ Some predicate names are **real methods** on the objects `inquiry_attrs` returns.
119
+ They are **never** handled by `method_missing` and do **not** test string equality.
120
+
121
+ | Predicate | Actual behaviour |
122
+ |---|---|
123
+ | `.nil?` | Always `false` for present values; always `true` for blank (`NilInquiry`) |
124
+ | `.blank?` | Tests blankness (nil / "" / whitespace) — not `value == "blank"` |
125
+ | `.present?` | Opposite of `blank?` — not `value == "present"` |
126
+ | `.empty?` | `true` only for `""` — not `value == "empty"` |
127
+ | `.frozen?` | Reflects the object's freeze state |
128
+
129
+ **When writing or reviewing code:** if a domain value matches one of the names
130
+ above, use direct comparison instead:
131
+
132
+ ```ruby
133
+ record.state == 'blank' # ✅ correct
134
+ record.state.blank? # ❌ tests blankness, not state == "blank"
135
+ ```
136
+
137
+ See `README.md` → "⚠️ Reserved predicate names" for the full worked example.
data/README.md CHANGED
@@ -34,6 +34,13 @@ gem 'inquiry_attrs'
34
34
 
35
35
  ### ActiveRecord — zero configuration
36
36
 
37
+ Use rake task to install or uninstall the initializer:
38
+
39
+ ```bash
40
+ rails inquiry_attrs:install # Install an initializer that auto-includes InquiryAttrs::Concern into ActiveRecord
41
+ rails inquiry_attrs:uninstall # Remove the inquiry_attrs initializer
42
+ ```
43
+
37
44
  `inquiry_attrs` auto-includes itself into every `ActiveRecord::Base` subclass
38
45
  via `ActiveSupport.on_load(:active_record)`. Just call `.inquirer` in any model:
39
46
 
@@ -114,6 +121,52 @@ sub.state.nil? # => true
114
121
 
115
122
  ---
116
123
 
124
+ ## ⚠️ Reserved predicate names
125
+
126
+ Some predicate names are **already defined as real methods** on the objects
127
+ `inquiry_attrs` returns. Calling them does **not** test whether the attribute
128
+ value equals that word — the existing method is called instead and
129
+ `method_missing` is never reached.
130
+
131
+ | Value / predicate | Already defined by | What it actually tests |
132
+ |---|---|---|
133
+ | `"nil"` / `.nil?` | Ruby `Object#nil?` | Whether the object is `nil` — always `false` for present strings, always `true` for blank values |
134
+ | `"blank"` / `.blank?` | ActiveSupport `Object#blank?` | Whether the value is blank (`nil`, `""`, whitespace) — **not** whether it equals `"blank"` |
135
+ | `"present"` / `.present?` | ActiveSupport `Object#present?` | Opposite of `blank?` — **not** whether it equals `"present"` |
136
+ | `"empty"` / `.empty?` | Ruby `String#empty?` | Whether the string is `""` — **not** whether it equals `"empty"` |
137
+ | `"frozen"` / `.frozen?` | Ruby `Object#frozen?` | Whether the object is frozen — **not** whether it equals `"frozen"` |
138
+
139
+ ### Example of the problem
140
+
141
+ ```ruby
142
+ class Order < ApplicationRecord
143
+ inquirer :state
144
+ end
145
+
146
+ # ❌ Misleading — .blank? tests blankness, not state == "blank"
147
+ order = Order.new(state: 'blank')
148
+ order.state.blank? # => false ("blank" is a non-empty string, so not blank)
149
+
150
+ # ❌ Misleading — .present? tests non-blankness, not state == "present"
151
+ order = Order.new(state: 'present')
152
+ order.state.present? # => true (any non-blank string is present)
153
+
154
+ # ❌ Misleading — .nil? tests object identity, not state == "nil"
155
+ order = Order.new(state: 'nil')
156
+ order.state.nil? # => false (it is a StringInquirer, not nil)
157
+ ```
158
+
159
+ **Rule of thumb:** if your domain uses values such as `nil`, `blank`, `present`,
160
+ `empty`, or `frozen`, use direct string comparison instead of a predicate:
161
+
162
+ ```ruby
163
+ order.state == 'blank' # ✅ reliable
164
+ order.state == 'present' # ✅ reliable
165
+ order.state == 'nil' # ✅ reliable
166
+ ```
167
+
168
+ ---
169
+
117
170
  ## How it works
118
171
 
119
172
  `.inquirer :attr` wraps the original attribute reader and returns one of three
@@ -125,31 +178,42 @@ objects based on the raw value:
125
178
  | `Symbol` | `InquiryAttrs::SymbolInquiry` | `:active.active?` → `true` |
126
179
  | Any other string | `ActiveSupport::StringInquirer` | Standard Rails inquiry |
127
180
 
181
+ > **Note:** if an attribute value shares a name with a built-in Ruby/Rails
182
+ > predicate (`"nil"`, `"blank"`, `"present"`, `"empty"`, `"frozen"`) the real
183
+ > method will be called — not a string-equality check. See
184
+ > [⚠️ Reserved predicate names](#️-reserved-predicate-names) for details.
185
+
128
186
  ### `InquiryAttrs::NilInquiry`
129
187
 
130
188
  A frozen singleton returned for blank attributes. Every `?`-method returns
131
- `false`; behaves like `nil` in comparisons and `blank?` checks.
189
+ `false`; behaves like `nil` in comparisons, `blank?` checks, and type
190
+ introspection.
132
191
 
133
192
  ```ruby
134
193
  ni = InquiryAttrs::NilInquiry::INSTANCE
135
- ni.nil? # => true
136
- ni.active? # => false
137
- ni == nil # => true
138
- ni.blank? # => true
194
+ ni.nil? # => true
195
+ ni.active? # => false
196
+ ni == nil # => true
197
+ ni.blank? # => true
198
+ ni.is_a?(NilClass) # => true
199
+ ni.kind_of?(NilClass) # => true
200
+ ni.instance_of?(NilClass) # => true
139
201
  ```
140
202
 
141
203
  ### `InquiryAttrs::SymbolInquiry`
142
204
 
143
205
  Wraps a Symbol with predicate methods; compares equal to both the symbol and
144
- its string equivalent.
206
+ its string equivalent; reports itself as a `Symbol` in all type-check methods.
145
207
 
146
208
  ```ruby
147
209
  si = InquiryAttrs::SymbolInquiry.new(:active)
148
- si.active? # => true
149
- si == :active # => true
150
- si == 'active' # => true
151
- si.is_a?(Symbol) # => true
152
- si.to_s # => "active"
210
+ si.active? # => true
211
+ si == :active # => true
212
+ si == 'active' # => true
213
+ si.is_a?(Symbol) # => true
214
+ si.kind_of?(Symbol) # => true
215
+ si.instance_of?(Symbol) # => true
216
+ si.to_s # => "active"
153
217
  ```
154
218
 
155
219
  ---
@@ -165,7 +229,6 @@ Auto-included into `ActiveRecord::Base`. Include manually in other classes.
165
229
  ```ruby
166
230
  inquirer :status # single attribute
167
231
  inquirer :status, :role, :plan # multiple attributes
168
- inquirer :status, only: :show # passes options to before_action style macros (AR scoped)
169
232
  ```
170
233
 
171
234
  ---
@@ -174,9 +237,16 @@ inquirer :status, only: :show # passes options to before_action style
174
237
 
175
238
  ```bash
176
239
  bundle install
177
- bundle exec ruby -Ilib -Itest test/inquiry_attrs/nil_inquiry_test.rb \
178
- test/inquiry_attrs/symbol_inquiry_test.rb \
179
- test/inquiry_attrs/concern_test.rb
240
+
241
+ # Full suite (preferred)
242
+ bundle exec rake
243
+
244
+ # Single file
245
+ bundle exec ruby -Ilib -Itest test/inquiry_attrs/concern_test.rb
246
+
247
+ # Single test by name
248
+ bundle exec ruby -Ilib -Itest test/inquiry_attrs/concern_test.rb \
249
+ --name test_matching_predicate_returns_true
180
250
  ```
181
251
 
182
252
  ---
@@ -25,6 +25,12 @@ module InquiryAttrs
25
25
  method_name.to_s.end_with?('?') || super
26
26
  end
27
27
 
28
+ # NilClass cannot be subclassed in Ruby, so we override the type-check
29
+ # methods explicitly — the same technique used by SymbolInquiry for Symbol.
30
+ def is_a?(klass) = klass == NilClass || super
31
+ alias kind_of? is_a?
32
+ alias instance_of? is_a?
33
+
28
34
  def nil? = true
29
35
  def blank? = true
30
36
  def empty? = true
@@ -6,7 +6,7 @@ module InquiryAttrs
6
6
 
7
7
  # Expose `rails inquiry_attrs:install` to the host application.
8
8
  rake_tasks do
9
- load File.expand_path('../../tasks/inquiry_attrs.rake', __dir__)
9
+ load File.expand_path('../tasks/inquiry_attrs.rake', __dir__)
10
10
  end
11
11
  end
12
12
  end
@@ -42,8 +42,9 @@ module InquiryAttrs
42
42
  end
43
43
  end
44
44
 
45
- def is_a?(klass) = klass == Symbol || super
45
+ def is_a?(klass) = klass == Symbol || super
46
46
  alias kind_of? is_a?
47
+ alias instance_of? is_a?
47
48
 
48
49
  def nil? = false
49
50
  def blank? = false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InquiryAttrs
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'.freeze
5
5
  end
data/llms/overview.md CHANGED
@@ -64,14 +64,39 @@ inquirer :status, :role, :plan # wraps multiple readers at once
64
64
  | `Symbol` | `InquiryAttrs::SymbolInquiry.new(raw)` |
65
65
  | Any other string | `raw.to_s.inquiry` → `ActiveSupport::StringInquirer` |
66
66
 
67
+ ## Reserved predicate names
68
+
69
+ Several predicate names are **already defined as real methods** on the returned
70
+ objects. `method_missing` is never reached for them, so they **do not** test
71
+ whether the raw attribute value equals that word — they invoke the existing method.
72
+
73
+ | Predicate | Defined by | What it tests |
74
+ |---|---|---|
75
+ | `nil?` | Ruby `Object` | Whether the object is `nil` — always `false` for present values |
76
+ | `blank?` | ActiveSupport | Whether the value is blank (nil / "" / whitespace) |
77
+ | `present?` | ActiveSupport | Opposite of `blank?` |
78
+ | `empty?` | Ruby `String` / `NilInquiry` | Whether the string is `""` |
79
+ | `frozen?` | Ruby `Object` | Whether the object is frozen |
80
+
81
+ **Code generation rule:** when a model's attribute domain includes values whose
82
+ names match the table above (e.g. a `state` column that can hold `"blank"` or
83
+ `"nil"`), use direct string comparison — never a predicate:
84
+
85
+ ```ruby
86
+ record.state == 'blank' # ✅ tests string equality
87
+ record.state.blank? # ❌ tests blankness, not state == "blank"
88
+ ```
89
+
67
90
  ## Class responsibilities
68
91
 
69
92
  ### `InquiryAttrs::NilInquiry`
70
93
 
71
94
  - Frozen singleton (`INSTANCE`)
72
- - `nil?` → `true`; `blank?` → `true`; `present?` → `false`
73
- - Every `?`-method → `false` via `method_missing`
95
+ - `nil?` → `true`; `blank?` → `true`; `empty?` → `true`; `present?` → `false`
96
+ - Every `?`-method → `false` via `method_missing` (except the explicit overrides above)
74
97
  - `== nil`, `== ""`, `== INSTANCE` → `true`
98
+ - `is_a?(NilClass)`, `kind_of?(NilClass)`, `instance_of?(NilClass)` → `true`
99
+ (`NilClass` cannot be subclassed; overridden explicitly)
75
100
  - Implements `to_s`, `to_str`, `inspect`
76
101
 
77
102
  ### `InquiryAttrs::SymbolInquiry < SimpleDelegator`
@@ -80,7 +105,8 @@ inquirer :status, :role, :plan # wraps multiple readers at once
80
105
  - Unwraps nested `SymbolInquiry` on init
81
106
  - Any `?`-method returns `true` iff `sym.to_s == method_name.delete_suffix('?')`
82
107
  - `==` accepts `Symbol`, `String`, or `SymbolInquiry`
83
- - `is_a?(Symbol)` → `true` (and `kind_of?`)
108
+ - `is_a?(Symbol)`, `kind_of?(Symbol)`, `instance_of?(Symbol)` → `true`
109
+ (`Symbol` cannot be subclassed; overridden explicitly)
84
110
  - `nil?` → `false`; `blank?` → `false`; `present?` → `true`
85
111
 
86
112
  ### `InquiryAttrs::Concern`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inquiry_attrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pawel Niemczyk
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '7.0'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '9'
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,6 +26,9 @@ dependencies:
23
26
  - - ">="
24
27
  - !ruby/object:Gem::Version
25
28
  version: '7.0'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '9'
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: activerecord
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -30,6 +36,9 @@ dependencies:
30
36
  - - ">="
31
37
  - !ruby/object:Gem::Version
32
38
  version: '7.0'
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '9'
33
42
  type: :runtime
34
43
  prerelease: false
35
44
  version_requirements: !ruby/object:Gem::Requirement
@@ -37,6 +46,9 @@ dependencies:
37
46
  - - ">="
38
47
  - !ruby/object:Gem::Version
39
48
  version: '7.0'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '9'
40
52
  - !ruby/object:Gem::Dependency
41
53
  name: railties
42
54
  requirement: !ruby/object:Gem::Requirement
@@ -44,6 +56,9 @@ dependencies:
44
56
  - - ">="
45
57
  - !ruby/object:Gem::Version
46
58
  version: '7.0'
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '9'
47
62
  type: :runtime
48
63
  prerelease: false
49
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,6 +66,9 @@ dependencies:
51
66
  - - ">="
52
67
  - !ruby/object:Gem::Version
53
68
  version: '7.0'
69
+ - - "<"
70
+ - !ruby/object:Gem::Version
71
+ version: '9'
54
72
  description: |
55
73
  InquiryAttrs wraps ActiveRecord/ActiveModel (and StoreModel/Dry::Struct) attributes with
56
74
  predicate-style inquiry methods. Write user.status.active? instead of
@@ -58,7 +76,8 @@ description: |
58
76
  predicate — no more NoMethodError on nil. Run `rails inquiry_attrs:install`
59
77
  to generate an initializer that auto-includes the concern into every
60
78
  ActiveRecord model.
61
- email: []
79
+ email:
80
+ - pniemczyk.info@gmail.com
62
81
  executables: []
63
82
  extensions: []
64
83
  extra_rdoc_files: []
@@ -78,13 +97,12 @@ files:
78
97
  - lib/tasks/inquiry_attrs.rake
79
98
  - llms/overview.md
80
99
  - llms/usage.md
81
- homepage: https://github.com/your-org/inquiry_attrs
100
+ homepage: https://github.com/pniemczyk/inquiry_attrs
82
101
  licenses:
83
102
  - MIT
84
103
  metadata:
85
- homepage_uri: https://github.com/your-org/inquiry_attrs
86
- source_code_uri: https://github.com/your-org/inquiry_attrs
87
- changelog_uri: https://github.com/your-org/inquiry_attrs/blob/main/CHANGELOG.md
104
+ homepage_uri: https://github.com/pniemczyk/inquiry_attrs
105
+ changelog_uri: https://github.com/pniemczyk/inquiry_attrs/blob/main/CHANGELOG.md
88
106
  rdoc_options: []
89
107
  require_paths:
90
108
  - lib