celluloid 0.18.0.pre2 → 0.18.0

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: 901d303444b94a61e2b4faaf1e957ae442acd5ae2ae0864f9c0fd7af7dbfbe46
4
- data.tar.gz: ff7fc82458f6b591a74fbc59d329db9082f195f466c9be7be12dec1c8073d621
3
+ metadata.gz: fede4c9c3907c29a0dc303e711077a7b3196fc2acaf3b099ee98b197076c3fdc
4
+ data.tar.gz: f8bd8ffc37cddd24000d66e56d1bafc03796e309101fa4b6f5e02ab5e11f9aac
5
5
  SHA512:
6
- metadata.gz: 71f12fd99271e598bf0e125b1ce44f5b1bc420b34dfabdabb64e80f38e8736c54a5295f6d9ecfcfbdcfde78a10bc79388dba4a18a0b7873415ed86050cc76420
7
- data.tar.gz: 834996dba23ffde88d9970cd86bb0e5b6975f7658867d3f0f1d2eaba88ab1ebf0b45cc5847a63b11af0df390cab680be94aeb25d0bb5c791f6e997bd172dadf6
6
+ metadata.gz: dc813a35e9f74a49a0f875d290e41fe6445dfd7f6778b46bd3e19b741446c590e1b05be2bc697e6d8641548165baee2494a49960fa7e3782f71b50a13cb50ee1
7
+ data.tar.gz: 9a47f043d4929f833b05187c88a487351e4f26da10038b1045497ed3c7e0fdf980e4b5fe753d7cc4ae1f2db70d0d5fe5966520e2bdff5f08a558c62d82c12fee
data/CHANGES.md CHANGED
@@ -1,6 +1,150 @@
1
- ## 0.18.0.pre2 (Final release TBD)
1
+ ## 0.18.0 (2020-12-05)
2
2
 
