tiny_conveyor 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG +16 -0
- data/Gemfile +6 -1
- data/LICENSE +9 -0
- data/lib/tiny_conveyor/belt.rb +6 -3
- data/tiny_conveyor.gemspec +4 -3
- metadata +22 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43ccb17a9893acecd87d34ac4559a152947d2d4eb68c9d639abbdb5c8405702b
|
4
|
+
data.tar.gz: d393208b207a6876e408c8630d4c9e9052ab3df96a16d14d80107525ab8c23a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbaf6335d794d082dd81807295fc569b386b921fc6bd948859250974a046bef23ab10322fc3fc34f6f14f9ac65bcd7be3f813df1ae384bf7053716f6f85f7128
|
7
|
+
data.tar.gz: d4417aa9c10cb5d4494a891026ba8ff9979d638c325c69aad6b580d6404a1114477bf0d04a3bef321ba5543e16e57d7fe0a78c163ba0ce30f0511626c6786eb0
|
data/.gitignore
CHANGED
data/CHANGELOG
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
## [0.1.0] - 2021-12-17
|
9
|
+
### Changed
|
10
|
+
- Project url
|
11
|
+
- Use Async instead of concurrent
|
12
|
+
|
13
|
+
|
14
|
+
## [0.0.2] - 2021-06-13
|
15
|
+
### Fixed
|
16
|
+
- Fix the execute method of the Belt class
|
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright © 2021 Florian Girardo
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/tiny_conveyor/belt.rb
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
module TinyConveyor
|
4
4
|
# Thread manager, allow creation and execution of parcels
|
5
5
|
class Belt
|
6
|
-
require '
|
7
|
-
include Concurrent::Async
|
6
|
+
require 'async'
|
8
7
|
attr_reader :parcels
|
9
8
|
|
10
9
|
# @return [Belt] newly created belt
|
@@ -34,7 +33,11 @@ module TinyConveyor
|
|
34
33
|
end
|
35
34
|
|
36
35
|
def start_belt
|
37
|
-
|
36
|
+
Async::Reactor.run do |task|
|
37
|
+
task.async do
|
38
|
+
run_belt_entirely
|
39
|
+
end
|
40
|
+
end
|
38
41
|
end
|
39
42
|
|
40
43
|
def run_belt_entirely
|
data/tiny_conveyor.gemspec
CHANGED
@@ -4,7 +4,7 @@ require 'English'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'tiny_conveyor'
|
7
|
-
s.version = '0.0
|
7
|
+
s.version = '0.1.0'
|
8
8
|
s.required_ruby_version = '>= 2.0.0'
|
9
9
|
s.required_rubygems_version = '>= 1.8.11'
|
10
10
|
s.summary = 'Tiny wrapper aroung concurent ruby to create a queue of tasks'
|
@@ -15,9 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
end
|
16
16
|
s.require_paths = ['lib']
|
17
17
|
s.homepage =
|
18
|
-
'https://
|
18
|
+
'https://git.sr.ht/~pouet/tiny_conveyor'
|
19
19
|
s.license = 'MIT'
|
20
|
-
s.add_dependency '
|
20
|
+
s.add_dependency 'async', '~> 1.2'
|
21
21
|
s.add_development_dependency('rspec', '~> 3')
|
22
|
+
s.add_development_dependency('rubocop', '~> 1.22')
|
22
23
|
s.add_development_dependency('yard', '~> 0.9')
|
23
24
|
end
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_conveyor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flo Girardo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: async
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.1.5
|
19
|
+
version: '1.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.1.5
|
26
|
+
version: '1.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rspec
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,6 +38,20 @@ dependencies:
|
|
44
38
|
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
40
|
version: '3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.22'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.22'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: yard
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +74,9 @@ extra_rdoc_files: []
|
|
66
74
|
files:
|
67
75
|
- ".gitignore"
|
68
76
|
- ".rspec"
|
77
|
+
- CHANGELOG
|
69
78
|
- Gemfile
|
79
|
+
- LICENSE
|
70
80
|
- README.md
|
71
81
|
- doc/TinyConveyor.html
|
72
82
|
- doc/TinyConveyor/Belt.html
|
@@ -91,7 +101,7 @@ files:
|
|
91
101
|
- lib/tiny_conveyor/belt.rb
|
92
102
|
- lib/tiny_conveyor/parcel.rb
|
93
103
|
- tiny_conveyor.gemspec
|
94
|
-
homepage: https://
|
104
|
+
homepage: https://git.sr.ht/~pouet/tiny_conveyor
|
95
105
|
licenses:
|
96
106
|
- MIT
|
97
107
|
metadata: {}
|