fluent_pipeline 0.1.0
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 +7 -0
- data/.rspec +1 -0
- data/.rubocop.yml +20 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +57 -0
- data/README.md +29 -0
- data/Rakefile +8 -0
- data/lib/fluent/pipeline/version.rb +7 -0
- data/lib/fluent/pipeline.rb +48 -0
- data/sig/fluent_pipeline.rbs +4 -0
- metadata +65 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5e2f80eed8c3068ee5677e0d1bbd2e76c1880ea92eb38453811b09210e2761c3
|
4
|
+
data.tar.gz: d303ce079ac79fee01dad64028be626225d45bee1d1ee4da1e5bb16825f4da23
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 921a6e2d58edfb6114689683885d3bb3b3b83fdb0b27deea4bbc703914326d58419cd8d16aa29087b134c77054d951f1a1be909ca9b9f177d28faa3958085d29
|
7
|
+
data.tar.gz: 2a18f0f8bf5e8aa98dd23d7c4877993ad05cd75bda6e5f5df414600184496b7a13df2e2f366feae66319160129f72bf4f8caec105df23debfd3a9554282d86c6
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.6
|
3
|
+
|
4
|
+
Style/StringLiterals:
|
5
|
+
Enabled: true
|
6
|
+
EnforcedStyle: single_quotes
|
7
|
+
|
8
|
+
Style/StringLiteralsInInterpolation:
|
9
|
+
Enabled: true
|
10
|
+
EnforcedStyle: double_quotes
|
11
|
+
|
12
|
+
Layout/LineLength:
|
13
|
+
Max: 120
|
14
|
+
|
15
|
+
Layout/DotPosition:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedStyle: trailing
|
18
|
+
|
19
|
+
Style/Documentation:
|
20
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
fluent_pipeline (0.1.0)
|
5
|
+
rspec (~> 3.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
diff-lcs (1.5.0)
|
12
|
+
json (2.6.2)
|
13
|
+
parallel (1.22.1)
|
14
|
+
parser (3.1.2.1)
|
15
|
+
ast (~> 2.4.1)
|
16
|
+
rainbow (3.1.1)
|
17
|
+
rake (13.0.6)
|
18
|
+
regexp_parser (2.6.0)
|
19
|
+
rexml (3.2.5)
|
20
|
+
rspec (3.12.0)
|
21
|
+
rspec-core (~> 3.12.0)
|
22
|
+
rspec-expectations (~> 3.12.0)
|
23
|
+
rspec-mocks (~> 3.12.0)
|
24
|
+
rspec-core (3.12.0)
|
25
|
+
rspec-support (~> 3.12.0)
|
26
|
+
rspec-expectations (3.12.0)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.12.0)
|
29
|
+
rspec-mocks (3.12.0)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.12.0)
|
32
|
+
rspec-support (3.12.0)
|
33
|
+
rubocop (1.38.0)
|
34
|
+
json (~> 2.3)
|
35
|
+
parallel (~> 1.10)
|
36
|
+
parser (>= 3.1.2.1)
|
37
|
+
rainbow (>= 2.2.2, < 4.0)
|
38
|
+
regexp_parser (>= 1.8, < 3.0)
|
39
|
+
rexml (>= 3.2.5, < 4.0)
|
40
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
41
|
+
ruby-progressbar (~> 1.7)
|
42
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
43
|
+
rubocop-ast (1.23.0)
|
44
|
+
parser (>= 3.1.1.0)
|
45
|
+
ruby-progressbar (1.11.0)
|
46
|
+
unicode-display_width (2.3.0)
|
47
|
+
|
48
|
+
PLATFORMS
|
49
|
+
x86_64-darwin-21
|
50
|
+
|
51
|
+
DEPENDENCIES
|
52
|
+
fluent_pipeline!
|
53
|
+
rake (~> 13.0)
|
54
|
+
rubocop (~> 1.21)
|
55
|
+
|
56
|
+
BUNDLED WITH
|
57
|
+
2.3.25
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# FluentPipeline
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fluent_pipeline`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install the gem and add to the application's Gemfile by executing:
|
10
|
+
|
11
|
+
$ bundle add fluent_pipeline
|
12
|
+
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
|
+
|
15
|
+
$ gem install fluent_pipeline
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
TODO: Write usage instructions here
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
+
|
25
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fluent_pipeline.
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fluent/pipeline/version'
|
4
|
+
|
5
|
+
module Fluent
|
6
|
+
class Pipeline
|
7
|
+
def self.dispatch(passable)
|
8
|
+
new(passable)
|
9
|
+
end
|
10
|
+
|
11
|
+
def through(pipes)
|
12
|
+
self.pipes = pipes
|
13
|
+
self
|
14
|
+
end
|
15
|
+
|
16
|
+
def via(method_name)
|
17
|
+
self.pipe_method = method_name
|
18
|
+
self
|
19
|
+
end
|
20
|
+
|
21
|
+
def then(callback)
|
22
|
+
handle_pipes
|
23
|
+
callback.call(passable)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
attr_accessor :passable, :pipes, :pipe_method
|
29
|
+
|
30
|
+
def initialize(passable)
|
31
|
+
@passable = passable
|
32
|
+
end
|
33
|
+
|
34
|
+
def via_method
|
35
|
+
pipe_method || :call
|
36
|
+
end
|
37
|
+
|
38
|
+
def handle_pipes
|
39
|
+
if pipes.is_a? Array
|
40
|
+
pipes.each do |pipe|
|
41
|
+
self.passable = pipe.send(via_method, passable)
|
42
|
+
end
|
43
|
+
else
|
44
|
+
self.passable = pipes.call(passable)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fluent_pipeline
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Omar Juárez
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: 'Implements a Pipeline that send content through Pipes '
|
28
|
+
email:
|
29
|
+
- okcomputer2393@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".rspec"
|
35
|
+
- ".rubocop.yml"
|
36
|
+
- Gemfile
|
37
|
+
- Gemfile.lock
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- lib/fluent/pipeline.rb
|
41
|
+
- lib/fluent/pipeline/version.rb
|
42
|
+
- sig/fluent_pipeline.rbs
|
43
|
+
homepage: https://github.com/okcomputer93/fluent_pipeline
|
44
|
+
licenses: []
|
45
|
+
metadata: {}
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.6.0
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubygems_version: 3.3.7
|
62
|
+
signing_key:
|
63
|
+
specification_version: 4
|
64
|
+
summary: Pipeline pattern in Ruby. Heavily inspired by Laravel.
|
65
|
+
test_files: []
|