event_hook 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,14 @@
1
+ === 1.1.0 / 2010-09-02
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Allow event_hook_klass to work with class and metaclass.
6
+ * Force ~/.ruby_inline cleanup in tests
7
+
8
+ * 1 bug fix:
9
+
10
+ * event_hook won't work on any 1.9 w/o major rework :(
11
+
1
12
  === 1.0.1 / 2009-06-23
2
13
 
3
14
  * 1 minor enhancement:
data/Rakefile CHANGED
@@ -3,6 +3,9 @@
3
3
  require 'rubygems'
4
4
  require 'hoe'
5
5
 
6
+ Hoe.add_include_dirs("../../RubyInline/dev/lib",
7
+ "../../ZenTest/dev/lib")
8
+
6
9
  Hoe.plugin :seattlerb
7
10
  Hoe.plugin :inline
8
11
 
@@ -10,7 +13,7 @@ Hoe.spec 'event_hook' do
10
13
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
11
14
 
12
15
  self.rubyforge_name = 'seattlerb'
13
- multiruby_skip << "1.9.1"
16
+ multiruby_skip << "1.9"
14
17
  end
15
18
 
16
19
  # vim: syntax=ruby
data/lib/event_hook.rb CHANGED
@@ -2,7 +2,7 @@ require 'inline'
2
2
  require 'singleton'
3
3
 
4
4
  class EventHook
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
 
7
7
  include Singleton
8
8
 
@@ -70,7 +70,15 @@ class EventHook
70
70
 
71
71
  in_event_hook++;
72
72
 
73
- if (NIL_P(event_hook_klass)) event_hook_klass = self;
73
+ if (NIL_P(event_hook_klass)) {
74
+ int t = rb_type(self);
75
+ if (t == T_CLASS || t == T_MODULE) {
76
+ event_hook_klass = self;
77
+ } else {
78
+ event_hook_klass = CLASS_OF(self);
79
+ }
80
+ }
81
+
74
82
  if (method == 0) method = rb_intern("process");
75
83
 
76
84
  if (klass) {
@@ -1,6 +1,14 @@
1
1
  require "test/unit"
2
2
  require "event_hook"
3
3
 
4
+ dir = File.expand_path "~/.ruby_inline"
5
+ if test ?d, dir then
6
+ require 'fileutils'
7
+ puts "nuking #{dir}"
8
+ # force removal, Windoze is bitching at me, something to hunt later...
9
+ FileUtils.rm_r dir, :force => true
10
+ end
11
+
4
12
  class Stupid < EventHook
5
13
  @@log = []
6
14
 
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_hook
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 2
10
+ version: 1.0.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ryan Davis
@@ -30,19 +36,57 @@ cert_chain:
30
36
  FBHgymkyj/AOSqKRIpXPhjC6
31
37
  -----END CERTIFICATE-----
32
38
 
33
- date: 2009-06-23 00:00:00 -07:00
39
+ date: 2010-09-02 00:00:00 -07:00
34
40
  default_executable:
35
41
  dependencies:
36
42
  - !ruby/object:Gem::Dependency
37
- name: hoe
43
+ name: rubyforge
44
+ prerelease: false
45
+ requirement: &id001 !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ hash: 7
51
+ segments:
52
+ - 2
53
+ - 0
54
+ - 4
55
+ version: 2.0.4
56
+ type: :development
57
+ version_requirements: *id001
58
+ - !ruby/object:Gem::Dependency
59
+ name: minitest
60
+ prerelease: false
61
+ requirement: &id002 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ hash: 9
67
+ segments:
68
+ - 1
69
+ - 7
70
+ - 1
71
+ version: 1.7.1
38
72
  type: :development
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
73
+ version_requirements: *id002
74
+ - !ruby/object:Gem::Dependency
75
+ name: hoe
76
+ prerelease: false
77
+ requirement: &id003 !ruby/object:Gem::Requirement
78
+ none: false
41
79
  requirements:
42
80
  - - ">="
43
81
  - !ruby/object:Gem::Version
44
- version: 2.3.0
45
- version:
82
+ hash: 19
83
+ segments:
84
+ - 2
85
+ - 6
86
+ - 2
87
+ version: 2.6.2
88
+ type: :development
89
+ version_requirements: *id003
46
90
  description: |-
47
91
  Wraps rb_add_event_hook so you can write fast ruby event hook
48
92
  processors w/o the speed penalty that comes with set_trace_func (sooo
@@ -86,21 +130,27 @@ rdoc_options:
86
130
  require_paths:
87
131
  - lib
88
132
  required_ruby_version: !ruby/object:Gem::Requirement
133
+ none: false
89
134
  requirements:
90
135
  - - ">="
91
136
  - !ruby/object:Gem::Version
137
+ hash: 3
138
+ segments:
139
+ - 0
92
140
  version: "0"
93
- version:
94
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
+ none: false
95
143
  requirements:
96
144
  - - ">="
97
145
  - !ruby/object:Gem::Version
146
+ hash: 3
147
+ segments:
148
+ - 0
98
149
  version: "0"
99
- version:
100
150
  requirements: []
101
151
 
102
152
  rubyforge_project: seattlerb
103
- rubygems_version: 1.3.4
153
+ rubygems_version: 1.3.7
104
154
  signing_key:
105
155
  specification_version: 3
106
156
  summary: Wraps rb_add_event_hook so you can write fast ruby event hook processors w/o the speed penalty that comes with set_trace_func (sooo sloooow!)
metadata.gz.sig CHANGED
Binary file