public
Fork of relevance/smoke_signals
Description: CruiseControl.rb Campfire notifications
Homepage: http://opensource.thinkrelevance.com/wiki/smoke_signals
Clone URL: git://github.com/reagent/smoke_signals.git
smoke_signals / Rakefile
100644 74 lines (53 sloc) 1.681 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
66
67
68
69
70
71
72
73
74
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/gempackagetask'
 
GEM = "smoke_signals"
VERSION = "0.2.0"
 
AUTHOR = "####"
EMAIL = "opensource@thinkrelevance.com"
HOMEPAGE = "http://opensource.thinkrelevance.com/wiki/smoke_signals"
SUMMARY = "A plugin for CruiseControl.rb to send notifications to Campfire"
 
spec = Gem::Specification.new do |s|
  s.name = GEM
  s.version = VERSION
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  s.extra_rdoc_files = ["README"]
  s.summary = SUMMARY
  s.description = s.summary
  s.author = AUTHOR
  s.email = EMAIL
  s.homepage = HOMEPAGE
  
  # Uncomment this to add a dependency
  s.add_dependency "foo", '>=0.1.4'
  
  s.executables = ['smoke_signals']
  
  s.require_path = 'lib'
  s.files = %w(README USAGE Rakefile init.rb) + Dir.glob("{lib,specs,config}/**/*")
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end
 
task :install => [:package] do
  sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
end
 
desc 'Default: run tests.'
task :default => :test
 
desc 'Default for CruiseControl'
task :cruise => :test
 
desc 'Test the relevance_tools plugin.'
Rake::TestTask.new(:test) do |t|
  t.pattern = 'test/examples/**/*_test.rb'
  t.verbose = true
end
 
desc "Attempt to speak into a room"
task :speak do
  require 'lib/setting'
  require 'lib/connection'
  require 'lib/room'
  
  room_name = ENV['ROOM'] || 'Development'
  message = ENV['MESSAGE'] || 'Hello, world!'
  
  Connection.logger = Logger.new(File.dirname(__FILE__) + '/test/log/smoke_signals_development.log')
  
  Setting.file = File.dirname(__FILE__) + '/config/smoke_signals.yml'
  Room.new(room_name).speak(message)
end