django_signal 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +21 -0
- data/README.md +41 -0
- metadata +4 -2
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT LICENSE
|
2
|
+
|
3
|
+
Copyright (c) Paulo Köch <paulo.koch@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Django Signal
|
2
|
+
|
3
|
+
Because I really wanted something similar to Django's Signal in Ruby.
|
4
|
+
|
5
|
+
The Observable module was almost, but not entirely, not over engineered.
|
6
|
+
|
7
|
+
* It made me have an object as the observer, not just a generic callable.
|
8
|
+
* It's not a self standing class. It has to be included by someone.
|
9
|
+
* Solution is not obvious if an object has various observable concerns.
|
10
|
+
* <code>add_observer</code> had everything to cause me reload problems.
|
11
|
+
|
12
|
+
## But, will this work as I expect?
|
13
|
+
|
14
|
+
First of all, I obviously didn't wire this signals to ActiveRecord.
|
15
|
+
|
16
|
+
Also, I took the liberty to make some adaptations. Namely:
|
17
|
+
|
18
|
+
* No explicit weakref stuff. Want a weakref? Build if yourself.
|
19
|
+
Invalid refs are handled gracefuly. Check the tests.
|
20
|
+
* No providing_args, since they had no functional relevance.
|
21
|
+
|
22
|
+
## Installation
|
23
|
+
|
24
|
+
Just add it to your projects' `Gemfile`:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem "django_signal"
|
28
|
+
```
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
https://docs.djangoproject.com/en/dev/topics/signals/#defining-and-sending-signals
|
33
|
+
|
34
|
+
## Credits
|
35
|
+
|
36
|
+
* https://code.djangoproject.com/svn/django/trunk/django/dispatch/dispatcher.py
|
37
|
+
* Gonçalo Silva (@goncalossilva) for teaching me how to cut gems.
|
38
|
+
|
39
|
+
---------------------------------------
|
40
|
+
|
41
|
+
Copyright © 2012 Paulo Köch, released under the MIT license
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: django_signal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,13 +11,15 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description:
|
14
|
+
description: Because I really wanted something similar to Django's Signal in Ruby.
|
15
15
|
email:
|
16
16
|
- paulo.koch@gmail.com
|
17
17
|
executables: []
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
+
- LICENSE
|
22
|
+
- README.md
|
21
23
|
- lib/django_signal.rb
|
22
24
|
homepage: https://github.com/pkoch/django_signal
|
23
25
|
licenses: []
|