raktr 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +1 -0
- data/LICENSE.md +29 -0
- data/README.md +77 -0
- data/Rakefile +53 -0
- data/lib/raktr/connection/callbacks.rb +71 -0
- data/lib/raktr/connection/error.rb +120 -0
- data/lib/raktr/connection/peer_info.rb +90 -0
- data/lib/raktr/connection/tls.rb +164 -0
- data/lib/raktr/connection.rb +339 -0
- data/lib/raktr/global.rb +24 -0
- data/lib/raktr/iterator.rb +249 -0
- data/lib/raktr/queue.rb +89 -0
- data/lib/raktr/tasks/base.rb +57 -0
- data/lib/raktr/tasks/delayed.rb +33 -0
- data/lib/raktr/tasks/one_off.rb +30 -0
- data/lib/raktr/tasks/periodic.rb +58 -0
- data/lib/raktr/tasks/persistent.rb +29 -0
- data/lib/raktr/tasks.rb +105 -0
- data/lib/raktr/version.rb +13 -0
- data/lib/raktr.rb +707 -0
- data/spec/raktr/connection/tls_spec.rb +348 -0
- data/spec/raktr/connection_spec.rb +74 -0
- data/spec/raktr/iterator_spec.rb +203 -0
- data/spec/raktr/queue_spec.rb +91 -0
- data/spec/raktr/tasks/base.rb +8 -0
- data/spec/raktr/tasks/delayed_spec.rb +71 -0
- data/spec/raktr/tasks/one_off_spec.rb +66 -0
- data/spec/raktr/tasks/periodic_spec.rb +57 -0
- data/spec/raktr/tasks/persistent_spec.rb +54 -0
- data/spec/raktr/tasks_spec.rb +155 -0
- data/spec/raktr_spec.rb +20 -0
- data/spec/raktr_tls_spec.rb +20 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/fixtures/handlers/echo_client.rb +34 -0
- data/spec/support/fixtures/handlers/echo_client_tls.rb +10 -0
- data/spec/support/fixtures/handlers/echo_server.rb +12 -0
- data/spec/support/fixtures/handlers/echo_server_tls.rb +8 -0
- data/spec/support/fixtures/pems/cacert.pem +37 -0
- data/spec/support/fixtures/pems/client/cert.pem +37 -0
- data/spec/support/fixtures/pems/client/foo-cert.pem +39 -0
- data/spec/support/fixtures/pems/client/foo-key.pem +51 -0
- data/spec/support/fixtures/pems/client/key.pem +51 -0
- data/spec/support/fixtures/pems/server/cert.pem +37 -0
- data/spec/support/fixtures/pems/server/key.pem +51 -0
- data/spec/support/helpers/paths.rb +23 -0
- data/spec/support/helpers/utilities.rb +135 -0
- data/spec/support/lib/server_option_parser.rb +29 -0
- data/spec/support/lib/servers/runner.rb +13 -0
- data/spec/support/lib/servers.rb +133 -0
- data/spec/support/servers/echo.rb +14 -0
- data/spec/support/servers/echo_tls.rb +22 -0
- data/spec/support/servers/echo_unix.rb +14 -0
- data/spec/support/servers/echo_unix_tls.rb +22 -0
- data/spec/support/shared/connection.rb +696 -0
- data/spec/support/shared/raktr.rb +834 -0
- data/spec/support/shared/task.rb +21 -0
- metadata +140 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
shared_examples_for 'Raktr::Tasks::Base' do
|
2
|
+
let(:list) { Raktr::Tasks.new }
|
3
|
+
|
4
|
+
it { should respond_to :owner }
|
5
|
+
it { should respond_to :owner= }
|
6
|
+
|
7
|
+
describe '#done' do
|
8
|
+
it 'removes self from the #owner' do
|
9
|
+
list << subject
|
10
|
+
subject.done
|
11
|
+
list.should_not include subject
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#to_proc' do
|
16
|
+
it 'returns the given Block' do
|
17
|
+
subject.to_proc.should be_kind_of Proc
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: raktr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tasos Laskos
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-02-20 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |2
|
14
|
+
Raktr is a simple, lightweight, pure-Ruby implementation of the Reactor
|
15
|
+
pattern, mainly focused on network connections -- and less so on generic tasks.
|
16
|
+
email: tasos.laskos@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files:
|
20
|
+
- README.md
|
21
|
+
- LICENSE.md
|
22
|
+
- CHANGELOG.md
|
23
|
+
files:
|
24
|
+
- CHANGELOG.md
|
25
|
+
- LICENSE.md
|
26
|
+
- README.md
|
27
|
+
- Rakefile
|
28
|
+
- lib/raktr.rb
|
29
|
+
- lib/raktr/connection.rb
|
30
|
+
- lib/raktr/connection/callbacks.rb
|
31
|
+
- lib/raktr/connection/error.rb
|
32
|
+
- lib/raktr/connection/peer_info.rb
|
33
|
+
- lib/raktr/connection/tls.rb
|
34
|
+
- lib/raktr/global.rb
|
35
|
+
- lib/raktr/iterator.rb
|
36
|
+
- lib/raktr/queue.rb
|
37
|
+
- lib/raktr/tasks.rb
|
38
|
+
- lib/raktr/tasks/base.rb
|
39
|
+
- lib/raktr/tasks/delayed.rb
|
40
|
+
- lib/raktr/tasks/one_off.rb
|
41
|
+
- lib/raktr/tasks/periodic.rb
|
42
|
+
- lib/raktr/tasks/persistent.rb
|
43
|
+
- lib/raktr/version.rb
|
44
|
+
- spec/raktr/connection/tls_spec.rb
|
45
|
+
- spec/raktr/connection_spec.rb
|
46
|
+
- spec/raktr/iterator_spec.rb
|
47
|
+
- spec/raktr/queue_spec.rb
|
48
|
+
- spec/raktr/tasks/base.rb
|
49
|
+
- spec/raktr/tasks/delayed_spec.rb
|
50
|
+
- spec/raktr/tasks/one_off_spec.rb
|
51
|
+
- spec/raktr/tasks/periodic_spec.rb
|
52
|
+
- spec/raktr/tasks/persistent_spec.rb
|
53
|
+
- spec/raktr/tasks_spec.rb
|
54
|
+
- spec/raktr_spec.rb
|
55
|
+
- spec/raktr_tls_spec.rb
|
56
|
+
- spec/spec_helper.rb
|
57
|
+
- spec/support/fixtures/handlers/echo_client.rb
|
58
|
+
- spec/support/fixtures/handlers/echo_client_tls.rb
|
59
|
+
- spec/support/fixtures/handlers/echo_server.rb
|
60
|
+
- spec/support/fixtures/handlers/echo_server_tls.rb
|
61
|
+
- spec/support/fixtures/pems/cacert.pem
|
62
|
+
- spec/support/fixtures/pems/client/cert.pem
|
63
|
+
- spec/support/fixtures/pems/client/foo-cert.pem
|
64
|
+
- spec/support/fixtures/pems/client/foo-key.pem
|
65
|
+
- spec/support/fixtures/pems/client/key.pem
|
66
|
+
- spec/support/fixtures/pems/server/cert.pem
|
67
|
+
- spec/support/fixtures/pems/server/key.pem
|
68
|
+
- spec/support/helpers/paths.rb
|
69
|
+
- spec/support/helpers/utilities.rb
|
70
|
+
- spec/support/lib/server_option_parser.rb
|
71
|
+
- spec/support/lib/servers.rb
|
72
|
+
- spec/support/lib/servers/runner.rb
|
73
|
+
- spec/support/servers/echo.rb
|
74
|
+
- spec/support/servers/echo_tls.rb
|
75
|
+
- spec/support/servers/echo_unix.rb
|
76
|
+
- spec/support/servers/echo_unix_tls.rb
|
77
|
+
- spec/support/shared/connection.rb
|
78
|
+
- spec/support/shared/raktr.rb
|
79
|
+
- spec/support/shared/task.rb
|
80
|
+
homepage: https://github.com/qadron/raktr
|
81
|
+
licenses:
|
82
|
+
- BSD 3-Clause
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options:
|
86
|
+
- "--charset=UTF-8"
|
87
|
+
require_paths:
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
requirements: []
|
100
|
+
rubygems_version: 3.3.0.dev
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: A pure-Ruby implementation of the Reactor pattern.
|
104
|
+
test_files:
|
105
|
+
- spec/raktr/connection/tls_spec.rb
|
106
|
+
- spec/raktr/connection_spec.rb
|
107
|
+
- spec/raktr/iterator_spec.rb
|
108
|
+
- spec/raktr/queue_spec.rb
|
109
|
+
- spec/raktr/tasks/base.rb
|
110
|
+
- spec/raktr/tasks/delayed_spec.rb
|
111
|
+
- spec/raktr/tasks/one_off_spec.rb
|
112
|
+
- spec/raktr/tasks/periodic_spec.rb
|
113
|
+
- spec/raktr/tasks/persistent_spec.rb
|
114
|
+
- spec/raktr/tasks_spec.rb
|
115
|
+
- spec/raktr_spec.rb
|
116
|
+
- spec/raktr_tls_spec.rb
|
117
|
+
- spec/spec_helper.rb
|
118
|
+
- spec/support/fixtures/handlers/echo_client.rb
|
119
|
+
- spec/support/fixtures/handlers/echo_client_tls.rb
|
120
|
+
- spec/support/fixtures/handlers/echo_server.rb
|
121
|
+
- spec/support/fixtures/handlers/echo_server_tls.rb
|
122
|
+
- spec/support/fixtures/pems/cacert.pem
|
123
|
+
- spec/support/fixtures/pems/client/cert.pem
|
124
|
+
- spec/support/fixtures/pems/client/foo-cert.pem
|
125
|
+
- spec/support/fixtures/pems/client/foo-key.pem
|
126
|
+
- spec/support/fixtures/pems/client/key.pem
|
127
|
+
- spec/support/fixtures/pems/server/cert.pem
|
128
|
+
- spec/support/fixtures/pems/server/key.pem
|
129
|
+
- spec/support/helpers/paths.rb
|
130
|
+
- spec/support/helpers/utilities.rb
|
131
|
+
- spec/support/lib/server_option_parser.rb
|
132
|
+
- spec/support/lib/servers/runner.rb
|
133
|
+
- spec/support/lib/servers.rb
|
134
|
+
- spec/support/servers/echo.rb
|
135
|
+
- spec/support/servers/echo_tls.rb
|
136
|
+
- spec/support/servers/echo_unix.rb
|
137
|
+
- spec/support/servers/echo_unix_tls.rb
|
138
|
+
- spec/support/shared/connection.rb
|
139
|
+
- spec/support/shared/raktr.rb
|
140
|
+
- spec/support/shared/task.rb
|