onuro 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69886eaf6e1ecb4acd854b3a6fdc261b768f1072b5983bacc3599654598850fd
4
- data.tar.gz: 58774fa0bda58c4d715d22ca498a49d9dc97cdde01f07fbfed7e127b6ea4f308
3
+ metadata.gz: 076d8e247a488fc4b01a7328c816b9275345fefa3fced2f21f00e1dd3c750bcc
4
+ data.tar.gz: 90e6e5fda13ff94a9d30774ee37448e04a25d117b26a6fc14725de829be0a828
5
5
  SHA512:
6
- metadata.gz: 885e050ca969163f3bdf208b09befe7977bce2e9cd8366f6fc2426a1c4f9ec17d0d5bd550e01389dc0f76da15d02213448dae56962cde5bacd08c0913e7b9906
7
- data.tar.gz: 129db0caa43e8311da60330df7cbe4b71708fb28689b2d1dfeb25072d37c867e27b8cc23ba038be03aa37f077ae27fb338bba150fa92981e5a7e5693b3b979c9
6
+ metadata.gz: 7cd6a89f92f897b357c7e9c3762e47ea716b9baab77fa4688a8f62db93b1ed2d9d2dcde69c518c8a5d4e1e9d7f7eb5fd66fbe3a2b8100d1cef319de9727389c6
7
+ data.tar.gz: bd0043fa8d0fcfd029835d0835a7f40e22240b79bb9235b5745cfbb27d962dfc6c00598de63847ffb71c3d8d9101bacd8ed87b099c836f54666a78e9bda93865
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onuro (0.1.4)
4
+ onuro (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -218,3 +218,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
218
218
  ## Contributing
219
219
 
220
220
  Bug reports and pull requests are welcome on GitHub at https://github.com/ByteDecoder/onuro.
221
+
222
+
223
+ Copyright (c) 2019 [Rodrigo Reyes](https://twitter.com/bytedecoder) released under the MIT license
@@ -3,7 +3,7 @@
3
3
  module Onuro
4
4
  class BaseRule
5
5
  include ExecutionResult
6
- include Logging
6
+ include Loggable
7
7
 
8
8
  def execute(_context = {})
9
9
  SUCCESSFUL
data/lib/onuro/context.rb CHANGED
@@ -4,6 +4,14 @@ module Onuro
4
4
  class Context
5
5
  attr_reader :data
6
6
 
7
+ def [](key)
8
+ data[key]
9
+ end
10
+
11
+ def []=(key, value)
12
+ data[key] = value
13
+ end
14
+
7
15
  def initialize(**options)
8
16
  @data = Hash.new(0)
9
17
  @data.merge!(options)
data/lib/onuro/engine.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Onuro
4
4
  class Engine
5
- include Logging
5
+ include Loggable
6
6
 
7
7
  attr_accessor :events
8
8
 
data/lib/onuro/event.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Onuro
4
4
  class Event
5
- include Logging
5
+ include Loggable
6
6
  include ExecutionResult
7
7
 
8
8
  attr_reader :name, :ruleset_stage
@@ -3,9 +3,9 @@
3
3
  require 'active_support/logger'
4
4
 
5
5
  module Onuro
6
- module Logging
6
+ module Loggable
7
7
  def logger
8
- Logging.logger
8
+ Loggable.logger
9
9
  end
10
10
 
11
11
  # Global, memoized, lazy initialized instance of a logger
data/lib/onuro/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onuro
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
data/lib/onuro.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'onuro/version'
4
4
  require 'onuro/execution_result'
5
- require 'onuro/logging'
5
+ require 'onuro/loggable'
6
6
  require 'onuro/engine_configuration'
7
7
  require 'onuro/context_builder'
8
8
  require 'onuro/context'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onuro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Reyes
@@ -165,7 +165,7 @@ files:
165
165
  - lib/onuro/event.rb
166
166
  - lib/onuro/event_builder.rb
167
167
  - lib/onuro/execution_result.rb
168
- - lib/onuro/logging.rb
168
+ - lib/onuro/loggable.rb
169
169
  - lib/onuro/rule_stage.rb
170
170
  - lib/onuro/version.rb
171
171
  - onuro.gemspec