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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90cbc85ab42d34a109751f5437d0e383e8e5b9eed7df4f464b35a09e61320f3c
4
- data.tar.gz: af0204e3102f34029d9092362df9df59cffe4e293db1a1dae8635e688cd94a06
3
+ metadata.gz: 4ccb2870b744ff4ca38731d9281137c8b8606c516d4ca7f7be24162cb42da61f
4
+ data.tar.gz: f8d6460835aa13174688f9464fc8f52073db18cd1ff364e13573385b7e1c1f65
5
5
  SHA512:
6
- metadata.gz: d3694d458510d9a416d6faf5d72307ab9bd206074d9ede36bffabadfad5ab0c5c65ccc74e2c5f5ddfaea4fd4f6857e944e534689b43c1d029e942c8524b6459c
7
- data.tar.gz: 7e7751b15256cd2dc2ac736b209a1f72819d9bcc051c8e0b7a4e7a6be1480675a382caeef624c790896d8b9e64706ca8576306ab108fc1512f762d1b5dc9be53
6
+ metadata.gz: d5993f592d9dbfa3a9b28127611bb8c501f5e284a0af340ca9c40310c9cbfafe598edfd30bafb01e32559215c31962e352a4baf892656ed63ebc64a728f747ab
7
+ data.tar.gz: 78c27e1cde5b3a98135793253a251c5d43d5ce396f2831c72b8751dbb2e071328ed20b823215dda8635bc405260693c9ddd57346843a3fa222ec736167e3047b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ * Fixing `Config` compatibility with Ruby 3+
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  * Adding Ruby 3+ compatibility
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- business_pipeline (0.3.0)
4
+ business_pipeline (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -92,4 +92,4 @@ DEPENDENCIES
92
92
  simplecov (~> 0.18.5)
93
93
 
94
94
  BUNDLED WITH
95
- 2.1.4
95
+ 2.2.22
@@ -3,14 +3,15 @@
3
3
  require 'ostruct'
4
4
 
5
5
  module BusinessPipeline
6
- class Config < OpenStruct
6
+ class Config
7
7
  def initialize(hash = nil, &block)
8
- super(hash)
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 = self[key.to_sym]
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
- super
24
+ data.public_send(meth, *args, &block)
25
25
  else
26
- self[meth] = args.first
26
+ data[meth] = args.first
27
27
  end
28
28
  end
29
- # rubocop:enable Style/MissingRespondToMissing
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BusinessPipeline
4
- VERSION = -'0.3.0'
4
+ VERSION = -'0.3.1'
5
5
  end
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.0
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.3.7
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