business_pipeline 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/business_pipeline/config.rb +10 -7
- data/lib/business_pipeline/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ccb2870b744ff4ca38731d9281137c8b8606c516d4ca7f7be24162cb42da61f
|
4
|
+
data.tar.gz: f8d6460835aa13174688f9464fc8f52073db18cd1ff364e13573385b7e1c1f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5993f592d9dbfa3a9b28127611bb8c501f5e284a0af340ca9c40310c9cbfafe598edfd30bafb01e32559215c31962e352a4baf892656ed63ebc64a728f747ab
|
7
|
+
data.tar.gz: 78c27e1cde5b3a98135793253a251c5d43d5ce396f2831c72b8751dbb2e071328ed20b823215dda8635bc405260693c9ddd57346843a3fa222ec736167e3047b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,14 +3,15 @@
|
|
3
3
|
require 'ostruct'
|
4
4
|
|
5
5
|
module BusinessPipeline
|
6
|
-
class Config
|
6
|
+
class Config
|
7
7
|
def initialize(hash = nil, &block)
|
8
|
-
|
8
|
+
@data = OpenStruct.new(hash)
|
9
|
+
|
9
10
|
instance_eval(&block) if block
|
10
11
|
end
|
11
12
|
|
12
13
|
def fetch(key)
|
13
|
-
value =
|
14
|
+
value = data[key.to_sym]
|
14
15
|
|
15
16
|
return value unless value.nil?
|
16
17
|
return yield(key) if block_given?
|
@@ -18,15 +19,17 @@ module BusinessPipeline
|
|
18
19
|
fail KeyError, key
|
19
20
|
end
|
20
21
|
|
21
|
-
# rubocop:disable Style/MissingRespondToMissing
|
22
22
|
def method_missing(meth, *args, &block)
|
23
23
|
if args.size.zero? || meth.to_s.end_with?('=')
|
24
|
-
|
24
|
+
data.public_send(meth, *args, &block)
|
25
25
|
else
|
26
|
-
|
26
|
+
data[meth] = args.first
|
27
27
|
end
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
|
+
def respond_to_missing?(meth, include_private = false)
|
31
|
+
data.respond_to?(meth, include_private) || super
|
32
|
+
end
|
30
33
|
|
31
34
|
attr_reader :data
|
32
35
|
private :data
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: business_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Courtois
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.2.22
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: A new business pipeline architecture for Rails applications
|