sender 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -1
- data/Rakefile +1 -1
- data/lib/sender/sender.bundle +0 -0
- data/lib/sender.rb +29 -0
- data/sender.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG.rdoc
CHANGED
@@ -16,9 +16,13 @@ Fixed external requirement of Ruby source directory. Gem should now install tran
|
|
16
16
|
|
17
17
|
Minor detail changes
|
18
18
|
|
19
|
-
=== 1.
|
19
|
+
=== 1.2 2010-06-24
|
20
20
|
|
21
21
|
Fixed __caller__.
|
22
22
|
Observed that no backtrace is available for :initialize. For now this can be circumvented by subclassing new (make sure you call super);
|
23
23
|
in the long term, I am investing what needs to be done for the special case.
|
24
24
|
|
25
|
+
=== 1.3 2010-06-27
|
26
|
+
|
27
|
+
Added init_sender_callbacks( sender, caller ) to take care of :initialize issue. Include Sender module in your class to activate and
|
28
|
+
:init_sender_callbacks( __sender__, __caller__ ) will be called on self from self.class.new before self.initialize.
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ Hoe.spec 'sender' do
|
|
11
11
|
self.spec_extras = { :extensions => ["ext/sender/extconf.rb"] }
|
12
12
|
self.extra_dev_deps << ['rake-compiler', '>= 0']
|
13
13
|
|
14
|
-
self.version="1.
|
14
|
+
self.version="1.3"
|
15
15
|
|
16
16
|
Rake::ExtensionTask.new( 'sender', spec ) do |ext|
|
17
17
|
ext.lib_dir = File.join('lib', 'sender')
|
data/lib/sender/sender.bundle
CHANGED
Binary file
|
data/lib/sender.rb
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
require 'sender/sender'
|
2
2
|
|
3
3
|
module Sender
|
4
|
+
|
4
5
|
# VERSION is set by hoe
|
6
|
+
|
7
|
+
##############
|
8
|
+
# included #
|
9
|
+
##############
|
10
|
+
|
11
|
+
def self.included( module_or_class_const )
|
12
|
+
|
13
|
+
# define a class method "new" on self that calls :init_sender_callbacks if it is defined
|
14
|
+
module_or_class_const.class_eval do
|
15
|
+
|
16
|
+
#########
|
17
|
+
# new #
|
18
|
+
#########
|
19
|
+
|
20
|
+
def new( *args )
|
21
|
+
new_self = super( *args )
|
22
|
+
if self.respond_to?( :init_sender_callbacks )
|
23
|
+
# :init_sender_callbacks allows callback parameters to be defined during initialization
|
24
|
+
# it is called automatically when the object is created, prior to calling Object.initialize
|
25
|
+
self.__send__( :init_sender_callbacks, __sender__, __caller__ )
|
26
|
+
end
|
27
|
+
return new_self
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
5
34
|
end
|
data/sender.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{sender}
|
5
|
-
s.version = "1.
|
5
|
+
s.version = "1.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Asher"]
|
9
|
-
s.date = %q{2010-06-
|
9
|
+
s.date = %q{2010-06-27}
|
10
10
|
s.description = %q{Adds :__sender__ and :__caller__ to the built-in :__callee__ and :__method__ methods in Ruby 1.9.1, as well
|
11
11
|
as providing object-oriented :backtrace supporting n-levels backward, and :backtrace_includes?,
|
12
12
|
which allows contents of the backtrace to be queried.}
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: "1.
|
8
|
+
- 3
|
9
|
+
version: "1.3"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Asher
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-27 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|