hipchat 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,4 +6,8 @@ group :test do
6
6
  gem "rake"
7
7
  gem "rspec"
8
8
  gem "rr"
9
+ end
10
+
11
+ group :development do
12
+ gem "jeweler"
9
13
  end
@@ -2,12 +2,21 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  diff-lcs (1.1.3)
5
+ git (1.2.5)
5
6
  httparty (0.9.0)
6
7
  multi_json (~> 1.0)
7
8
  multi_xml
9
+ jeweler (1.8.4)
10
+ bundler (~> 1.0)
11
+ git (>= 1.2.5)
12
+ rake
13
+ rdoc
14
+ json (1.7.7)
8
15
  multi_json (1.3.6)
9
16
  multi_xml (0.5.1)
10
17
  rake (0.9.2.2)
18
+ rdoc (3.12)
19
+ json (~> 1.4)
11
20
  rr (1.0.4)
12
21
  rspec (2.11.0)
13
22
  rspec-core (~> 2.11.0)
@@ -23,6 +32,7 @@ PLATFORMS
23
32
 
24
33
  DEPENDENCIES
25
34
  httparty
35
+ jeweler
26
36
  rake
27
37
  rr
28
38
  rspec
@@ -35,7 +35,8 @@ bc.. require 'hipchat/capistrano'
35
35
  set :hipchat_token, "<your token>"
36
36
  set :hipchat_room_name, "Your room" # If you pass an array such as ["room_a", "room_b"] you can send announcements to multiple rooms.
37
37
  set :hipchat_announce, false # notify users
38
- set :hipchat_color, 'green' #finished deployment message color
38
+ set :hipchat_color, 'yellow' #normal message color
39
+ set :hipchat_success_color, 'green' #finished deployment message color
39
40
  set :hipchat_failed_color, 'red' #cancelled deployment message color
40
41
  set :hipchat_message_format, 'text' # Sets the deployment message format, see https://www.hipchat.com/docs/api/method/rooms/message
41
42
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.8.0
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{hipchat}
8
- s.version = "0.7.0"
7
+ s.name = "hipchat"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["HipChat/Atlassian"]
12
- s.date = %q{2012-11-10}
13
- s.description = %q{Ruby library to interact with HipChat}
14
- s.email = %q{support@hipchat.com}
12
+ s.date = "2013-03-15"
13
+ s.description = "Ruby library to interact with HipChat"
14
+ s.email = "support@hipchat.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.textile"
@@ -35,28 +35,30 @@ Gem::Specification.new do |s|
35
35
  "spec/spec.opts",
36
36
  "spec/spec_helper.rb"
37
37
  ]
