rule_box 0.1.0 → 0.1.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/Gemfile.lock +1 -1
- data/lib/rule_box/facade.rb +3 -2
- data/lib/rule_box/getter.rb +4 -0
- data/lib/rule_box/version.rb +1 -1
- data/rule_box.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93a607676433feab4de64825c8765e739e1e1a417e93d4fbedb9548ea8aea3b8
|
|
4
|
+
data.tar.gz: 508c284e6ecf27dcdea4e6bf5c312347f91d3ef6fad02d248e7a2a7e95358691
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85ae54a48bc97c4cc052cf1b4fde1ffd62162e7445f2a1380968a845057505db8fc6602d660c2b9d53170c03eab5487170091d753dea9513b90be5ccc9f3a19e
|
|
7
|
+
data.tar.gz: ef89ef6c0086f7b3162586a6fdc0f36b250d7823033e85f608495223b07d67852ecc3f8c7c77b6aa137a0c3290d8f8b71d84f2c2e7bc7fc1580d4d80fae69a25
|
data/Gemfile.lock
CHANGED
data/lib/rule_box/facade.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class RuleBox::Facade
|
|
4
|
-
attr_reader :model, :status, :data, :bucket, :errors, :steps, :executed
|
|
4
|
+
attr_reader :model, :status, :data, :bucket, :errors, :steps, :executed, :_current_method
|
|
5
5
|
attr_accessor :show_steps
|
|
6
6
|
|
|
7
7
|
def initialize(**dependencies)
|
|
@@ -44,7 +44,7 @@ class RuleBox::Facade
|
|
|
44
44
|
|
|
45
45
|
def attributes
|
|
46
46
|
attrs = {}
|
|
47
|
-
%i[model status data bucket executed errors steps].each do |key|
|
|
47
|
+
%i[model status data bucket executed errors steps _current_method].each do |key|
|
|
48
48
|
value = send key
|
|
49
49
|
attrs[key] = value
|
|
50
50
|
end
|
|
@@ -92,6 +92,7 @@ class RuleBox::Facade
|
|
|
92
92
|
|
|
93
93
|
def pre_process(method, model)
|
|
94
94
|
@model = model
|
|
95
|
+
@_current_method = method
|
|
95
96
|
class_name = check_class_model
|
|
96
97
|
@errors = []
|
|
97
98
|
@steps = []
|
data/lib/rule_box/getter.rb
CHANGED
data/lib/rule_box/version.rb
CHANGED
data/rule_box.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.email = ['ralphsbaesso@gmail.com', 'nathanmeira1@gmail.com']
|
|
10
10
|
|
|
11
11
|
spec.summary = 'RuleBox'
|
|
12
|
-
spec.description = '
|
|
12
|
+
spec.description = 'This gem is focused in giving a strong and concrete way to manage your business rules, mixing the best of both worlds in Facade and Strategy, bringing you a simplified way to apply these Design Patterns into your project.'
|
|
13
13
|
spec.homepage = 'https://github.com/ralphsbaesso'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rule_box
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ralph Baesso
|
|
@@ -9,9 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
|
-
description:
|
|
14
|
+
description: This gem is focused in giving a strong and concrete way to manage your
|
|
15
|
+
business rules, mixing the best of both worlds in Facade and Strategy, bringing
|
|
16
|
+
you a simplified way to apply these Design Patterns into your project.
|
|
15
17
|
email:
|
|
16
18
|
- ralphsbaesso@gmail.com
|
|
17
19
|
- nathanmeira1@gmail.com
|