standard-procedure-plumbing 0.5.0 → 0.5.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: 90c456ba1b4ae2cebb75d1fe5ac49f806c6156387a5907980255e2f224b11f54
4
- data.tar.gz: b40ea0aa31ce5608d94721c90d56a351cdf834660fe32398d4c2e6e5c0dd4827
3
+ metadata.gz: 2faeb187ecbed96767befe2d2108e62e79d9b80517d81a86b6e2078ef17da226
4
+ data.tar.gz: b1f66ca28aecbd68e167a289c42e87cf4e768fb94ab6cc7f4ef5148dfc41fa7e
5
5
  SHA512:
6
- metadata.gz: b2a394f3a3924edc4963252e59170fec110c7190d2305e90e5ecb483e84cfff818c75074abeb975f4561ca01086cad1c7971d26b91eec3be0da8c6a46c0fa869
7
- data.tar.gz: b3b790c91098bea951a175ec9d2b8676e2e630fb4c4eef6e225855b5b7a472782bc6eb6f98f1c5c3f339878560fbad5c060a75cecec15748105735320ab09379
6
+ metadata.gz: 5b6d1e1401ca3acc40d412143c2835e1f84433bc07e8ebda19a5f9af27e4d6fd4d088cdf6a7e68aa1a1841159a6c3c721cda069883a5ba05b6797005e1c805a5
7
+ data.tar.gz: 1a268b957386d9f2ae2596a4924865ee646dc4baf7312c2d50dea51da98e0e3340aa1decffdbcf4307906fcfe43dffdabbfaab7f71f33636f7c8aed99877e526
data/README.md CHANGED
@@ -41,9 +41,14 @@ require 'plumbing'
41
41
  Plumbing.config mode: :async
42
42
  ```
43
43
 
44
+ ## Development
44
45
 
46
+ ### To Do
45
47
 
46
- ## Development
48
+ - [ ] Add a debouncing filter for pipes
49
+ - [ ] Pass the mode as a block parameter in `Plumbing::Spec.modes`
50
+ - [ ] Move Plumbing::Actor::Transporter to Plumbing::Transporter ?? (planning to use it outside of Plumbing so would make sense not to imply it is tied to Actors)
51
+ - [X] Ensure transporters deal with GlobalID models not being found / errors when unpacking
47
52
 
48
53
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
49
54
 
@@ -51,7 +56,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
51
56
 
52
57
  ## Contributing
53
58
 
54
- Bug reports and pull requests are welcome on GitHub at https://github.com/standard_procedure/plumbing. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/standard_procedure/plumbing/blob/main/CODE_OF_CONDUCT.md).
59
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/standard_procedure/plumbing>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/standard_procedure/plumbing/blob/main/CODE_OF_CONDUCT.md).
55
60
 
56
61
  ## Code of Conduct
57
62
 
@@ -55,6 +55,9 @@ module Plumbing
55
55
 
56
56
  def unpack_string argument
57
57
  argument.start_with?("gid://") ? GlobalID::Locator.locate(argument) : argument
58
+ rescue => ex
59
+ Plumbing.config.logger.error "!!!! #{self.class}##{__callee__} - #{argument} => #{ex}"
60
+ argument
58
61
  end
59
62
  end
60
63
  end
@@ -86,7 +86,7 @@ module Plumbing
86
86
  instance_eval(&)
87
87
  nil
88
88
  rescue => ex
89
- Plumbing.config.logger.error { "!!!! #{self.class}#perform_safely => #{ex}" }
89
+ Plumbing.config.logger.error { "!!!! #{self.class}##{__callee__} => #{ex}" }
90
90
  nil
91
91
  end
92
92
  end
data/lib/plumbing/pipe.rb CHANGED
@@ -9,12 +9,12 @@ module Plumbing
9
9
  # @param event_name [String] representing the type of event this is
10
10
  # @param data [Hash] representing the event-specific data to be passed to the observers
11
11
  def notify event_name, **data
12
- Plumbing.config.logger.debug { "-> #{self.class}#notify #{event_name}" }
12
+ Plumbing.config.logger.debug { "-> #{self.class}##{__callee__} #{event_name}" }
13
13
  observers.each do |observer|
14
- Plumbing.config.logger.debug { "===> #{self.class}#dispatch #{event_name}(#{data}) to #{observer}" }
14
+ Plumbing.config.logger.debug { "===> #{self.class}#call #{event_name}(#{data}) to #{observer}" }
15
15
  observer.call event_name, data
16
16
  rescue => ex
17
- Plumbing.config.logger.error { "!!!! #{self.class}#dispatch #{event_name} => #{ex}" }
17
+ Plumbing.config.logger.error { "!!!! #{self.class}##{__callee__} #{event_name} => #{ex}" }
18
18
  ex
19
19
  end
20
20
  end
@@ -58,6 +58,5 @@ module Plumbing
58
58
 
59
59
  require_relative "pipe/filter"
60
60
  require_relative "pipe/junction"
61
-
62
61
  end
63
62
  end
@@ -41,7 +41,11 @@ module Plumbing
41
41
  end
42
42
 
43
43
  def validate_preconditions_for input
44
- failed_preconditions = pre_conditions.select { |name, validator| !validator.as(Callable).call(input) }
44
+ failed_preconditions = pre_conditions.select do |name, validator|
45
+ !validator.as(Callable).call(input)
46
+ rescue
47
+ true
48
+ end
45
49
  raise PreConditionError, failed_preconditions.keys.join(", ") if failed_preconditions.any?
46
50
  input
47
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plumbing
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard-procedure-plumbing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahoul Baruah
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-20 00:00:00.000000000 Z
11
+ date: 2024-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: globalid
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
- rubygems_version: 3.5.12
84
+ rubygems_version: 3.5.20
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Plumbing - various pipelines for your ruby application