cijoe 0.6.0 → 0.7.0

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.
data/README.md CHANGED
@@ -75,16 +75,17 @@ Campfire notification is included, because it's what we use. Want Joe
75
75
  notify your Campfire? Put this in your repo's `.git/config`:
76
76
 
77
77
  [campfire]
78
- user = your@campfire.email
79
- pass = passw0rd
80
- subdomain = whatever
81
- room = Awesomeness
82
- ssl = false
78
+ token = your_api_token
79
+ subdomain = whatever
80
+ room = Awesomeness
81
+ ssl = false
82
+
83
+ Note: your API token may differ between subdomains!
83
84
 
84
85
  Or do it the old fashion way:
85
86
 
86
87
  $ cd yourrepo
87
- $ git config --add campfire.user chris@ozmm.org
88
+ $ git config --add campfire.token 98ADFLKJSDOIU7BLAH
88
89
  $ git config --add campfire.subdomain github
89
90
  etc.
90
91
 
@@ -15,8 +15,7 @@ class CIJoe
15
15
  puts "Can't load Campfire notifier."
16
16
  puts "Please add the following to your project's .git/config:"
17
17
  puts "[campfire]"
18
- puts "\tuser = your@campfire.email"
19
- puts "\tpass = passw0rd"
18
+ puts "\ttoken = your_api_token"
20
19
  puts "\tsubdomain = whatever"
21
20
  puts "\troom = Awesomeness"
22
21
  puts "\tssl = false"
@@ -26,16 +25,15 @@ class CIJoe
26
25
  def self.config
27
26
  campfire_config = Config.new('campfire', @project_path)
28
27
  @config ||= {
29
- :subdomain => campfire_config.subdomain.to_s,
30
- :user => campfire_config.user.to_s,
31
- :pass => campfire_config.pass.to_s,
32
- :room => campfire_config.room.to_s,
33
- :ssl => campfire_config.ssl.to_s.strip == 'true'
28
+ :subdomain => Config.campfire(@project_path).subdomain.to_s,
29
+ :token => Config.campfire(@project_path).token.to_s,
30
+ :room => Config.campfire(@project_path).room.to_s,
31
+ :ssl => Config.campfire(@project_path).ssl.to_s.strip == 'true'
34
32
  }
35
33
  end
36
34
 
37
35
  def self.valid_config?
38
- %w( subdomain user pass room ).all? do |key|
36
+ %w( subdomain token room ).all? do |key|
39
37
  !config[key.intern].empty?
40
38
  end
41
39
  end
@@ -51,8 +49,7 @@ class CIJoe
51
49
  @room ||= begin
52
50
  config = Campfire.config
53
51
  campfire = Tinder::Campfire.new(config[:subdomain],
54
- :username => config[:user],
55
- :password => config[:pass],
52
+ :token => config[:token],
56
53
  :ssl => config[:ssl] || false)
57
54
  campfire.find_room_by_name(config[:room])
58
55
  end
@@ -1,3 +1,3 @@
1
1
  class CIJoe
2
- Version = VERSION = "0.6.0"
2
+ Version = VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 6
7
+ - 7
8
8
  - 0
9
- version: 0.6.0
9
+ version: 0.7.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Chris Wanstrath