auser-columbus 0.0.2 → 0.0.3

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/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 2
4
+ :patch: 3
data/bin/columbus-client CHANGED
@@ -21,16 +21,17 @@ EOS
21
21
 
22
22
  # Columbus::Client.list
23
23
  if command[:select]
24
- s = Columbus::Client.service_list.select do |s|
24
+ servers = Columbus::Client.service_list.select do |s|
25
25
  s if s.name =~ /#{command[:select]}/
26
26
  end
27
- puts "#{s.name}\t#{s.host}\t#{s.port}\t#{s.description}" unless s.empty?
27
+ found_server = servers.last
28
+ puts (command[:query] ? found_server.send(command[:query].to_sym) : found_server)
28
29
  else
29
30
  Columbus::Client.service_list.each do |s|
30
31
  if command[:query]
31
32
  puts s.send(command[:query].to_sym)
32
33
  else
33
- puts "#{s.name}\t#{s.host}\t#{s.port}\t#{s.description}"
34
+ puts
34
35
  end
35
36
  end
36
37
  end
data/lib/columbus.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  $:.unshift(File.dirname(__FILE__) + "/columbus")
2
2
  require "rubygems"
3
3
  require "dnssd"
4
+
5
+ $:.unshift(File.dirname(__FILE__) + "/../vendor/gems")
6
+ require "git-style-binaries/lib/git-style-binary"
7
+
4
8
  require "server"
5
9
  require "client"
6
10
 
@@ -14,6 +14,9 @@ module Columbus
14
14
  @port = port
15
15
  @description = description
16
16
  end
17
+ def to_s
18
+ "#{name}\t#{host}\t#{port}\t#{description}"
19
+ end
17
20
  end
18
21
  class Client
19
22
  class << self
@@ -36,7 +36,7 @@ module Columbus
36
36
  if ip && @current_interface
37
37
  ip = ip.captures.compact.to_s.gsub(/addr:/, '')
38
38
  out.merge!({@current_interface => ip})
39
- end
39
+ end
40
40
  end
41
41
  out
42
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auser-columbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-01 00:00:00 -07:00
12
+ date: 2009-06-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15