findme 0.0.6 → 0.0.7

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.
Files changed (3) hide show
  1. data/lib/findme.rb +9 -3
  2. data/lib/findme/version.rb +1 -1
  3. metadata +3 -4
@@ -112,10 +112,16 @@ module Findme
112
112
  end
113
113
 
114
114
 
115
- def self.discover
116
- res = `avahi-browse -arpt`
115
+ def self.discover custom_cmd=nil
116
+
117
+ if custom_cmd.nil?
118
+ res = `avahi-browse -arpt`
119
+ else
120
+ res = `#{custom_cmd}`
121
+ end
122
+
117
123
  services = []
118
- lines = res.split("\n")
124
+ lines = res.scan(/\S+/)
119
125
  lines.each do |line|
120
126
  if line[0] == "="
121
127
  elems=line.split(";")
@@ -1,3 +1,3 @@
1
1
  module Findme
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: findme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-09 00:00:00.000000000 Z
12
+ date: 2013-06-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: find neighborhood host and services with avahi / avahi-daemon. run this
15
15
  for the first time to allow normal user to register services `sudo chmod a+w /etc/avahi/services/`
@@ -50,10 +50,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  version: '0'
51
51
  requirements: []
52
52
  rubyforge_project:
53
- rubygems_version: 1.8.23
53
+ rubygems_version: 1.8.24
54
54
  signing_key:
55
55
  specification_version: 3
56
56
  summary: find neighborhood host and services with avahi / avahi-daemon.
57
57
  test_files:
58
58
  - test/test.rb
59
- has_rdoc: