sr-integrity-irc 0.0.1 → 0.0.2

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.
@@ -1,3 +1,3 @@
1
1
  %p.normal
2
2
  %label{ :for => 'irc_notifier_uri' } Send to
3
- %input.text#irc_notifier_uri{ :name => 'notifiers[IRC][uri]', :type => 'text', :value => config['uri'] || 'irc://irc.freenode.net:6667/integrity' }
3
+ %input.text#irc_notifier_uri{ :name => 'notifiers[IRC][uri]', :type => 'text', :value => config['uri'] || 'irc://irc.freenode.net:6667/test' }
data/lib/notifier/irc.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rubygems'
2
- require 'integrity' unless defined?(:Integrity)
2
+ require 'integrity' unless defined?(Integrity)
3
3
  require 'shout-bot'
4
4
 
5
5
  module Integrity
@@ -18,7 +18,7 @@ module Integrity
18
18
 
19
19
  def deliver!
20
20
  ShoutBot.shout(uri, :as => "IntegrityBot") do |channel|
21
- channel.say short_message
21
+ channel.say "#{build.project.name}: #{short_message}"
22
22
  channel.say build_url
23
23
  end
24
24
  end
data/spec/irc_spec.rb CHANGED
@@ -29,7 +29,7 @@ describe Integrity::Notifier::IRC do
29
29
  the_form.should have_textfield("irc_notifier_uri").
30
30
  named("notifiers[IRC][uri]").
31
31
  with_label("Send to").
32
- with_value("irc://irc.freenode.net:6667/integrity")
32
+ with_value("irc://irc.freenode.net:6667/test")
33
33
  end
34
34
 
35
35
  it "should use the config's 'uri' value if available" do
@@ -56,9 +56,10 @@ describe Integrity::Notifier::IRC do
56
56
  do_notify
57
57
  end
58
58
 
59
- it "should give the build status" do
60
- notifier.should_receive(:short_message).and_return("foobar")
61
- @channel.should_receive(:say).with("foobar")
59
+ it "should give the build status and project name" do
60
+ notifier.build.project.should_receive(:name).and_return("Integrity")
61
+ notifier.should_receive(:short_message).and_return("short message")
62
+ @channel.should_receive(:say).with("Integrity: short message")
62
63
  do_notify
63
64
  end
64
65
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sr-integrity-irc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Rozet