onuro 0.1.5 → 0.1.6
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/CONTRIBUTING.md +1 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -0
- data/lib/onuro/context_builder.rb +23 -0
- data/lib/onuro/engine.rb +4 -0
- data/lib/onuro/version.rb +1 -1
- data/onuro.gemspec +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97dc1404e241feee1fc3b1834e87b6c4f1263535044ffd5ab0cb2467a57d6e4b
|
4
|
+
data.tar.gz: 49b7923e32d895669eb868d760693b24c224f42a29d36c914f31ca70b771abae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb443becd66deafddd03051782251d6d8505b892bc6cd2497cd704264c12c57ffca7631e4cadac2a19b707195112ebe8b36f0545a22c2ff2b793f8c004f7a8b5
|
7
|
+
data.tar.gz: f4fa44534ff2cb5e0d97a5c7d908ae4cc553b159c0584ecf24489050fdde8ea2ce2d9f3dec5d2caa0000b7d0c5578efe70e9bb20fc261cabf3b3f397dfb45aff
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
onuro (0.1.
|
4
|
+
onuro (0.1.6)
|
5
|
+
activesupport (~> 5.2)
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
@@ -64,7 +65,6 @@ PLATFORMS
|
|
64
65
|
ruby
|
65
66
|
|
66
67
|
DEPENDENCIES
|
67
|
-
activesupport (~> 5.2)
|
68
68
|
bundler (~> 1.17)
|
69
69
|
byebug (~> 11.0)
|
70
70
|
coderay (~> 1.1)
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[](https://codeclimate.com/github/ByteDecoder/onuro/maintainability)
|
2
|
+
[](https://codeclimate.com/github/ByteDecoder/onuro/test_coverage)
|
1
3
|
# Onuro
|
2
4
|
|
3
5
|
Workflow Engine based in events that execute a collection of rules defined in the event configuration definition
|
@@ -1,17 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Onuro
|
4
|
+
# Builder class that allows to create a builder pattern for easily creation of
|
5
|
+
# the Onuro::Context containing attributes to help you in the event rule processing
|
6
|
+
# @see Onuro::Context
|
4
7
|
class ContextBuilder
|
8
|
+
# Onuro::Context generated by the Onuro::ContextBuilder
|
5
9
|
attr_accessor :context
|
6
10
|
|
11
|
+
# Creates a new instance of Onuro::ContextBuilder with its Onuro::Context
|
12
|
+
# attribute set to default values.
|
13
|
+
#
|
14
|
+
# @see Onuro::Context
|
7
15
|
def initialize
|
8
16
|
self.context = Context.new
|
9
17
|
end
|
10
18
|
|
19
|
+
# Adds a key/value item in the Onuro::Context
|
20
|
+
#
|
21
|
+
# @Example
|
22
|
+
# ContextBuilder.new.add(:member_id, 12)
|
23
|
+
#
|
24
|
+
# @see Onuro::Context
|
11
25
|
def add(key, value)
|
12
26
|
context.add(key, value)
|
13
27
|
end
|
14
28
|
|
29
|
+
# Class method that uses the builder pattern in order to easy create an Onuro::Context
|
30
|
+
# instance and being populated
|
31
|
+
#
|
32
|
+
# @Example
|
33
|
+
# ContextBuilder.build do |builder|
|
34
|
+
# builder.add(:member_id, 12)
|
35
|
+
# end
|
36
|
+
#
|
37
|
+
# @see Onuro::Context
|
15
38
|
def self.build
|
16
39
|
builder = new
|
17
40
|
yield builder if block_given?
|
data/lib/onuro/engine.rb
CHANGED
data/lib/onuro/version.rb
CHANGED
data/onuro.gemspec
CHANGED
@@ -41,7 +41,8 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
42
42
|
spec.require_paths = ['lib']
|
43
43
|
|
44
|
-
spec.
|
44
|
+
spec.add_runtime_dependency 'activesupport', '~> 5.2'
|
45
|
+
|
45
46
|
spec.add_development_dependency 'bundler', '~> 1.17'
|
46
47
|
spec.add_development_dependency 'byebug', '~> 11.0'
|
47
48
|
spec.add_development_dependency 'coderay', '~> 1.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onuro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Reyes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.2'
|
20
|
-
type: :
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- ".rubocop.yml"
|
149
149
|
- CHANGELOG.md
|
150
150
|
- CODE_OF_CONDUCT.md
|
151
|
+
- CONTRIBUTING.md
|
151
152
|
- Gemfile
|
152
153
|
- Gemfile.lock
|
153
154
|
- LICENSE
|