onuro-rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +38 -0
- data/README.md +8 -4
- data/Rakefile +4 -2
- data/bin/console +4 -3
- data/lib/generators/onuro/install_generator.rb +17 -0
- data/lib/generators/templates/onuro_initializer.rb +29 -0
- data/lib/onuro/rails.rb +3 -1
- data/lib/onuro/rails/version.rb +3 -1
- data/onuro-rails.gemspec +14 -11
- metadata +36 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b04e5dff5ee8ad66eefbf33704213fc42ad8dad0aa7ca5c0c1a15ac2cbcb38
|
4
|
+
data.tar.gz: 58cc27285737da2586b06bba584a1c7a3d56998976648a38f8ac07ff41d6c773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f768cfe0952bf3a781594fbe55ffacbf1ac2b3264eb669de13253ff60800ff96189d233f2f3543a26e776c2679eac52a765b3a9e6b8b0e5576460134b251a75e
|
7
|
+
data.tar.gz: 8ad7e30ac3fd348ee5be46d62c3d26896a3d2c58216b135bbf8832029c6e602742db92349732f4af545becf2164b54222f3e583d6b9fa7550c1a98f4b36496be
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in onuro-rails.gemspec
|
6
8
|
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
onuro-rails (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.0)
|
10
|
+
jaro_winkler (1.5.3)
|
11
|
+
onuro (0.1.5)
|
12
|
+
parallel (1.17.0)
|
13
|
+
parser (2.6.3.0)
|
14
|
+
ast (~> 2.4.0)
|
15
|
+
rainbow (3.0.0)
|
16
|
+
rake (10.5.0)
|
17
|
+
rubocop (0.73.0)
|
18
|
+
jaro_winkler (~> 1.5.1)
|
19
|
+
parallel (~> 1.10)
|
20
|
+
parser (>= 2.6)
|
21
|
+
rainbow (>= 2.2.2, < 4.0)
|
22
|
+
ruby-progressbar (~> 1.7)
|
23
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
24
|
+
ruby-progressbar (1.10.1)
|
25
|
+
unicode-display_width (1.6.0)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
bundler (~> 1.17)
|
32
|
+
onuro (~> 0.1.5)
|
33
|
+
onuro-rails!
|
34
|
+
rake (~> 10.0)
|
35
|
+
rubocop (~> 0.73.0)
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Onuro::Rails
|
2
2
|
|
3
|
-
|
3
|
+
Workflow Engine based in events that execute a collection of rules defined in the event configuration definition
|
4
|
+
with install generator for Rails.
|
4
5
|
|
5
|
-
|
6
|
+
To learn more about Onuro Workflow Engine, take a look to [Onuro](https://github.com/ByteDecoder/onuro)
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
@@ -22,7 +23,7 @@ Or install it yourself as:
|
|
22
23
|
|
23
24
|
## Usage
|
24
25
|
|
25
|
-
|
26
|
+
$ bundle exec rails onuro:install
|
26
27
|
|
27
28
|
## Development
|
28
29
|
|
@@ -32,4 +33,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
33
|
|
33
34
|
## Contributing
|
34
35
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
36
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ByteDecoder/onuro.
|
37
|
+
|
38
|
+
|
39
|
+
Copyright (c) 2019 [Rodrigo Reyes](https://twitter.com/bytedecoder) released under the MIT license
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'onuro/rails'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "onuro/rails"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Onuro
|
4
|
+
module Generators
|
5
|
+
# Rails generator for Onuro configuration template
|
6
|
+
class InstallGenerator < Rails::Generators::Base
|
7
|
+
source_root File.expand_path('../templates', __dir__)
|
8
|
+
desc 'Creates Onuro initializer for your application'
|
9
|
+
|
10
|
+
def copy_initializer
|
11
|
+
template 'onuro_initializer.rb', 'config/initializers/onuro.rb'
|
12
|
+
|
13
|
+
puts 'Install complete! Legion awaits!'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Onuro::Engine configuration block
|
4
|
+
Onuro::Engine.configure do |config|
|
5
|
+
# config.add_event(:event_one) do |event|
|
6
|
+
# event.add_ruleset_stage [
|
7
|
+
# Onuro::RuleStage.new(rule: Rule1, enabled: true, order: 1),
|
8
|
+
# Onuro::RuleStage.new(rule: Rule3, enabled: true, order: 2)
|
9
|
+
# ]
|
10
|
+
#
|
11
|
+
# Provide your custom strategy if you want to execute custom logic before/After
|
12
|
+
# each rule rule execution in the event
|
13
|
+
# event.add_event_strategy(MyCustomEventStrategy.new)
|
14
|
+
#
|
15
|
+
# If you to execute the rules based on the order attribue, you can execute the
|
16
|
+
# ruleset collection in :asc, :desc or :none (executed as they was registered in the
|
17
|
+
# event)
|
18
|
+
# event.exec_order(:desc)
|
19
|
+
#
|
20
|
+
# Executes all the rules ignoring the diseabled attribute set to tru for the
|
21
|
+
# rules in the event
|
22
|
+
# event.ignore_diseabled
|
23
|
+
# end
|
24
|
+
|
25
|
+
# Add to the event rules using the default RulseStage factory
|
26
|
+
# config.add_event(:event_four) do |event|
|
27
|
+
# event.add_ruleset_stage Onuro::RuleStage.default_ruleset_stage_factory([Rule1, Rule2, Rule3])
|
28
|
+
# end
|
29
|
+
end
|
data/lib/onuro/rails.rb
CHANGED
data/lib/onuro/rails/version.rb
CHANGED
data/onuro-rails.gemspec
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'onuro/rails/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'onuro-rails'
|
8
9
|
spec.version = Onuro::Rails::VERSION
|
9
|
-
spec.authors = [
|
10
|
+
spec.authors = ['Rodrigo Reyes']
|
10
11
|
spec.email = ['encode@bytedecoder.me']
|
11
12
|
|
12
|
-
spec.summary = '
|
13
|
-
spec.description = '
|
13
|
+
spec.summary = 'Rails generator for Onuro Workflow Engine'
|
14
|
+
spec.description = 'Rails generator for Onuro Workflow Engine'
|
14
15
|
spec.homepage = 'https://github.com/ByteDecoder/onuro-rails'
|
15
16
|
spec.license = 'MIT'
|
16
17
|
|
@@ -33,13 +34,15 @@ Gem::Specification.new do |spec|
|
|
33
34
|
|
34
35
|
# Specify which files should be added to the gem when it is released.
|
35
36
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
36
|
-
spec.files
|
37
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
37
38
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
38
39
|
end
|
39
|
-
spec.bindir =
|
40
|
+
spec.bindir = 'exe'
|
40
41
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
41
|
-
spec.require_paths = [
|
42
|
+
spec.require_paths = ['lib']
|
42
43
|
|
43
|
-
spec.add_development_dependency
|
44
|
-
spec.add_development_dependency
|
44
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
45
|
+
spec.add_development_dependency 'onuro', '~> 0.1.5'
|
46
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
47
|
+
spec.add_development_dependency 'rubocop', '~> 0.73.0'
|
45
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onuro-rails
|
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
|
- Rodrigo Reyes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: onuro
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.5
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.5
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,7 +52,21 @@ dependencies:
|
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '10.0'
|
41
|
-
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.73.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.73.0
|
69
|
+
description: Rails generator for Onuro Workflow Engine
|
42
70
|
email:
|
43
71
|
- encode@bytedecoder.me
|
44
72
|
executables: []
|
@@ -46,14 +74,18 @@ extensions: []
|
|
46
74
|
extra_rdoc_files: []
|
47
75
|
files:
|
48
76
|
- ".gitignore"
|
77
|
+
- ".rubocop.yml"
|
49
78
|
- CHANGELOG.md
|
50
79
|
- CODE_OF_CONDUCT.md
|
51
80
|
- Gemfile
|
81
|
+
- Gemfile.lock
|
52
82
|
- LICENSE
|
53
83
|
- README.md
|
54
84
|
- Rakefile
|
55
85
|
- bin/console
|
56
86
|
- bin/setup
|
87
|
+
- lib/generators/onuro/install_generator.rb
|
88
|
+
- lib/generators/templates/onuro_initializer.rb
|
57
89
|
- lib/onuro/rails.rb
|
58
90
|
- lib/onuro/rails/version.rb
|
59
91
|
- onuro-rails.gemspec
|
@@ -82,5 +114,5 @@ requirements: []
|
|
82
114
|
rubygems_version: 3.0.3
|
83
115
|
signing_key:
|
84
116
|
specification_version: 4
|
85
|
-
summary:
|
117
|
+
summary: Rails generator for Onuro Workflow Engine
|
86
118
|
test_files: []
|