Ruby4Skype 0.2.3 → 0.3.1
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/LICENSE +3 -0
- data/README +14 -0
- data/Rakefile +67 -0
- data/lib/skypeapi.rb +570 -509
- data/lib/skypeapi/application.rb +79 -77
- data/lib/skypeapi/call.rb +243 -230
- data/lib/skypeapi/chat.rb +162 -172
- data/lib/skypeapi/chatmember.rb +26 -28
- data/lib/skypeapi/chatmessage.rb +81 -65
- data/lib/skypeapi/error.rb +8 -0
- data/lib/skypeapi/event.rb +25 -26
- data/lib/skypeapi/filetransfer.rb +47 -28
- data/lib/skypeapi/group.rb +72 -73
- data/lib/skypeapi/menuitem.rb +44 -44
- data/lib/skypeapi/message.rb +39 -41
- data/lib/skypeapi/object.rb +246 -82
- data/lib/skypeapi/os/etc.rb +48 -98
- data/lib/skypeapi/os/mac.rb +92 -4
- data/lib/skypeapi/os/notifier.rb +31 -0
- data/lib/skypeapi/os/window_event_queue.rb +198 -0
- data/lib/skypeapi/os/window_messagehandler.rb +120 -0
- data/lib/skypeapi/os/windows.rb +170 -306
- data/lib/skypeapi/profile.rb +190 -120
- data/lib/skypeapi/sharefunctions.rb +31 -23
- data/lib/skypeapi/sms.rb +87 -67
- data/lib/skypeapi/user.rb +159 -99
- data/lib/skypeapi/version.rb +3 -3
- data/lib/skypeapi/voicemail.rb +59 -52
- data/spec/matcher_be_boolean.rb +10 -0
- data/spec/skypeapi/application_spec.rb +76 -0
- data/spec/skypeapi/chat_spec.rb +356 -0
- data/spec/skypeapi/chatmember_spec.rb +42 -0
- data/spec/skypeapi/chatmessage_spec.rb +89 -0
- data/spec/skypeapi/event_spec.rb +31 -0
- data/spec/skypeapi/filetransfer_spec.rb +67 -0
- data/spec/skypeapi/group_spec.rb +16 -0
- data/spec/skypeapi/menuitem_spec.rb +37 -0
- data/spec/skypeapi/os/windows_spec.rb +305 -0
- data/spec/skypeapi/profile_spec.rb +22 -0
- data/spec/skypeapi/user_spec.rb +25 -0
- data/spec/skypeapi_spec.rb +528 -0
- metadata +32 -12
- data/lib/skypeapi/os/timer.rb +0 -108
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Ruby4Skype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bopper
|
@@ -9,37 +9,42 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-23 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
17
|
-
email:
|
16
|
+
description: SkypeAPI wrapper
|
17
|
+
email: bopper123@gmail.com
|
18
18
|
executables: []
|
19
19
|
|
20
20
|
extensions: []
|
21
21
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- LICENSE
|
24
25
|
files:
|
25
|
-
-
|
26
|
+
- LICENSE
|
27
|
+
- README
|
28
|
+
- Rakefile
|
26
29
|
- lib/skypeapi/application.rb
|
27
30
|
- lib/skypeapi/call.rb
|
28
31
|
- lib/skypeapi/chat.rb
|
29
32
|
- lib/skypeapi/chatmember.rb
|
30
33
|
- lib/skypeapi/chatmessage.rb
|
34
|
+
- lib/skypeapi/error.rb
|
31
35
|
- lib/skypeapi/event.rb
|
32
36
|
- lib/skypeapi/filetransfer.rb
|
33
37
|
- lib/skypeapi/group.rb
|
34
38
|
- lib/skypeapi/menuitem.rb
|
35
39
|
- lib/skypeapi/message.rb
|
36
40
|
- lib/skypeapi/object.rb
|
37
|
-
- lib/skypeapi/os
|
38
41
|
- lib/skypeapi/os/etc.rb
|
39
42
|
- lib/skypeapi/os/linux.rb
|
40
43
|
- lib/skypeapi/os/mac.rb
|
41
|
-
- lib/skypeapi/os/
|
44
|
+
- lib/skypeapi/os/notifier.rb
|
42
45
|
- lib/skypeapi/os/windows.rb
|
46
|
+
- lib/skypeapi/os/window_event_queue.rb
|
47
|
+
- lib/skypeapi/os/window_messagehandler.rb
|
43
48
|
- lib/skypeapi/profile.rb
|
44
49
|
- lib/skypeapi/sharefunctions.rb
|
45
50
|
- lib/skypeapi/sms.rb
|
@@ -47,8 +52,23 @@ files:
|
|
47
52
|
- lib/skypeapi/version.rb
|
48
53
|
- lib/skypeapi/voicemail.rb
|
49
54
|
- lib/skypeapi.rb
|
50
|
-
|
55
|
+
- spec/matcher_be_boolean.rb
|
56
|
+
- spec/skypeapi/application_spec.rb
|
57
|
+
- spec/skypeapi/chatmember_spec.rb
|
58
|
+
- spec/skypeapi/chatmessage_spec.rb
|
59
|
+
- spec/skypeapi/chat_spec.rb
|
60
|
+
- spec/skypeapi/event_spec.rb
|
61
|
+
- spec/skypeapi/filetransfer_spec.rb
|
62
|
+
- spec/skypeapi/group_spec.rb
|
63
|
+
- spec/skypeapi/menuitem_spec.rb
|
64
|
+
- spec/skypeapi/os/windows_spec.rb
|
65
|
+
- spec/skypeapi/profile_spec.rb
|
66
|
+
- spec/skypeapi/user_spec.rb
|
67
|
+
- spec/skypeapi_spec.rb
|
68
|
+
has_rdoc: true
|
51
69
|
homepage: http://rubyforge.org/projects/skyperapper/
|
70
|
+
licenses: []
|
71
|
+
|
52
72
|
post_install_message:
|
53
73
|
rdoc_options: []
|
54
74
|
|
@@ -69,9 +89,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
89
|
requirements: []
|
70
90
|
|
71
91
|
rubyforge_project: Ruby4Skype
|
72
|
-
rubygems_version: 1.3.
|
92
|
+
rubygems_version: 1.3.2
|
73
93
|
signing_key:
|
74
|
-
specification_version:
|
94
|
+
specification_version: 3
|
75
95
|
summary: SkypeAPI wrapper
|
76
96
|
test_files: []
|
77
97
|
|
data/lib/skypeapi/os/timer.rb
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
#module SkypeAPI
|
2
|
-
# module OS
|
3
|
-
# class Windows
|
4
|
-
class Timer
|
5
|
-
class << self
|
6
|
-
def interval term, block=Proc.new
|
7
|
-
Interval.new term, block
|
8
|
-
end
|
9
|
-
|
10
|
-
def timeout term, block=Proc.new
|
11
|
-
Timeout.new term, block
|
12
|
-
end
|
13
|
-
|
14
|
-
def delete instance
|
15
|
-
case instance.class
|
16
|
-
when Timeout
|
17
|
-
instance.delete
|
18
|
-
when Interval
|
19
|
-
instance.delete
|
20
|
-
else
|
21
|
-
raise ArgumentError
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def polling
|
26
|
-
now = Time.now.to_i
|
27
|
-
Timeout.polling now
|
28
|
-
Interval.polling now
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
class Abstruct
|
33
|
-
|
34
|
-
class << self
|
35
|
-
|
36
|
-
def new term, block
|
37
|
-
instance = super
|
38
|
-
@stack << instance
|
39
|
-
return instance
|
40
|
-
end
|
41
|
-
|
42
|
-
def delete instance
|
43
|
-
@stack.delete instance
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
def delete
|
50
|
-
self.class.delete self
|
51
|
-
end
|
52
|
-
|
53
|
-
attr_reader :term, :block
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
class Timeout < Abstruct
|
58
|
-
@stack = Array.new
|
59
|
-
class << self
|
60
|
-
|
61
|
-
def polling now
|
62
|
-
@stack.delete_if do |timeout|
|
63
|
-
if now >= timeout.term
|
64
|
-
timeout.block.call
|
65
|
-
true
|
66
|
-
else
|
67
|
-
false
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|
73
|
-
|
74
|
-
def initialize term, block
|
75
|
-
@term = term + Time.now.to_i
|
76
|
-
@block = block
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
|
81
|
-
class Interval < Abstruct
|
82
|
-
@stack = Array.new
|
83
|
-
|
84
|
-
class << self
|
85
|
-
|
86
|
-
def polling now
|
87
|
-
@stack.each do |interval|
|
88
|
-
if now >= interval.term + interval.old
|
89
|
-
interval.old = now
|
90
|
-
interval.block.call
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
def initialize term, block
|
98
|
-
@term = term
|
99
|
-
@old = Time.now.to_i
|
100
|
-
@block = block
|
101
|
-
end
|
102
|
-
|
103
|
-
attr_accessor :old
|
104
|
-
end
|
105
|
-
end
|
106
|
-
# end
|
107
|
-
# end
|
108
|
-
#end
|