skype 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/History.txt +4 -0
- data/README.md +2 -0
- data/{samples/chat.rb → bin/skype-chat} +1 -1
- data/lib/skype.rb +1 -1
- data/lib/skype/{register.rb → filter.rb} +10 -0
- data/lib/skype/platforms/linux.rb +1 -7
- data/lib/skype/platforms/mac.rb +1 -7
- data/lib/skype/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7abc203b8c8e00b1338cb47e58297b1382e560fe
|
4
|
+
data.tar.gz: 523913048ed2032061443f685ce0d8e340173f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a0d3056586e3409170cd6b5cc2185db45090ff4a88708b856a74c4613ad1d6e0cf506aec97a37e1a75af1603b52deddce7e9190fe884bdf2061492daa5225ca
|
7
|
+
data.tar.gz: 7b291a9d5cca6a21285f1db28a7414d0ebd97139df4408f554f5ebc83bf3f41857bb6db37ed8d3351c434e3392c842d35f24f5905de14033ff96545a0c0e25a4
|
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# -*- coding: utf-8 -*-
|
3
2
|
require 'rubygems'
|
4
3
|
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
|
5
4
|
require 'skype'
|
@@ -34,5 +33,6 @@ end
|
|
34
33
|
|
35
34
|
loop do
|
36
35
|
line = STDIN.gets.strip
|
36
|
+
next if line.empty?
|
37
37
|
chat.post line
|
38
38
|
end
|
data/lib/skype.rb
CHANGED
@@ -6,4 +6,14 @@ module Skype
|
|
6
6
|
raise ArgumentError, "block not given" unless block_given?
|
7
7
|
@@filters[pattern] = block
|
8
8
|
end
|
9
|
+
|
10
|
+
def self.filter_response(response_string)
|
11
|
+
@@filters.each do |filter, block|
|
12
|
+
next unless response_string =~ filter
|
13
|
+
response_string = block.call(response_string)
|
14
|
+
break
|
15
|
+
end
|
16
|
+
response_string
|
17
|
+
end
|
18
|
+
|
9
19
|
end
|
@@ -18,12 +18,6 @@ module Skype
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.exec(command)
|
21
|
-
|
22
|
-
@@filters.each do |filter, block|
|
23
|
-
next unless res =~ filter
|
24
|
-
res = block.call(res)
|
25
|
-
break
|
26
|
-
end
|
27
|
-
res
|
21
|
+
filter_response (@@connection||=Connection.new).invoke command
|
28
22
|
end
|
29
23
|
end
|
data/lib/skype/platforms/mac.rb
CHANGED
@@ -3,13 +3,7 @@ module Skype
|
|
3
3
|
script = %Q{tell application "Skype"
|
4
4
|
send command "#{Utils.escape command}" script name "#{self.config[:app_name]}"
|
5
5
|
end tell}
|
6
|
-
|
7
|
-
@@filters.each do |filter, block|
|
8
|
-
next unless res =~ filter
|
9
|
-
res = block.call(res)
|
10
|
-
break
|
11
|
-
end
|
12
|
-
res
|
6
|
+
filter_response `unset LD_LIBRARY_PATH; unset DYLD_LIBRARY_PATH; /usr/bin/osascript -e '#{script}'`.strip
|
13
7
|
end
|
14
8
|
|
15
9
|
module Utils
|
data/lib/skype/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
@@ -69,7 +69,8 @@ dependencies:
|
|
69
69
|
description: Skype Desktop API Ruby wrapper for Mac/Linux.
|
70
70
|
email:
|
71
71
|
- hashimoto@shokai.org
|
72
|
-
executables:
|
72
|
+
executables:
|
73
|
+
- skype-chat
|
73
74
|
extensions: []
|
74
75
|
extra_rdoc_files: []
|
75
76
|
files:
|
@@ -80,15 +81,15 @@ files:
|
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.md
|
82
83
|
- Rakefile
|
84
|
+
- bin/skype-chat
|
83
85
|
- lib/skype.rb
|
86
|
+
- lib/skype/filter.rb
|
84
87
|
- lib/skype/main.rb
|
85
88
|
- lib/skype/platforms/linux.rb
|
86
89
|
- lib/skype/platforms/mac.rb
|
87
|
-
- lib/skype/register.rb
|
88
90
|
- lib/skype/version.rb
|
89
91
|
- lib/skype/wrappers/chat.rb
|
90
92
|
- samples/call.rb
|
91
|
-
- samples/chat.rb
|
92
93
|
- samples/send_message.rb
|
93
94
|
- skype.gemspec
|
94
95
|
- test/test_chat.rb
|