marameters 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/marameters/categorizer.rb +2 -2
- data/lib/marameters/probe.rb +1 -1
- data/lib/marameters.rb +3 -1
- data/marameters.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a448d4a26a5df3da959e06a042a8413bc27a770aec438c4cdc3d965fb0d595
|
4
|
+
data.tar.gz: b96f8606648ea086290f3221c5a6813cd362aac419cdc0fb245d94e8e8e0378e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62fcb8e98a925faa0c25d54028bee19089a7a18e14da98104f5c3d8a860d429c07dd1befbd5813eaf3942df8dd87d84a612bc5f05a058fb08001b884604ec71b
|
7
|
+
data.tar.gz: d3168542b245ca386edb89063bc0671a49f6f131318ffce8a6602c172dd0d8adf8dd39ede6da471374640b36c165577835a41265c026ace8fca982a1bc86f6d3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/struct"
|
4
4
|
|
5
5
|
module Marameters
|
6
6
|
# Builds the primary argument categories based on method parameters and arguments.
|
7
7
|
class Categorizer
|
8
|
-
using Refinements::
|
8
|
+
using Refinements::Struct
|
9
9
|
|
10
10
|
def initialize parameters, model: Splat
|
11
11
|
@parameters = parameters
|
data/lib/marameters/probe.rb
CHANGED
@@ -70,7 +70,7 @@ module Marameters
|
|
70
70
|
|
71
71
|
def define_variable category, kinds
|
72
72
|
parameters.filter_map { |kind, name| next name if kinds.include? kind }
|
73
|
-
.then { |collection| instance_variable_set "@#{category}", collection }
|
73
|
+
.then { |collection| instance_variable_set :"@#{category}", collection }
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/lib/marameters.rb
CHANGED
@@ -10,7 +10,9 @@ end
|
|
10
10
|
|
11
11
|
# Main namespace.
|
12
12
|
module Marameters
|
13
|
-
def self.loader
|
13
|
+
def self.loader registry = Zeitwerk::Registry
|
14
|
+
@loader ||= registry.loaders.find { |loader| loader.tag == File.basename(__FILE__, ".rb") }
|
15
|
+
end
|
14
16
|
|
15
17
|
def self.categorize(parameters, arguments) = Categorizer.new(parameters).call(arguments)
|
16
18
|
|
data/marameters.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "marameters"
|
5
|
-
spec.version = "
|
5
|
+
spec.version = "3.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/marameters"
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version = "~> 3.
|
26
|
-
spec.add_dependency "refinements", "~>
|
25
|
+
spec.required_ruby_version = "~> 3.3"
|
26
|
+
spec.add_dependency "refinements", "~> 12.0"
|
27
27
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
28
28
|
|
29
29
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2024-01-01 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: refinements
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '12.0'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '12.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: zeitwerk
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,14 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
103
|
requirements:
|
104
104
|
- - "~>"
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: '3.
|
106
|
+
version: '3.3'
|
107
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.5.3
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: A dynamic method parameter inspector.
|
metadata.gz.sig
CHANGED
Binary file
|