38
- s.homepage = %q{https://github.com/hipchat/hipchat-rb}
38
+ s.homepage = "https://github.com/hipchat/hipchat-rb"
39
39
  s.require_paths = ["lib"]
40
- s.rubygems_version = %q{1.3.6}
41
- s.summary = %q{Ruby library to interact with HipChat}
40
+ s.rubygems_version = "1.8.24"
41
+ s.summary = "Ruby library to interact with HipChat"
42
42
 
43
43
  if s.respond_to? :specification_version then
44
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
44
  s.specification_version = 3
46
45
 
47
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
47
  s.add_runtime_dependency(%q<httparty>, [">= 0"])
48
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
49
49
  s.add_runtime_dependency(%q<httparty>, [">= 0"])
50
50
  s.add_development_dependency(%q<rspec>, ["~> 2.0"])
51
51
  s.add_development_dependency(%q<rr>, ["~> 1.0"])
52
52
  else
53
53
  s.add_dependency(%q<httparty>, [">= 0"])
54
+ s.add_dependency(%q<jeweler>, [">= 0"])
54
55
  s.add_dependency(%q<httparty>, [">= 0"])
55
56
  s.add_dependency(%q<rspec>, ["~> 2.0"])
56
57
  s.add_dependency(%q<rr>, ["~> 1.0"])
57
58
  end
58
59
  else
59
60
  s.add_dependency(%q<httparty>, [">= 0"])
61
+ s.add_dependency(%q<jeweler>, [">= 0"])
60
62
  s.add_dependency(%q<httparty>, [">= 0"])
61
63
  s.add_dependency(%q<rspec>, ["~> 2.0"])
62
64
  s.add_dependency(%q<rr>, ["~> 1.0"])
@@ -15,17 +15,30 @@ Capistrano::Configuration.instance(:must_exist).load do
15
15
 
16
16
  task :notify_deploy_started do
17
17
  if hipchat_send_notification
18
+
19
+ environment_string = env
20
+ if self.respond_to?(:stage)
21
+ environment_string = "#{stage} (#{env})"
22
+ end
23
+
18
24
  on_rollback do
19
25
  send_options.merge!(:color => failed_message_color)
20
- send("#{human} cancelled deployment of #{deployment_name} to #{env}.", send_options)
26
+ send("#{human} cancelled deployment of #{deployment_name} to #{environment_string}.", send_options)
21
27
  end
22
28
 
23
- send("#{human} is deploying #{deployment_name} to #{env}#{fetch(:hipchat_with_migrations, '')}.", send_options)
29
+ send("#{human} is deploying #{deployment_name} to #{environment_string}#{fetch(:hipchat_with_migrations, '')}.", send_options)
24
30
  end
25
31
  end
26
32
 
27
33
  task :notify_deploy_finished do
28
- send("#{human} finished deploying #{deployment_name} to #{env}#{fetch(:hipchat_with_migrations, '')}.", send_options)
34
+ send_options.merge!(:color => success_message_color)
35
+
36
+ environment_string = env
37
+ if self.respond_to?(:stage)
38
+ environment_string = "#{stage} (#{env})"
39
+ end
40
+
41
+ send("#{human} finished deploying #{deployment_name} to #{environment_string}#{fetch(:hipchat_with_migrations, '')}.", send_options)
29
42
  end
30
43
 
31
44
  def send_options
@@ -53,8 +66,10 @@ Capistrano::Configuration.instance(:must_exist).load do
53
66
  end
54
67
 
55
68
  def deployment_name
56
- if branch
57
- "#{application}/#{branch}"
69
+ if fetch(:branch, nil)
70
+ name = "#{application}/#{branch}"
71
+ name += " (revision #{real_revision[0..7]})" if real_revision
72
+ name
58
73
  else
59
74
  application
60
75
  end
@@ -64,6 +79,10 @@ Capistrano::Configuration.instance(:must_exist).load do
64
79
  fetch(:hipchat_color, nil)
65
80
  end
66
81
 
82
+ def success_message_color
83
+ fetch(:hipchat_success_color, "green")
84
+ end
85
+
67
86
  def failed_message_color
68
87
  fetch(:hipchat_failed_color, "red")
69
88
  end
metadata CHANGED
@@ -1,82 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hipchat
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 7
8
- - 0
9
- version: 0.7.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - HipChat/Atlassian
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2012-11-10 00:00:00 -08:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- prerelease: false
22
- type: :runtime
12
+ date: 2013-03-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: httparty
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
31
- requirement: *id001
32
- - !ruby/object:Gem::Dependency
33
- prerelease: false
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
34
22
  type: :runtime
35
- name: httparty
36
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- version: "0"
43
- requirement: *id002
44
- - !ruby/object:Gem::Dependency
45
23
  prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: jeweler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: httparty
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
47
63
  name: rspec
48
- version_requirements: &id003 !ruby/object:Gem::Requirement
49
- requirements:
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
50
67
  - - ~>
51
- - !ruby/object:Gem::Version
52
- segments:
53
- - 2
54
- - 0
55
- version: "2.0"
56
- requirement: *id003
57
- - !ruby/object:Gem::Dependency
58
- prerelease: false
68
+ - !ruby/object:Gem::Version
69
+ version: '2.0'
59
70
  type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '2.0'
78
+ - !ruby/object:Gem::Dependency
60
79
  name: rr
61
- version_requirements: &id004 !ruby/object:Gem::Requirement
62
- requirements:
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
63
83
  - - ~>
64
- - !ruby/object:Gem::Version
65
- segments:
66
- - 1
67
- - 0
68
- version: "1.0"
69
- requirement: *id004
84
+ - !ruby/object:Gem::Version
85
+ version: '1.0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '1.0'
70
94
  description: Ruby library to interact with HipChat
71
95
  email: support@hipchat.com
72
96
  executables: []
73
-
74
97
  extensions: []
75
-
76
- extra_rdoc_files:
98
+ extra_rdoc_files:
77
99
  - LICENSE
78
100
  - README.textile
79
- files:
101
+ files:
80
102
  - .document
81
103
  - .travis.yml
82
104
  - Gemfile
@@ -94,35 +116,31 @@ files:
94
116
  - spec/hipchat_spec.rb
95
117
  - spec/spec.opts
96
118
  - spec/spec_helper.rb
97
- has_rdoc: true
98
119
  homepage: https://github.com/hipchat/hipchat-rb
99
120
  licenses: []
100
-
101
121
  post_install_message:
102
122
  rdoc_options: []
103
-
104
- require_paths:
123
+ require_paths:
105
124
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- segments:
111
- - 0
112
- version: "0"
113
- required_rubygems_version: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- segments:
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ! '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ segments:
118
132
  - 0
119
- version: "0"
133
+ hash: 2556426077503697686
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
120
140
  requirements: []
121
-
122
141
  rubyforge_project:
123
- rubygems_version: 1.3.6
142
+ rubygems_version: 1.8.24
124
143
  signing_key:
125
144
  specification_version: 3
126
145
  summary: Ruby library to interact with HipChat
127
146
  test_files: []
128
-