rype 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Rakefile +1 -1
  2. data/lib/rype/api.rb +12 -2
  3. data/lib/rype/chat.rb +4 -0
  4. data/rype.gemspec +2 -2
  5. metadata +56 -82
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ spec = Gem::Specification.new do |s|
21
21
 
22
22
  # Change these as appropriate
23
23
  s.name = "rype"
24
- s.version = "0.0.2"
24
+ s.version = "0.0.3"
25
25
  s.authors = ["Niko Felger"]
26
26
  s.email = "niko.felger@gmail.com"
27
27
  s.homepage = "http://github.com/nfelger/rype"
data/lib/rype/api.rb CHANGED
@@ -25,8 +25,10 @@ module Rype
25
25
  def attach(application_name="rype")
26
26
  raise "Already attached." if attached?
27
27
 
28
+ @application_name = application_name
29
+
28
30
  # Say hi to Skype.
29
- status, = api.Invoke "NAME #{application_name}"
31
+ status, = api.Invoke "NAME #{@application_name}"
30
32
 
31
33
  if status == 'CONNSTATUS OFFLINE'
32
34
  raise Rype::Offline
@@ -94,7 +96,15 @@ module Rype
94
96
 
95
97
  def run_notification_thread
96
98
  @thread ||= Thread.new do
97
- receiving_service = bus.request_service("com.nikofelger.ruby-skype")
99
+ callback_interface = Class.new(DBus::Object) do
100
+ dbus_interface "com.Skype.API.Client" do
101
+ dbus_method :Notify, "in data:s" do |message|
102
+ Api.notify(message)
103
+ end
104
+ end
105
+ end
106
+
107
+ receiving_service = bus.request_service("com.nikofelger.rype.#{@application_name}.#{Process.pid}")
98
108
  receiving_service.export(Notify.new("/com/Skype/Client"))
99
109
  dbus_event_loop = DBus::Main.new
100
110
  dbus_event_loop << bus
data/lib/rype/chat.rb CHANGED
@@ -35,6 +35,10 @@ module Rype
35
35
  end
36
36
  end
37
37
 
38
+ def add_members(members)
39
+ Api.invoke("ALTER CHAT #{@chatname} ADDMEMBERS #{members.join(' ')}")
40
+ end
41
+
38
42
  private
39
43
  def get_property(property, &block)
40
44
  return unless block_given?
data/rype.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rype"
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Niko Felger"]
9
- s.date = "2012-01-23"
9
+ s.date = "2012-01-26"
10
10
  s.description = "Unofficial Skype Api wrapper"
11
11
  s.email = "niko.felger@gmail.com"
12
12
  s.files = [".gitignore", ".travis.yml", "Gemfile", "History.txt", "LICENSE", "Rakefile", "examples/chats/echo_server.rb", "examples/chats/list_chats.rb", "examples/chats/send_chat.rb", "examples/start_skype", "features/receive_chatmessage.feature", "features/send_chatmessage.feature", "features/step_definitions/skype_steps.rb", "features/support/env.rb", "features/support/lib/fake_api.rb", "lib/rype.rb", "lib/rype/api.rb", "lib/rype/chat.rb", "lib/rype/chatmessage.rb", "lib/rype/events.rb", "readme.md", "rype.gemspec", "spec/lib/rype/chat_spec.rb", "spec/lib/rype_spec.rb", "spec/spec_helper.rb"]
metadata CHANGED
@@ -1,88 +1,66 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rype
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Niko Felger
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-01-23 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- type: :runtime
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 7
28
- segments:
29
- - 0
30
- - 6
31
- version: "0.6"
32
- prerelease: false
12
+ date: 2012-01-26 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
33
15
  name: ruby-dbus
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- type: :development
37
- requirement: &id002 !ruby/object:Gem::Requirement
16
+ requirement: &13557920 !ruby/object:Gem::Requirement
38
17
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0.6'
22
+ type: :runtime
46
23
  prerelease: false
24
+ version_requirements: *13557920
25
+ - !ruby/object:Gem::Dependency
47
26
  name: rspec
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- type: :development
51
- requirement: &id003 !ruby/object:Gem::Requirement
27
+ requirement: &13557280 !ruby/object:Gem::Requirement
52
28
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
60
34
  prerelease: false
35
+ version_requirements: *13557280
36
+ - !ruby/object:Gem::Dependency
61
37
  name: cucumber
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- type: :development
65
- requirement: &id004 !ruby/object:Gem::Requirement
38
+ requirement: &13542140 !ruby/object:Gem::Requirement
66
39
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
74
45
  prerelease: false
46
+ version_requirements: *13542140
47
+ - !ruby/object:Gem::Dependency
75
48
  name: rake
76
- version_requirements: *id004
49
+ requirement: &13541340 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *13541340
77
58
  description: Unofficial Skype Api wrapper
78
59
  email: niko.felger@gmail.com
79
60
  executables: []
80
-
81
61
  extensions: []
82
-
83
62
  extra_rdoc_files: []
84
-
85
- files:
63
+ files:
86
64
  - .gitignore
87
65
  - .travis.yml
88
66
  - Gemfile
@@ -110,36 +88,32 @@ files:
110
88
  - spec/spec_helper.rb
111
89
  homepage: http://github.com/nfelger/rype
112
90
  licenses: []
113
-
114
91
  post_install_message:
115
92
  rdoc_options: []
116
-
117
- require_paths:
93
+ require_paths:
118
94
  - lib
119
- required_ruby_version: !ruby/object:Gem::Requirement
95
+ required_ruby_version: !ruby/object:Gem::Requirement
120
96
  none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ segments:
126
102
  - 0
127
- version: "0"
128
- required_rubygems_version: !ruby/object:Gem::Requirement
103
+ hash: -3132977237656296045
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
105
  none: false
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ segments:
135
111
  - 0
136
- version: "0"
112
+ hash: -3132977237656296045
137
113
  requirements: []
138
-
139
114
  rubyforge_project:
140
115
  rubygems_version: 1.8.10
141
116
  signing_key:
142
117
  specification_version: 3
143
118
  summary: Unofficial Skype Api wrapper
144
119
  test_files: []
145
-