From 1499a920ed16583807d03043a43647d0db9f3c58 Mon Sep 17 00:00:00 2001 From: Justin Marney Date: Wed, 17 Nov 2010 15:31:57 -0500 Subject: [PATCH] changes from upstream that aren't merged into master...meh --- lib/cijoe/campfire.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/cijoe/campfire.rb b/lib/cijoe/campfire.rb index 7a05cd1..e7a390b 100644 --- a/lib/cijoe/campfire.rb +++ b/lib/cijoe/campfire.rb @@ -15,8 +15,7 @@ def self.activate(project_path) puts "Can't load Campfire notifier." puts "Please add the following to your project's .git/config:" puts "[campfire]" - puts "\tuser = your@campfire.email" - puts "\tpass = passw0rd" + puts "\ttoken = your_api_token" puts "\tsubdomain = whatever" puts "\troom = Awesomeness" puts "\tssl = false" @@ -26,16 +25,15 @@ def self.activate(project_path) def self.config campfire_config = Config.new('campfire', @project_path) @config ||= { - :subdomain => campfire_config.subdomain.to_s, - :user => campfire_config.user.to_s, - :pass => campfire_config.pass.to_s, - :room => campfire_config.room.to_s, - :ssl => campfire_config.ssl.to_s.strip == 'true' + :subdomain => Config.campfire.subdomain.to_s, + :token => Config.campfire.token.to_s, + :room => Config.campfire.room.to_s, + :ssl => Config.campfire.ssl.to_s.strip == 'true' } end def self.valid_config? - %w( subdomain user pass room ).all? do |key| + %w( subdomain token room ).all? do |key| !config[key.intern].empty? end end @@ -51,8 +49,7 @@ def room @room ||= begin config = Campfire.config campfire = Tinder::Campfire.new(config[:subdomain], - :username => config[:user], - :password => config[:pass], + :token => config[:token], :ssl => config[:ssl] || false) campfire.find_room_by_name(config[:room]) end