skype 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fb5dc7ad40243c4ed83700b041c4503829721d4
4
- data.tar.gz: ce838b0e3a2ba45c67de7ee2fbd6b1f6b44c9434
3
+ metadata.gz: 139eac0063ba0dc35a1e9cf2c39297c90d7c8be0
4
+ data.tar.gz: 80c4056eacd3329ea209e6eb36bb9682e8447589
5
5
  SHA512:
6
- metadata.gz: 841f2f1210196ea337119df90c678e5449d84511d06b3959503384711bdfe80da14c1b25a143e8a68159b1ab4973647d56ce0d4c172b359d523cfc188f78f153
7
- data.tar.gz: 58c970aaf597ceae2d390c929c6b8f59a42446a8434b7312b75a9c09804d748d51b2b2a635344c5bbd5ae635a305c07cb7bad31f993627f1fc44206b5c531446
6
+ metadata.gz: 500490579810b3654058aa74b0cb3bbd8e75d3454683fa07fd0498a7d1309b22668a8c1e4f6adcbfed4ad2c9eaf2acbcfe4fb9ea179c1522124a86e6b16c2d16
7
+ data.tar.gz: 69f54068dca248364421d146268b31542a1b38e9eef2cd7d25ac876e68dd3837f48aea1703427467e9d4c7c84f3d73a9473cbf5a9b2c4ebae4f91164e2989b82
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skype (0.2.2)
4
+ skype (0.2.3)
5
5
  tmp_cache
6
6
 
7
7
  GEM
@@ -1,3 +1,7 @@
1
+ === 0.2.3 2013-07-05
2
+
3
+ * set $DBUS_SESSION_BUS_ADDRESS if not exists
4
+
1
5
  === 0.2.2 2013-07-03
2
6
 
3
7
  * get properties of Skype::Chat::Message on access
@@ -4,6 +4,7 @@ module Skype
4
4
  class Connection
5
5
 
6
6
  def initialize
7
+ set_dbus_session_bus_address
7
8
  @bus = DBus.session_bus
8
9
  @service = @bus.service('com.Skype.API').object('/com/Skype')
9
10
  @service.default_iface = 'com.Skype.API'
@@ -15,6 +16,20 @@ module Skype
15
16
  def invoke(cmd)
16
17
  @service.Invoke(cmd)[0]
17
18
  end
19
+
20
+ private
21
+ def set_dbus_session_bus_address
22
+ return if ENV['DBUS_SESSION_BUS_ADDRESS']
23
+ addrs = []
24
+ Dir.glob("#{ENV['HOME']}/.dbus/session-bus/*").each do |fname|
25
+ File.open fname do |f|
26
+ addrs.push f.readlines.find{|line|
27
+ line =~ /^DBUS_SESSION_BUS_ADDRESS=/
28
+ }.gsub(/^DBUS_SESSION_BUS_ADDRESS=/,'')
29
+ end
30
+ end
31
+ ENV['DBUS_SESSION_BUS_ADDRESS'] = addrs[0]
32
+ end
18
33
  end
19
34
 
20
35
  def self.exec(command, opts={:response_filter => true})
@@ -1,3 +1,3 @@
1
1
  module Skype
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-03 00:00:00.000000000 Z
11
+ date: 2013-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tmp_cache