enum_fields 0.3.1 → 0.3.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 +4 -4
- data/CHANGELOG.md +96 -0
- data/lib/enum_fields/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 711e9c8ec5416674480e0d3abf02ac97e53fe5ab3a02ede7c8f70838a05461eb
|
|
4
|
+
data.tar.gz: 9fc0c1811f467705a7f6f0d6be1c957b26095f23514d953d4240e7ee721c3a4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfd868cdc669171dda053b068d84719a78758f1b3a01dac77e3c084efe9f87b190054bcec517c51dafe5143bfbd35ecdd4fe06da90a6c829cc586182ba59881c
|
|
7
|
+
data.tar.gz: 7b2c111b3a8c779e8f46073a8cb244fd2a385cfbc50fcd018eae254d4dda617a57224bf844826028a2987d0a3ab49a890c98cbd67687c6cfbfadae1b520848a4
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.3.2] - 2026-03-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Restored CHANGELOG.md file
|
|
13
|
+
|
|
14
|
+
## [0.3.1] - 2026-03-08
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Release script to simplify gem deployment
|
|
19
|
+
|
|
20
|
+
## [0.3.0] - 2026-03-08
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Virtual attribute support — enum metadata, property, and inquiry methods now work against user-defined methods that aren't backed by a database column
|
|
25
|
+
- `scope: false` option to skip scope generation (required for virtual attributes, but useful independently)
|
|
26
|
+
|
|
27
|
+
## [0.2.1] - 2026-02-25
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- Flexibility to array definitions, supporting more input formats
|
|
32
|
+
|
|
33
|
+
## [0.2.0] - 2026-02-24
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Namespace support for standalone enum field registration via `EnumFields.namespace(:name) { enum_field ... }`, decoupling definitions from ActiveRecord models
|
|
38
|
+
- `EnumFields.catalog` method for a sorted, serialization-friendly view of all registered definitions across model and standalone namespaces
|
|
39
|
+
|
|
40
|
+
## [0.1.2] - 2026-02-20
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Global `EnumFields::Registry` for cross-model enum field lookup and introspection
|
|
45
|
+
|
|
46
|
+
## [0.1.1] - 2026-02-02
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- Polymorphic association resolution now falls back to finding by value when key lookup fails
|
|
51
|
+
|
|
52
|
+
## [0.1.0] - 2026-01-27
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- `validate: false` option to disable validations on an enum field
|
|
57
|
+
- Validation support for columns used in polymorphic associations
|
|
58
|
+
|
|
59
|
+
## [0.0.5] - 2026-01-03
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- Class-level value accessors for enum field definitions
|
|
64
|
+
|
|
65
|
+
## [0.0.4] - 2025-11-19
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- `enum_fields_metadata` now returns `HashWithIndifferentAccess` instead of a plain hash
|
|
70
|
+
|
|
71
|
+
## [0.0.3] - 2025-11-19
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- `enum_fields_metadata` instance method for accessing field metadata on model instances
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- Extracted core interface functionality into separate `Base` module
|
|
80
|
+
|
|
81
|
+
## [0.0.2] - 2025-11-19
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- `enum_field?` class method to check whether a given attribute is a registered enum field
|
|
86
|
+
|
|
87
|
+
## [0.0.1] - 2025-11-17
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
|
|
91
|
+
- Initial release with core `enum_field` DSL
|
|
92
|
+
- Hash and array definition formats
|
|
93
|
+
- Column override support
|
|
94
|
+
- Additional properties on enum values
|
|
95
|
+
- Inclusion validations
|
|
96
|
+
- Inquiry methods, property accessors, and human-readable labels
|
data/lib/enum_fields/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enum_fields
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kinnell Shah
|
|
@@ -60,6 +60,7 @@ executables: []
|
|
|
60
60
|
extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
|
62
62
|
files:
|
|
63
|
+
- CHANGELOG.md
|
|
63
64
|
- LICENSE
|
|
64
65
|
- README.md
|
|
65
66
|
- lib/enum_fields.rb
|