adman 0.1.0 → 0.1.1

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/FIXME ADDED
@@ -0,0 +1 @@
1
+ - Missing comments
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1,62 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{adman}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Mark"]
12
+ s.date = %q{2010-04-06}
13
+ s.description = %q{Adman makes it easy to publish your application and collaborate with other apps on your local network using Bonjour.}
14
+ s.email = %q{mark@burmis.ca}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README",
18
+ "README.rdoc",
19
+ "TODO"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".gitignore",
24
+ "FIXME",
25
+ "LICENSE",
26
+ "README",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "TODO",
30
+ "VERSION",
31
+ "adman.gemspec",
32
+ "lib/adman.rb",
33
+ "lib/adman/common.rb",
34
+ "lib/adman/dnssd.rb",
35
+ "test/helper.rb",
36
+ "test/test_adman.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/MarkBennett/adman}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubyforge_project = %q{adman}
42
+ s.rubygems_version = %q{1.3.6}
43
+ s.summary = %q{Easily share apps using Bonjour}
44
+ s.test_files = [
45
+ "test/helper.rb",
46
+ "test/test_adman.rb"
47
+ ]
48
+
49
+ if s.respond_to? :specification_version then
50
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
51
+ s.specification_version = 3
52
+
53
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
54
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
55
+ else
56
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
57
+ end
58
+ else
59
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
60
+ end
61
+ end
62
+
@@ -10,12 +10,13 @@ module Adman
10
10
  TYPE_WEB_SERVER = "_http._tcp"
11
11
  DEFAULT_TYPE = TYPE_WEB_SERVER
12
12
 
13
- def announce(name, options={})
13
+ def advertise(name, options={})
14
14
  type = options.fetch(:type, DEFAULT_TYPE)
15
15
  domain = nil
16
16
  port = options.fetch(:port, DEFAULT_PORT)
17
17
 
18
- Adman.broadcaster.register(name, type, nil, port)
18
+ Adman.broadcast = Adman.broadcaster.register(name, type, nil, port)
19
+ Adman.broadcast
19
20
  end
20
21
 
21
22
  end
@@ -7,5 +7,12 @@ module Adman
7
7
  def broadcaster=(broadcaster)
8
8
  @broadcaster = broadcaster
9
9
  end
10
+
11
+ # The current broadcast
12
+ attr_reader :broadcast
13
+
14
+ def broadcast=(broadcast)
15
+ @broadcast = broadcast
16
+ end
10
17
  end
11
18
  end
@@ -12,7 +12,7 @@ class TestAdman < Test::Unit::TestCase
12
12
 
13
13
  # Announce the website
14
14
  @website_name = "My Website"
15
- announce @website_name
15
+ advertise @website_name
16
16
 
17
17
  end
18
18
 
@@ -43,7 +43,7 @@ class TestAdman < Test::Unit::TestCase
43
43
  @service_name = "A great service"
44
44
  @port = 80
45
45
  @type = "_git._tcp"
46
- announce @service_name, :port => @port, :type => @type
46
+ advertise @service_name, :port => @port, :type => @type
47
47
  end
48
48
 
49
49
  should "register it under the correct name" do
@@ -58,6 +58,10 @@ class TestAdman < Test::Unit::TestCase
58
58
  assert_equal @broadcaster.registered_type, @type
59
59
  end
60
60
 
61
+ should "register the broadcast for later" do
62
+ assert !Adman.broadcast.nil?
63
+ end
64
+
61
65
  end
62
66
 
63
67
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mark
@@ -43,17 +43,19 @@ extra_rdoc_files:
43
43
  files:
44
44
  - .document
45
45
  - .gitignore
46
+ - FIXME
46
47
  - LICENSE
48
+ - README
47
49
  - README.rdoc
48
50
  - Rakefile
51
+ - TODO
49
52
  - VERSION
53
+ - adman.gemspec
50
54
  - lib/adman.rb
51
55
  - lib/adman/common.rb
52
56
  - lib/adman/dnssd.rb
53
57
  - test/helper.rb
54
58
  - test/test_adman.rb
55
- - README
56
- - TODO
57
59
  has_rdoc: true
58
60
  homepage: http://github.com/MarkBennett/adman
59
61
  licenses: []