eventmachine-distributed-notification 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +5 -0
- data/VERSION +1 -1
- data/ext/lib/mkmf.rb +1837 -0
- data/ext/observer_native/extconf.rb +4 -0
- data/ext/observer_native/observer_native.m +2 -2
- data/ext/poster_native/extconf.rb +4 -0
- data/lib/eventmachine-distributed-notification.rb +1 -0
- data/spec/eventmachine-distributed-notification_spec.rb +25 -0
- metadata +108 -68
@@ -88,7 +88,7 @@ VALUE getRubyValueFromId(id thing) {
|
|
88
88
|
result = rb_float_new([thing doubleValue]);
|
89
89
|
else
|
90
90
|
result = INT2NUM([thing longLongValue]);
|
91
|
-
} else if([thing isKindOfClass:[
|
91
|
+
} else if([thing isKindOfClass:[NSString class]]) {
|
92
92
|
result = rb_str_new2([thing UTF8String]);
|
93
93
|
} else {
|
94
94
|
result = rb_str_new2([[thing description] UTF8String]);
|
@@ -131,7 +131,7 @@ static VALUE cObserverNative_new(int argc, VALUE *argv, VALUE klass)
|
|
131
131
|
|
132
132
|
static VALUE cObserverNative_run(int argc, VALUE *argv, VALUE self)
|
133
133
|
{
|
134
|
-
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:
|
134
|
+
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0]];
|
135
135
|
|
136
136
|
return Qnil;
|
137
137
|
}
|
@@ -78,5 +78,30 @@ describe EventMachine::DistributedNotificationWatch do
|
|
78
78
|
watcher.value.should_not be_nil
|
79
79
|
end
|
80
80
|
end
|
81
|
+
|
82
|
+
context 'with block' do
|
83
|
+
it 'should watch distributed notifications' do
|
84
|
+
value = nil
|
85
|
+
|
86
|
+
EM.run {
|
87
|
+
watcher = EM.watch_distributed_notification(nil) do |c|
|
88
|
+
(class << c; self; end).send(:define_method, :notify) do |name, info|
|
89
|
+
value = info
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
itunes.playlists["Music"].tracks[1].play
|
94
|
+
|
95
|
+
EM::add_timer(1) {
|
96
|
+
itunes.stop
|
97
|
+
EM.stop
|
98
|
+
watcher.stop
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
value.should_not be_nil
|
103
|
+
value['Total Time'].should be_kind_of(Fixnum)
|
104
|
+
end
|
105
|
+
end
|
81
106
|
end
|
82
107
|
end
|
metadata
CHANGED
@@ -1,93 +1,125 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventmachine-distributed-notification
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- youpy
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
date: 2012-03-29 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
17
23
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
requirement: *id001
|
22
32
|
type: :runtime
|
33
|
+
name: eventmachine
|
23
34
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
name: rspec
|
27
|
-
requirement: &70178503273500 !ruby/object:Gem::Requirement
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
28
37
|
none: false
|
29
|
-
requirements:
|
38
|
+
requirements:
|
30
39
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
hash: 47
|
42
|
+
segments:
|
43
|
+
- 2
|
44
|
+
- 8
|
45
|
+
- 0
|
32
46
|
version: 2.8.0
|
47
|
+
requirement: *id002
|
33
48
|
type: :development
|
49
|
+
name: rspec
|
34
50
|
prerelease: false
|
35
|
-
|
36
|
-
|
37
|
-
name: rdoc
|
38
|
-
requirement: &70178503287000 !ruby/object:Gem::Requirement
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
39
53
|
none: false
|
40
|
-
requirements:
|
54
|
+
requirements:
|
41
55
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 31
|
58
|
+
segments:
|
59
|
+
- 3
|
60
|
+
- 12
|
61
|
+
version: "3.12"
|
62
|
+
requirement: *id003
|
44
63
|
type: :development
|
64
|
+
name: rdoc
|
45
65
|
prerelease: false
|
46
|
-
|
47
|
-
|
48
|
-
name: bundler
|
49
|
-
requirement: &70178503284120 !ruby/object:Gem::Requirement
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
50
68
|
none: false
|
51
|
-
requirements:
|
69
|
+
requirements:
|
52
70
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 19
|
73
|
+
segments:
|
74
|
+
- 1
|
75
|
+
- 1
|
76
|
+
- 0
|
54
77
|
version: 1.1.0
|
78
|
+
requirement: *id004
|
55
79
|
type: :development
|
80
|
+
name: bundler
|
56
81
|
prerelease: false
|
57
|
-
|
58
|
-
|
59
|
-
name: jeweler
|
60
|
-
requirement: &70178503280260 !ruby/object:Gem::Requirement
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
61
84
|
none: false
|
62
|
-
requirements:
|
85
|
+
requirements:
|
63
86
|
- - ~>
|
64
|
-
- !ruby/object:Gem::Version
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 49
|
89
|
+
segments:
|
90
|
+
- 1
|
91
|
+
- 8
|
92
|
+
- 3
|
65
93
|
version: 1.8.3
|
94
|
+
requirement: *id005
|
66
95
|
type: :development
|
96
|
+
name: jeweler
|
67
97
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
name: rb-appscript
|
71
|
-
requirement: &70178503295420 !ruby/object:Gem::Requirement
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
72
100
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
requirement: *id006
|
77
109
|
type: :development
|
110
|
+
name: rb-appscript
|
78
111
|
prerelease: false
|
79
|
-
|
80
|
-
description: An EventMachine extension to watch OSX's Distributed Notification, posted
|
81
|
-
by iTunes etc.
|
112
|
+
description: An EventMachine extension to watch OSX's Distributed Notification, posted by iTunes etc.
|
82
113
|
email: youpy@buycheapviagraonlinenow.com
|
83
114
|
executables: []
|
84
|
-
|
115
|
+
|
116
|
+
extensions:
|
85
117
|
- ext/observer_native/extconf.rb
|
86
118
|
- ext/poster_native/extconf.rb
|
87
|
-
extra_rdoc_files:
|
119
|
+
extra_rdoc_files:
|
88
120
|
- LICENSE.txt
|
89
121
|
- README.rdoc
|
90
|
-
files:
|
122
|
+
files:
|
91
123
|
- .document
|
92
124
|
- .rspec
|
93
125
|
- Gemfile
|
@@ -98,6 +130,7 @@ files:
|
|
98
130
|
- VERSION
|
99
131
|
- examples/client.rb
|
100
132
|
- examples/server.rb
|
133
|
+
- ext/lib/mkmf.rb
|
101
134
|
- ext/observer_native/compat.h
|
102
135
|
- ext/observer_native/extconf.rb
|
103
136
|
- ext/observer_native/observer_native.h
|
@@ -108,32 +141,39 @@ files:
|
|
108
141
|
- lib/eventmachine-distributed-notification.rb
|
109
142
|
- spec/eventmachine-distributed-notification_spec.rb
|
110
143
|
- spec/spec_helper.rb
|
144
|
+
has_rdoc: true
|
111
145
|
homepage: http://github.com/youpy/eventmachine-distributed-notification
|
112
|
-
licenses:
|
146
|
+
licenses:
|
113
147
|
- MIT
|
114
148
|
post_install_message:
|
115
149
|
rdoc_options: []
|
116
|
-
|
150
|
+
|
151
|
+
require_paths:
|
117
152
|
- lib
|
118
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
154
|
none: false
|
120
|
-
requirements:
|
121
|
-
- -
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
|
124
|
-
segments:
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
hash: 3
|
159
|
+
segments:
|
125
160
|
- 0
|
126
|
-
|
127
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
+
version: "0"
|
162
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
163
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 3
|
168
|
+
segments:
|
169
|
+
- 0
|
170
|
+
version: "0"
|
133
171
|
requirements: []
|
172
|
+
|
134
173
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.
|
174
|
+
rubygems_version: 1.3.7
|
136
175
|
signing_key:
|
137
176
|
specification_version: 3
|
138
177
|
summary: An EventMachine extension to watch OSX's Distributed Notification
|
139
178
|
test_files: []
|
179
|
+
|