3
- * TODO (before 0.18.0 final): release notes
3
+ [0.18.0]: https://github.com/celluloid/celluloid/compare/v0.17.3...v0.18.0
4
+
5
+ * [#804](https://github.com/celluloid/celluloid/pull/804)
6
+ Remove deprecation warnings
7
+
8
+ * [#802](https://github.com/celluloid/celluloid/pull/802)
9
+ Remove lattice link itself.
10
+
11
+ * [#797](https://github.com/celluloid/celluloid/pull/797)
12
+ Update Ruby versions in CI script
13
+
14
+ * [#801](https://github.com/celluloid/celluloid/pull/801)
15
+ Associate Open Collective sponsorship option
16
+
17
+ * [#800](https://github.com/celluloid/celluloid/pull/800)
18
+ Streamline README
19
+
20
+ * [#799](https://github.com/celluloid/celluloid/pull/799)
21
+ Update links, add diagram preview.
22
+
23
+ * [#796](https://github.com/celluloid/celluloid/pull/796)
24
+ Create Class Diagram in Draw.io
25
+
26
+ * [#798](https://github.com/celluloid/celluloid/pull/798)
27
+ Pertinent Newsflash
28
+
29
+ * [#792](https://github.com/celluloid/celluloid/pull/792)
30
+ CI: 2.5.5, 2.6.2
31
+
32
+ * [#788](https://github.com/celluloid/celluloid/pull/788)
33
+ Travis: Include Ruby 2.5, 2.6
34
+
35
+ * [#787](https://github.com/celluloid/celluloid/pull/787)
36
+ Travis config: drop old configuration sudo: false
37
+
38
+ * [#786](https://github.com/celluloid/celluloid/pull/786)
39
+ Travis: use jruby-9.2.5.0
40
+
41
+ * [#783](https://github.com/celluloid/celluloid/pull/783)
42
+ v0.18.0.pre2
43
+
44
+ * [#782](https://github.com/celluloid/celluloid/pull/782)
45
+ Merge 'celluloid-supervision' back into the tree
46
+
47
+ * [#781](https://github.com/celluloid/celluloid/pull/781)
48
+ .gitmodules: No longer used
49
+
50
+ * [#780](https://github.com/celluloid/celluloid/pull/780)
51
+ README.md: Link to unmaintained issue
52
+
53
+ * [#778](https://github.com/celluloid/celluloid/pull/778)
54
+ README.md: Add "maintained: no! (as of 2016)" badge
55
+
56
+ * [#777](https://github.com/celluloid/celluloid/pull/777)
57
+ gemspec: Metadata with supported links
58
+
59
+ * [#776](https://github.com/celluloid/celluloid/pull/776)
60
+ Travis: use jruby-9.2.0.0
61
+
62
+ * [#775](https://github.com/celluloid/celluloid/pull/775)
63
+ Travis: jruby-9.1.17.0
64
+
65
+ * [#769](https://github.com/celluloid/celluloid/pull/769)
66
+ Travis: jruby-9.1.15.0
67
+
68
+ * [#768](https://github.com/celluloid/celluloid/pull/768)
69
+ Travis: use latest JRuby
70
+
71
+ * [#767](https://github.com/celluloid/celluloid/pull/767)
72
+ CHANGES: Add GitHub compare link on each heading
73
+
74
+ * [#766](https://github.com/celluloid/celluloid/pull/766)
75
+ Fix celluloid/celluloid#758
76
+
77
+ * [#765](https://github.com/celluloid/celluloid/pull/765)
78
+ Travis: jruby-9.1.13.0
79
+
80
+ * [#761](https://github.com/celluloid/celluloid/pull/761)
81
+ Travis: jruby-9.1.12.0
82
+
83
+ * [#760](https://github.com/celluloid/celluloid/pull/760)
84
+ Travis: jruby-9.1.10.0
85
+
86
+ * [#759](https://github.com/celluloid/celluloid/pull/759)
87
+ Travis: jruby-9.1.9.0
88
+
89
+ * [#757](https://github.com/celluloid/celluloid/pull/757)
90
+ parameterize error message so old and new Rubies match text
91
+
92
+ * [#756](https://github.com/celluloid/celluloid/pull/756)
93
+ Travis: latest stable rubies
94
+
95
+ * [#754](https://github.com/celluloid/celluloid/pull/754)
96
+ README: Fix badge rendering in Markdown
97
+
98
+ * [#753](https://github.com/celluloid/celluloid/pull/753)
99
+ Travis: use jruby-9.1.8.0
100
+
101
+ * [#752](https://github.com/celluloid/celluloid/pull/752)
102
+ Misspellings
103
+
104
+ * [#749](https://github.com/celluloid/celluloid/pull/749)
105
+ Return false from Celluloid.running? if Celluloid.boot hasn't been called
106
+
107
+ * [#751](https://github.com/celluloid/celluloid/pull/751)
108
+ Travis: Use JRuby 9.1.7.0
109
+
110
+ * [#740](https://github.com/celluloid/celluloid/pull/740)
111
+ Global variables: stop the bleeding
112
+
113
+ * [#739](https://github.com/celluloid/celluloid/pull/739)
114
+ Remove hacks around old MRIs, JRuby, and rbx
115
+
116
+ * [#738](https://github.com/celluloid/celluloid/pull/738)
117
+ Update to RuboCop 0.45.0 (with new rubocop.yml policy)
118
+
119
+ * [#737](https://github.com/celluloid/celluloid/pull/737)
120
+ Simplify dependencies: merge 'essentials' and 'culture' repos
121
+
122
+ * [#736](https://github.com/celluloid/celluloid/pull/736)
123
+ Remove $CELLULOID_BACKPORTED and $CELLULOID_MANAGED
124
+
125
+ * [#735](https://github.com/celluloid/celluloid/pull/735)
126
+ Require Ruby 2.2.6+
127
+
128
+ * [#729](https://github.com/celluloid/celluloid/pull/729)
129
+ Remove mysterious Fiber.yield
130
+
131
+ * [#721](https://github.com/celluloid/celluloid/pull/721)
132
+ Instruction for cloning Celluloid via github
133
+
134
+ * [#715](https://github.com/celluloid/celluloid/pull/715)
135
+ fix error response reference in Future#cancel
136
+
137
+ * [#712](https://github.com/celluloid/celluloid/pull/712)
138
+ Add RBX-3 to the build
139
+
140
+ * [#711](https://github.com/celluloid/celluloid/pull/711)
141
+ Added bundler cache
142
+
143
+ * [#709](https://github.com/celluloid/celluloid/pull/709)
144
+ Fix autostart. Fixes https://github.com/celluloid/celluloid/issues/698
145
+
146
+ * [#705](https://github.com/celluloid/celluloid/pull/705)
147
+ Adding method source code path to backtrace
4
148
 
5
149
  ## [0.17.3] (2016-01-18)
6
150
 
data/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
  [![MIT licensed][license-image]][license-link]
5
5
  [![Build Status][build-image]][build-link]
6
6
  [![Maintained: no][maintained-image]][maintained-link]
7
+ [![Gitter Chat][gitter-image]][gitter-link]
7
8
 
8
9
  [celluloid-logo-image-raw]: https://raw.github.com/celluloid/celluloid-logos/master/celluloid/celluloid.png
9
10
  [gem-image]: https://badge.fury.io/rb/celluloid.svg
@@ -14,92 +15,29 @@
14
15
  [license-link]: https://github.com/celluloid/celluloid/blob/master/LICENSE.txt
15
16
  [maintained-image]: https://img.shields.io/maintenance/no/2016.svg
16
17
  [maintained-link]: https://github.com/celluloid/celluloid/issues/779
18
+ [gitter-image]: https://badges.gitter.im/badge.svg
19
+ [gitter-link]: https://gitter.im/celluloid/celluloid
17
20
 
18
- _NOTE: This is the 0.18.x **development** branch of Celluloid. For the 0.17.x
19
- **stable** branch, please see:_
20
-
21
- https://github.com/celluloid/celluloid/tree/0-17-stable
22
-
23
- > "I thought of objects being like biological cells and/or individual
24
- > computers on a network, only able to communicate with messages"
25
- > _--Alan Kay, creator of Smalltalk, on the meaning of "object oriented programming"_
26
-
27
- Celluloid provides a simple and natural way to build fault-tolerant concurrent
28
- programs in Ruby. With Celluloid, you can build systems out of concurrent
29
- objects just as easily as you build sequential programs out of regular objects.
30
- Recommended for any developer, including novices, Celluloid should help ease
31
- your worries about building multithreaded Ruby programs.
32
-
33
- ## Motivation
34
-
35
- Much of the difficulty with building concurrent programs in Ruby arises because
36
- the object-oriented mechanisms for structuring code, such as classes and
37
- inheritance, are separate from the concurrency mechanisms, such as threads and
38
- locks. Celluloid combines these into a single structure, an active object
39
- running within a thread, called an "actor", or in Celluloid vernacular, a "cell".
40
-
41
- By combining concurrency with object oriented programming, Celluloid frees you
42
- up from worry about where to use threads and locks. Celluloid combines them
43
- together into a single concurrent object oriented programming model,
44
- encapsulating state in concurrent objects and thus avoiding many of the
45
- problems associated with multithreaded programming. Celluloid provides many
46
- features which make concurrent programming simple, easy, and fun:
47
-
48
- * __Automatic "deadlock-free" synchronization:__ Celluloid uses a concurrent
49
- object model which combines method dispatch and thread synchronization.
50
- Each actor is a concurrent object running in its own thread, and every method
51
- invocation is wrapped in a fiber that can be suspended whenever it calls
52
- out to other actors, and resumed when the response is available. This means
53
- methods which are waiting for responses from other actors, external messages,
54
- or other system events (including I/O with Celluloid::IO) can be suspended
55
- and will never block other methods that are ready to run. This won't prevent
56
- bugs in Celluloid, bugs in other thread-safe libraries you use, and even
57
- certain "dangerous" features of Celluloid from causing your program to
58
- deadlock, but in general, programs built with Celluloid will be naturally
59
- immune to deadlocks.
60
-
61
- * __Fault-tolerance:__ Celluloid has taken to heart many of Erlang's ideas
62
- about fault-tolerance in order to enable self-healing applications.
63
- The central idea: have you tried turning it off and on again? Celluloid
64
- takes care of rebooting subcomponents of your application when they crash,
65
- whether it's a single actor, or large (potentially multi-tiered) groups of
66
- actors that are all interdependent. This means rather than worrying about
67
- rescuing every last exception, you can just sit back, relax, and let parts
68
- of your program crash, knowing Celluloid will automatically reboot them in
69
- a clean state. Celluloid provides its own implementation of the core
70
- fault-tolerance concepts in Erlang including [linking](https://github.com/celluloid/celluloid/wiki/Linking),
71
- [supervisors](https://github.com/celluloid/celluloid/wiki/Supervisors),
72
- and [supervision groups](https://github.com/celluloid/celluloid/wiki/Supervision-Groups).
73
-
74
- * __[Futures](https://github.com/celluloid/celluloid/wiki/futures):__
75
- Ever wanted to call a method "in the background" and retrieve the
76
- value it returns later? Celluloid futures do just that. It's like
77
- calling ahead to a restaurant to place an order, so they can work
78
- on preparing your food while you're on your way to pick it up.
79
- When you ask for a method's return value, it's returned immediately
80
- if the method has already completed, or otherwise the current method is
81
- suspended until the value becomes available.
82
-
83
- You can also build distributed systems with Celluloid using its
84
- [sister project DCell](https://github.com/celluloid/dcell). Evented IO similar
85
- to EventMachine (with a synchronous API instead of callback/deferrable soup)
86
- is available through the [Celluloid::IO](https://github.com/celluloid/celluloid-io)
87
- library.
88
-
89
- ### Is it any good?
90
-
91
- [Yes](http://news.ycombinator.com/item?id=3067434)
92
-
93
- ### Is It "Production Ready™"?
94
-
95
- Yes, many users are now running Celluloid in production.
96
-
97
- * **See:** [Projects Using Celluloid](https://github.com/celluloid/celluloid/wiki/Projects-Using-Celluloid)
21
+ Celluloid is a framework for building asynchronous and multithreaded Ruby
22
+ programs using object-oriented concepts.
23
+
24
+ ## Revival Process Underway
25
+
26
+ `Celluloid` is in the process of being refactored and released back into the wild during `Google Summer of Code`. The next era will not have one individual active maintainer, but a team of collaborators. Going forward, previously dormant maintainer [Donovan Keme](https://github.com/digitalextremist) is returning to support future primary maintainer [Emese Padányi](https://github.com/emesepadanyi) during `GSoC 2020`. Her plan extends past the Summer program, and aims to revive the community and codebase of `Celluloid` together. Backing this process are [Harsh Deep](https://github.com/harsh183) and `GSoC` alumni [Dilum Navanjana](https://github.com/dilumn). We welcome your collaboration and contributions in this massive work.
27
+
28
+ The codebase is being refactored to pursue a stable release with no deprecation warnings, and with this cleaned up:
29
+
30
+ # ![Diagram][celluloid-diagram]
31
+ *Diagram meticulously developed by [Emese Padányi](https://github.com/emesepadanyi)*
32
+
33
+ [celluloid-diagram]: https://raw.githubusercontent.com/celluloid/celluloid/master/documentation/ClassDiagram-class_diagram.png
34
+
35
+ ### Proudly supported by the best cloud infrastructure provider in the world: [`DigitalOcean`](https://digitalocean.com)
98
36
 
99
37
  ## Discussion
100
38
 
101
- Like Celluloid? [Join the mailing list/Google Group](http://groups.google.com/group/celluloid-ruby)
102
- or visit us on IRC at #celluloid on freenode
39
+ - [Gitter Chat][gitter-link]
40
+ - [Google Group](https://groups.google.com/group/celluloid-ruby)
103
41
 
104
42
  ## Documentation
105
43
 
@@ -115,8 +53,7 @@ The following API documentation is also available:
115
53
 
116
54
  ## Related Projects
117
55
 
118
- Celluloid is the parent project of a related ecosystem of other projects. If you
119
- like Celluloid we definitely recommend you check them out:
56
+ See also: [Projects Using Celluloid](https://github.com/celluloid/celluloid/wiki/Projects-Using-Celluloid)
120
57
 
121
58
  * [Reel][reel]: An "evented" web server based on `Celluloid::IO`
122
59
  * [DCell][dcell]: The Celluloid actor protocol distributed over 0MQ
@@ -125,80 +62,28 @@ like Celluloid we definitely recommend you check them out:
125
62
  * [Celluloid::ZMQ][celluloid-zmq]: "Evented" 0MQ support for `Celluloid` actors
126
63
  * [Celluloid::DNS][celluloid-dns]: An "evented" DNS server based on `Celluloid::IO`
127
64
  * [Celluloid::SMTP][celluloid-smtp]: An "evented" SMTP server based on `Celluloid::IO`
128
- * [Lattice][lattice]: A concurrent realtime web framework based on `Celluloid::IO`
129
65
  * [nio4r][nio4r]: "New IO for Ruby": high performance IO selectors
130
66
  * [Timers][timers]: A generic Ruby timer library for event-based systems
131
67
 
132
68
  [reel]: https://github.com/celluloid/reel/
133
69
  [dcell]: https://github.com/celluloid/dcell/
134
- [ecell]: https://github.com/celluloid/ecell/
70
+ [ecell]: https://github.com/abstractive/ecell/
135
71
  [celluloid-io]: https://github.com/celluloid/celluloid-io/
136
72
  [celluloid-zmq]: https://github.com/celluloid/celluloid-zmq/
137
73
  [celluloid-dns]: https://github.com/celluloid/celluloid-dns/
138
- [celluloid-smtp]: https://github.com/celluloid/celluloid-smtp/
139
- [lattice]: https://github.com/celluloid/lattice/
74
+ [celluloid-smtp]: https://github.com/abstractive/celluloid-smtp/
140
75
  [nio4r]: https://github.com/celluloid/nio4r/
141
76
  [timers]: https://github.com/celluloid/timers/
142
77
 
143
- ## Installation
144
-
145
- Add this line to your application's Gemfile:
146
-
147
- gem 'celluloid'
148
-
149
- And then execute:
150
-
151
- $ bundle
152
-
153
- Or install it yourself as:
154
-
155
- $ gem install celluloid
156
-
157
- Require Celluloid with:
158
-
159
- require 'celluloid'
160
-
161
- ## Supported Platforms
162
-
163
- This library aims to support and is [tested against][travis] the following Ruby
164
- versions:
165
-
166
- * Ruby 2.2.6+
167
- * Ruby 2.3.0+
168
- * JRuby 9.1.6.0+
169
-
170
- If something doesn't work on one of these versions, it's a bug.
171
-
172
- This library may inadvertently work (or seem to work) on other Ruby versions,
173
- however support will only be provided for the versions listed above.
174
-
175
- If you would like this library to support another Ruby version or
176
- implementation, you may volunteer to be a maintainer. Being a maintainer
177
- entails making sure all tests run and pass on that implementation. When
178
- something breaks on your implementation, you will be responsible for providing
179
- patches in a timely fashion. If critical issues for a particular implementation
180
- exist at the time of a major release, support for that Ruby version may be
181
- dropped.
182
-
183
- [travis]: http://travis-ci.org/celluloid/celluloid/
184
-
185
- ## Additional Reading
186
-
187
- * [Concurrent Object-Oriented Programming in Python with ATOM][ATOM]
188
- a similar system to Celluloid written in Python
189
-
190
- [ATOM]: http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=11A3EACE78AAFF6D6D62A64118AFCA7C?doi=10.1.1.47.5074&rep=rep1&type=pdf
191
-
192
78
  ## Contributing to Celluloid
193
79
 
194
- * Fork this repository on github
195
- * Make your changes and send us a pull request
196
- * If we like them we'll merge them
197
- * If we've accepted a patch, feel free to ask for commit access
80
+ - Fork this repository on github
81
+ - Make your changes and send us a pull request
82
+ - Pull requests will be reviewed for inclusion in the project
198
83
 
199
84
  ## License
200
85
 
201
- Copyright (c) 2011-2016 Tony Arcieri, Donovan Keme.
86
+ Copyright (c) 2011-2018 Tony Arcieri, Donovan Keme.
202
87
 
203
88
  Distributed under the MIT License. See [LICENSE.txt](https://github.com/celluloid/celluloid/blob/master/LICENSE.txt)
204
89
  for further details.
@@ -0,0 +1 @@
1
+ 20200703113000: `require "celluloid/current"` is removed. use `require "celluloid"`
@@ -1,4 +1,4 @@
1
- require "celluloid/current"
1
+ require "celluloid"
2
2
 
3
3
  puts "Use Supervision::Configuration objects!"
4
4
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  $LOAD_PATH.push File.expand_path("../lib", __dir__)
4
- require "celluloid/current"
4
+ require "celluloid"
5
5
 
6
6
  class TimerExample
7
7
  include Celluloid
@@ -1,3 +1,3 @@
1
1
  module Celluloid
2
- VERSION = "0.18.0.pre2".freeze
2
+ VERSION = "0.18.0".freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0.pre2
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  - Donovan Keme
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-28 00:00:00.000000000 Z
12
+ date: 2020-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: timers
@@ -39,6 +39,7 @@ files:
39
39
  - CONTRIBUTING.md
40
40
  - LICENSE.txt
41
41
  - README.md
42
+ - REFACTOR.md
42
43
  - architecture.md
43
44
  - examples/basic_usage.rb
44
45
  - examples/configurations.rb
@@ -52,7 +53,6 @@ files:
52
53
  - lib/celluloid/actor.rb
53
54
  - lib/celluloid/actor/system.rb
54
55
  - lib/celluloid/autostart.rb
55
- - lib/celluloid/backported.rb
56
56
  - lib/celluloid/call/async.rb
57
57
  - lib/celluloid/call/block.rb
58
58
  - lib/celluloid/call/sync.rb
@@ -60,7 +60,6 @@ files:
60
60
  - lib/celluloid/cell.rb
61
61
  - lib/celluloid/condition.rb
62
62
  - lib/celluloid/core_ext.rb
63
- - lib/celluloid/current.rb
64
63
  - lib/celluloid/debug.rb
65
64
  - lib/celluloid/exceptions.rb
66
65
  - lib/celluloid/future.rb
@@ -93,7 +92,6 @@ files:
93
92
  - lib/celluloid/logging/ring_buffer.rb
94
93
  - lib/celluloid/mailbox.rb
95
94
  - lib/celluloid/mailbox/evented.rb
96
- - lib/celluloid/managed.rb
97
95
  - lib/celluloid/notifications.rb
98
96
  - lib/celluloid/pool.rb
99
97
  - lib/celluloid/probe.rb
@@ -118,10 +116,6 @@ files:
118
116
  - lib/celluloid/supervision/container/injections.rb
119
117
  - lib/celluloid/supervision/container/instance.rb
120
118
  - lib/celluloid/supervision/container/pool.rb
121
- - lib/celluloid/supervision/container/tree.rb
122
- - lib/celluloid/supervision/deprecate.rb
123
- - lib/celluloid/supervision/deprecate/supervise.rb
124
- - lib/celluloid/supervision/deprecate/validation.rb
125
119
  - lib/celluloid/supervision/service.rb
126
120
  - lib/celluloid/supervision/supervise.rb
127
121
  - lib/celluloid/supervision/validation.rb
@@ -201,7 +195,7 @@ metadata:
201
195
  mailing_list_uri: http://groups.google.com/group/celluloid-ruby
202
196
  source_code_uri: https://github.com/celluloid/celluloid
203
197
  wiki_uri: https://github.com/celluloid/celluloid/wiki
204
- post_install_message:
198
+ post_install_message:
205
199
  rdoc_options: []
206
200
  require_paths:
207
201
  - lib
@@ -216,9 +210,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
210
  - !ruby/object:Gem::Version
217
211
  version: 2.0.0
218
212
  requirements: []
219
- rubyforge_project:
220
- rubygems_version: 2.7.4
221
- signing_key:
213
+ rubygems_version: 3.1.2
214
+ signing_key:
222
215
  specification_version: 4
223
216
  summary: Actor-based concurrent object framework for Ruby
224
217
  test_files: []
@@ -1,6 +0,0 @@
1
- raise NotImplementedError, <<-MSG.strip.gsub(/\s+/, " ")
2
- Celluloid 0.18 no-longer supports the "backported" API.
3
- Please switch to using: `require 'celluloid'`
4
- For more information, see:
5
- https://github.com/celluloid/celluloid/wiki/0.18-API-changes
6
- MSG
@@ -1,4 +0,0 @@
1
- # Legacy support for the prescribed 0.17 API
2
- # TODO: remove this in a future release
3
-
4
- require "celluloid"
@@ -1,6 +0,0 @@
1
- raise NotImplementedError, <<-MSG.strip.gsub(/\s+/, " ")
2
- Celluloid 0.18 no-longer supports the "managed" API.
3
- Please switch to using: `require 'celluloid'`
4
- For more information, see:
5
- https://github.com/celluloid/celluloid/wiki/0.18-API-changes
6
- MSG
@@ -1,9 +0,0 @@
1
- # TODO: Remove at 0.19.0
2
- module Celluloid
3
- SupervisionGroup = Supervision::Container
4
- Supervision::Group = Supervision::Container
5
- Supervision::Member = Supervision::Container::Instance
6
- end
7
-
8
- require "celluloid/supervision/deprecate/supervise"
9
- require "celluloid/supervision/deprecate/validation"
@@ -1,105 +0,0 @@
1
- # TODO: Remove at 0.19.0
2
- module Celluloid
3
- class << self
4
- undef supervise rescue nil
5
- def supervise(*args, &block)
6
- supervisor = Supervision.router(*args)
7
- supervisor.supervise(*args, &block)
8
- end
9
- undef supervise_as rescue nil
10
- def supervise_as(name, *args, &block)
11
- supervisor = Supervision.router(*args)
12
- supervisor.supervise_as(name, *args, &block)
13
- end
14
- end
15
- module ClassMethods
16
- undef supervise rescue nil
17
- def supervise(*args, &block)
18
- args.unshift(self)
19
- Celluloid.supervise(*args, &block)
20
- end
21
- undef supervise_as rescue nil
22
- def supervise_as(name, *args, &block)
23
- args.unshift(self)
24
- Celluloid.supervise_as(name, *args, &block)
25
- end
26
- end
27
-
28
- # Supervisors are actors that watch over other actors and restart them if
29
- # they crash
30
- class Supervisor
31
- class << self
32
- # Define the root of the supervision tree
33
- attr_accessor :root
34
-
35
- undef supervise rescue nil
36
- def supervise(klass, *args, &block)
37
- args.unshift(klass)
38
- Celluloid.supervise(*args, &block)
39
- end
40
-
41
- undef supervise_as rescue nil
42
- def supervise_as(name, klass, *args, &block)
43
- args.unshift(klass)
44
- Celluloid.supervise_as(name, *args, &block)
45
- end
46
- end
47
- end
48
-
49
- module Supervision
50
- class << self
51
- undef router rescue nil
52
- def router(*_args)
53
- # TODO: Actually route, based on :branch, if present; or else:
54
- Celluloid.services
55
- end
56
- end
57
- class Container
58
- class << self
59
- undef run! rescue nil
60
- def run!(*args)
61
- container = new(*args) do |g|
62
- blocks.each do |block|
63
- block.call(g)
64
- end
65
- end
66
- container
67
- end
68
-
69
- undef run rescue nil
70
- def run(*args)
71
- loop do
72
- supervisor = run!(*args)
73
- # Take five, toplevel supervisor
74
- sleep 5 while supervisor.alive? # Why 5?
75
- Internals::Logger.error "!!! Celluloid::Supervision::Container #{self} crashed. Restarting..."
76
- end
77
- end
78
-
79
- undef supervise rescue nil
80
- def supervise(*args, &block)
81
- blocks << lambda do |container|
82
- container.supervise(*args, &block)
83
- end
84
- end
85
-
86
- undef supervise_as rescue nil
87
- def supervise_as(name, *args, &block)
88
- blocks << lambda do |container|
89
- container.supervise_as(name, *args, &block)
90
- end
91
- end
92
- end
93
-
94
- undef supervise rescue nil
95
- def supervise(*args, &block)
96
- add(Configuration.options(args, block: block))
97
- end
98
-
99
- undef supervise_as rescue nil
100
- def supervise_as(name, *args, &block)
101
- add(Configuration.options(args, block: block, as: name))
102
- end
103
- end
104
- end
105
- end
@@ -1,54 +0,0 @@
1
- module Celluloid
2
- module Supervision
3
- class Configuration
4
- class << self
5
- # argument scenarios:
6
- # * only class ( becomes :type )
7
- # * class ( becomes :type ), hash*
8
- # * hash ( *with :type, and perhaps :as, :size, :args, :block, :registry )
9
- # ( any keys expected are pulled out: may want to check on arity? )
10
- # ( the pulling out of keys is where danger mentioned above comes )
11
- undef parse rescue nil
12
- def parse(args)
13
- return args if args.is_a? Configuration::Instance
14
- options = { args: [] }
15
- return { type: args } if args.is_a? Class
16
- if args.is_a? Hash
17
- return args
18
- elsif args.is_a? Array
19
- if args.length == 1
20
- return args[0] if args.first.is_a? Configuration::Instance
21
- return { type: args.first } if args.first.is_a? Class
22
- if args.first.is_a?(Hash) && args = args.pop
23
- return args
24
- end
25
- options[:args] = args if args.any?
26
- elsif args.length > 1
27
- # TODO: don't use each
28
- options.merge! args.pop if args.last.is_a? Hash
29
- options[:type] = args.shift if args.first.is_a? Class
30
- options[:args] += args if args.any?
31
- end
32
- end
33
- options
34
- end
35
-
36
- # This is dangerous. It is temporary, until `Supervision::Configuration` is entrenched.
37
- # Since :type, :as, etc are used by the supervision group/member to initialize,
38
- # those will not appear in the resulting actor's initialize call.
39
- undef options rescue nil
40
- def options(args, options = {})
41
- return args.merge!(options) if args.is_a? Configuration::Instance
42
- # Not a Supervision:Configuration?
43
- # Try to guess its structure and build one:
44
- options = parse(args).merge(options)
45
- options[:configuration] = Container::Behavior.configure(options)
46
- options[:args].compact! if options[:args].is_a? Array
47
- options.reject! { |_k, v| v.nil? }
48
- Configuration.valid? options, true
49
- options
50
- end
51
- end
52
- end
53
- end
54
- end