ssp-cijoe 0.4.3 → 0.4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cijoe/campfire.rb +4 -8
- metadata +6 -5
data/lib/cijoe/campfire.rb
CHANGED
@@ -13,8 +13,7 @@ class CIJoe
|
|
13
13
|
puts "Can't load Campfire notifier."
|
14
14
|
puts "Please add the following to your project's .git/config:"
|
15
15
|
puts "[campfire]"
|
16
|
-
puts "\
|
17
|
-
puts "\tpass = passw0rd"
|
16
|
+
puts "\token = yourcampfiretoken"
|
18
17
|
puts "\tsubdomain = whatever"
|
19
18
|
puts "\troom = Awesomeness"
|
20
19
|
puts "\tssl = false"
|
@@ -23,16 +22,15 @@ class CIJoe
|
|
23
22
|
|
24
23
|
def self.config
|
25
24
|
@config ||= {
|
25
|
+
:token => Config.campfire.token.to_s,
|
26
26
|
:subdomain => Config.campfire.subdomain.to_s,
|
27
|
-
:user => Config.campfire.user.to_s,
|
28
|
-
:pass => Config.campfire.pass.to_s,
|
29
27
|
:room => Config.campfire.room.to_s,
|
30
28
|
:ssl => Config.campfire.ssl.to_s.strip == 'true'
|
31
29
|
}
|
32
30
|
end
|
33
31
|
|
34
32
|
def self.valid_config?
|
35
|
-
%w( subdomain
|
33
|
+
%w( token subdomain room ).all? do |key|
|
36
34
|
!config[key.intern].empty?
|
37
35
|
end
|
38
36
|
end
|
@@ -47,10 +45,8 @@ class CIJoe
|
|
47
45
|
def room
|
48
46
|
@room ||= begin
|
49
47
|
config = Campfire.config
|
50
|
-
options = {}
|
51
|
-
options[:ssl] = config[:ssl] ? true : false
|
48
|
+
options = { :ssl => config[:ssl], :token => config[:token] }
|
52
49
|
campfire = Tinder::Campfire.new(config[:subdomain], options)
|
53
|
-
campfire.login(config[:user], config[:pass])
|
54
50
|
campfire.find_room_by_name(config[:room])
|
55
51
|
end
|
56
52
|
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssp-cijoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 125
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
|
9
|
+
- 4
|
10
|
+
- 1
|
11
|
+
version: 0.4.4.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Chris Wanstrath
|
@@ -17,7 +18,7 @@ autorequire:
|
|
17
18
|
bindir: bin
|
18
19
|
cert_chain: []
|
19
20
|
|
20
|
-
date: 2010-
|
21
|
+
date: 2010-07-07 00:00:00 +02:00
|
21
22
|
default_executable: cijoe
|
22
23
|
dependencies:
|
23
24
|
- !ruby/object:Gem::Dependency
|
@@ -133,6 +134,6 @@ signing_key:
|
|
133
134
|
specification_version: 3
|
134
135
|
summary: CI Joe is a simple Continuous Integration server.
|
135
136
|
test_files:
|
137
|
+
- test/test_cijoe_server.rb
|
136
138
|
- test/helper.rb
|
137
139
|
- test/test_cijoe.rb
|
138
|
-
- test/test_cijoe_server.rb
|