public
Description: Publish your web app in the ether using Bonjour.
Homepage:
Clone URL: git://github.com/lachie/appjour.git
Click here to lend your support to: appjour and make a donation at www.pledgie.com !
appjour / Rakefile
100644 65 lines (55 sloc) 1.72 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
require "date"
require "fileutils"
require "rubygems"
require "rake/gempackagetask"
require "spec/rake/spectask"
 
require "./lib/appjour/version.rb"
 
appjour_gemspec = Gem::Specification.new do |s|
  s.name = "appjour"
  s.version = Appjour::VERSION
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  s.extra_rdoc_files = ["README.rdoc"]
  s.summary = "Announce an app over bonjour"
  s.description = s.summary
  s.authors = ["Lachie"]
  s.email = "lachiec@gmail.com"
  s.homepage = "http://github.com/lachie/appjour"
  s.require_path = "lib"
  s.autorequire = "appjour"
  s.files = %w(README.rdoc Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
  s.executables = %w(appjour)
  
  s.add_dependency "dnssd", ">= 0.6.0"
end
 
Rake::GemPackageTask.new(appjour_gemspec) do |pkg|
  pkg.gem_spec = appjour_gemspec
end
 
namespace :gem do
  namespace :spec do
    desc "Update appjour.gemspec"
    task :generate do
      File.open("appjour.gemspec", "w") do |f|
        f.puts(appjour_gemspec.to_ruby)
      end
    end
    
    desc "test spec in github cleanroom"
    task :test do
      require 'rubygems/specification'
      data = File.read('appjour.gemspec')
      spec = nil
      Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
      puts spec
    end
  end
end
 
task :install => :package do
  sh %{sudo gem install --local pkg/appjour-#{Appjour::VERSION}}
end
 
desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
  t.spec_files = FileList["spec/**/*_spec.rb"]
  t.spec_opts = ["--options", "spec/spec.opts"]
end
 
task :default => :spec
 
desc "Remove all generated artifacts"
task :clean => :clobber_package