hoxworth-gitjour 6.3.3 → 6.3.4
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/lib/gitjour/application.rb +4 -1
- metadata +1 -1
data/lib/gitjour/application.rb
CHANGED
|
@@ -2,11 +2,14 @@ require 'rubygems'
|
|
|
2
2
|
require 'set'
|
|
3
3
|
require 'gitjour/version'
|
|
4
4
|
|
|
5
|
+
using_dnssd = true
|
|
6
|
+
|
|
5
7
|
begin
|
|
6
8
|
require 'dnssd'
|
|
7
9
|
rescue LoadError
|
|
8
10
|
require 'net/dns/mdns-sd'
|
|
9
11
|
DNSSD = Net::DNS::MDNSSD
|
|
12
|
+
using_dnssd = false
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
Thread.abort_on_exception = true
|
|
@@ -220,7 +223,7 @@ module Gitjour
|
|
|
220
223
|
@@announcements[name].service.stop
|
|
221
224
|
end
|
|
222
225
|
|
|
223
|
-
tr = DNSSD::TextRecord.new
|
|
226
|
+
using_dnssd ? tr = DNSSD::TextRecord.new : tr = {}
|
|
224
227
|
tr['description'] = File.read("#{path}/.git/description") rescue "a git project"
|
|
225
228
|
tr['branches'] = branches.join('|')
|
|
226
229
|
|