standard-procedure-plumbing 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -2
- data/lib/plumbing/actor/transporter.rb +3 -0
- data/lib/plumbing/actor.rb +1 -1
- data/lib/plumbing/pipe.rb +3 -4
- data/lib/plumbing/pipeline/contracts.rb +5 -1
- data/lib/plumbing/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2faeb187ecbed96767befe2d2108e62e79d9b80517d81a86b6e2078ef17da226
|
4
|
+
data.tar.gz: b1f66ca28aecbd68e167a289c42e87cf4e768fb94ab6cc7f4ef5148dfc41fa7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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
|
data/lib/plumbing/actor.rb
CHANGED
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}
|
12
|
+
Plumbing.config.logger.debug { "-> #{self.class}##{__callee__} #{event_name}" }
|
13
13
|
observers.each do |observer|
|
14
|
-
Plumbing.config.logger.debug { "===> #{self.class}#
|
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}
|
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
|
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
|
data/lib/plumbing/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|