foobara 0.0.56 → 0.0.57
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 +5 -1
- data/projects/enumerated/src/enumerated.rb +9 -0
- data/projects/enumerated/src/values.rb +17 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63e9a6f8fe233be5b149ccd3f7d0fec23f4525f833ab887470251f041bbe63d8
|
|
4
|
+
data.tar.gz: 43b48d0b6b364b60db43aa9123b0929cd59c95871e83af894f8a35d2eadaac4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39607e1c26837a96c621c20af465e37e1190f715edf5b2d21d029519794cdc396d9376fc91babf4869e577f01895e6bcb3fab5a744497d296f816a75d4053f82
|
|
7
|
+
data.tar.gz: d6c28e37b91842740c465e35d3c974066f7e2b0e25b30e11573d52e90faddfe52c1edfd4fb7c17eba4eb18a657a3f33bf6b958c71ae6ce1c824068e21802baeb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
## [0.0.57] - 2025-02-18
|
|
2
|
+
|
|
3
|
+
- Add Enumerated.make_module helper
|
|
4
|
+
|
|
1
5
|
## [0.0.56] - 2025-02-16
|
|
2
6
|
|
|
3
7
|
- Bump Ruby to 3.4.2
|
|
4
|
-
- Add
|
|
8
|
+
- Add an ignore_unexpected_attributes option to Model#initialize
|
|
5
9
|
|
|
6
10
|
## [0.0.55] - 2025-02-01
|
|
7
11
|
|
|
@@ -116,6 +116,23 @@ module Foobara
|
|
|
116
116
|
def respond_to_missing?(name, _include_private = false)
|
|
117
117
|
@symbol_map.key?(name)
|
|
118
118
|
end
|
|
119
|
+
|
|
120
|
+
def make_module
|
|
121
|
+
mod = Module.new
|
|
122
|
+
enumerated = self
|
|
123
|
+
|
|
124
|
+
%i[all all_names all_values].each do |method_name|
|
|
125
|
+
mod.singleton_class.define_method method_name do |*args, **opts, &block|
|
|
126
|
+
enumerated.send(method_name, *args, **opts, &block)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
@symbol_map.each_pair do |name, value|
|
|
131
|
+
mod.const_set(name, value)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
mod
|
|
135
|
+
end
|
|
119
136
|
end
|
|
120
137
|
end
|
|
121
138
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foobara
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.57
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-02-
|
|
10
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bigdecimal
|
|
@@ -249,6 +249,7 @@ files:
|
|
|
249
249
|
- projects/entity/src/not_found_error.rb
|
|
250
250
|
- projects/enumerated/lib/foobara/enumerated.rb
|
|
251
251
|
- projects/enumerated/src/accessors.rb
|
|
252
|
+
- projects/enumerated/src/enumerated.rb
|
|
252
253
|
- projects/enumerated/src/values.rb
|
|
253
254
|
- projects/foobara/lib/foobara.rb
|
|
254
255
|
- projects/foobara/lib/foobara/all.rb
|