chatterbox 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.8.3
4
+ - Include Chatterbox version at the bottom of exception notifications
5
+
3
6
  ### 0.8.2
4
7
  - Fix Github Issue #2: In email service, change incoming default configuration to HashWithIndifferentAccess: fixes a bug that would result in default configuration always winning over per-message configuration.
5
8
 
data/Rakefile CHANGED
@@ -3,9 +3,12 @@ require 'cucumber/rake/task'
3
3
 
4
4
  begin
5
5
  require 'jeweler'
6
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'lib'))
7
+ require 'chatterbox/version'
6
8
  Jeweler::Tasks.new do |gem|
7
9
  gem.name = "chatterbox"
8
10
  gem.summary = %Q{Notifications and messages}
11
+ gem.version = Chatterbox::Version::STRING
9
12
  gem.description = "Send notifications and messages. However you want."
10
13
  gem.email = "rsanheim@gmail.com"
11
14
  gem.homepage = "http://github.com/rsanheim/chatterbox"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chatterbox}
8
- s.version = "0.8.2"
8
+ s.version = "0.8.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rob Sanheim"]
12
- s.date = %q{2009-12-02}
12
+ s.date = %q{2009-12-07}
13
13
  s.description = %q{Send notifications and messages. However you want.}
14
14
  s.email = %q{rsanheim@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  "LICENSE",
23
23
  "README.markdown",
24
24
  "Rakefile",
25
- "VERSION.yml",
26
25
  "chatterbox.gemspec",
27
26
  "examples/example_helper.rb",
28
27
  "examples/lib/chatterbox/exception_notification/extracter_example.rb",
@@ -38,8 +37,10 @@ Gem::Specification.new do |s|
38
37
  "examples/lib/chatterbox_example.rb",
39
38
  "features/api.feature",
40
39
  "features/email_service.feature",
40
+ "features/exception_notification.feature",
41
41
  "features/services.feature",
42
42
  "features/step_definitions/email_service_steps.rb",
43
+ "features/step_definitions/exception_notification_steps.rb",
43
44
  "features/support/env.rb",
44
45
  "init.rb",
45
46
  "lib/chatterbox.rb",
@@ -53,6 +54,7 @@ Gem::Specification.new do |s|
53
54
  "lib/chatterbox/services/email.rb",
54
55
  "lib/chatterbox/services/email/mailer.rb",
55
56
  "lib/chatterbox/services/email/views/chatterbox/services/email/mailer/message.erb",
57
+ "lib/chatterbox/version.rb",
56
58
  "rails/init.rb",
57
59
  "tmp/.gitignore",
58
60
  "todo.markdown",
@@ -0,0 +1,31 @@
1
+ Feature: Exception Notification
2
+
3
+ As a Chatterbox user
4
+ I want to use Chatterbox for exception notifications
5
+ So that I can deliver notifications over email
6
+
7
+ Scenario: Exceptions include the Chatterbox version string
8
+ Given a file named "exceptions.rb" with:
9
+ """
10
+ require "chatterbox"
11
+ require "chatterbox/exception_notification"
12
+ require "chatterbox/services/email"
13
+ ActionMailer::Base.delivery_method = :test
14
+
15
+ Chatterbox::Publishers.register do |notice|
16
+ Chatterbox::Services::Email.deliver(notice)
17
+ end
18
+
19
+ begin
20
+ 1 / 0
21
+ rescue => exception
22
+ Chatterbox::ExceptionNotification.handle(:exception => exception,
23
+ :config => { :to => "to@example.com", :from => "from@example.com" })
24
+ end
25
+
26
+ puts ActionMailer::Base.deliveries.last.encoded
27
+ """
28
+ When I run "exceptions.rb"
29
+ Then the exit code should be 0
30
+ And the stdout should contain the Chatterbox version string message
31
+
@@ -0,0 +1,4 @@
1
+ Then /^the stdout should contain the Chatterbox version string message$/ do
2
+ version = Chatterbox::Version::STRING
3
+ Then %{the stdout should match "Chatterbox Version #{version}"}
4
+ end
@@ -1,3 +1,5 @@
1
+ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. lib])))
2
+ require 'chatterbox'
1
3
  require 'tempfile'
2
4
  require 'pathname'
3
5
  require 'spec'
@@ -74,4 +74,5 @@ module Chatterbox
74
74
  end
75
75
  end
76
76
 
77
- require "chatterbox/services"
77
+ require "chatterbox/services"
78
+ require "chatterbox/version"
@@ -16,7 +16,8 @@ module Chatterbox::ExceptionNotification
16
16
 
17
17
  def extract_default_info(hash)
18
18
  hsh = { :summary => "N/A",
19
- :environment => ENV.to_hash
19
+ :environment => ENV.to_hash,
20
+ :chatterbox_info => "Chatterbox Version #{Chatterbox::Version::STRING}"
20
21
  }.merge(hash)
21
22
  end
22
23
 
@@ -25,7 +25,7 @@ module Chatterbox::ExceptionNotification
25
25
  end
26
26
 
27
27
  def error_details
28
- [:error_message, :request, :backtrace, :environment, :ruby_info, :rails_info]
28
+ [:error_message, :request, :backtrace, :environment, :ruby_info, :rails_info, :chatterbox_info]
29
29
  end
30
30
 
31
31
  def render_body
@@ -0,0 +1,13 @@
1
+ module Chatterbox # :nodoc:
2
+ module Version # :nodoc:
3
+ unless defined?(MAJOR)
4
+ MAJOR = 0
5
+ MINOR = 8
6
+ TINY = 3
7
+
8
+ STRING = [MAJOR, MINOR, TINY].compact.join('.')
9
+
10
+ SUMMARY = "chatterbox " + STRING
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chatterbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-02 00:00:00 -05:00
12
+ date: 2009-12-07 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,6 @@ files:
67
67
  - LICENSE
68
68
  - README.markdown
69
69
  - Rakefile
70
- - VERSION.yml
71
70
  - chatterbox.gemspec
72
71
  - examples/example_helper.rb
73
72
  - examples/lib/chatterbox/exception_notification/extracter_example.rb
@@ -83,8 +82,10 @@ files:
83
82
  - examples/lib/chatterbox_example.rb
84
83
  - features/api.feature
85
84
  - features/email_service.feature
85
+ - features/exception_notification.feature
86
86
  - features/services.feature
87
87
  - features/step_definitions/email_service_steps.rb
88
+ - features/step_definitions/exception_notification_steps.rb
88
89
  - features/support/env.rb
89
90
  - init.rb
90
91
  - lib/chatterbox.rb
@@ -98,6 +99,7 @@ files:
98
99
  - lib/chatterbox/services/email.rb
99
100
  - lib/chatterbox/services/email/mailer.rb
100
101
  - lib/chatterbox/services/email/views/chatterbox/services/email/mailer/message.erb
102
+ - lib/chatterbox/version.rb
101
103
  - rails/init.rb
102
104
  - tmp/.gitignore
103
105
  - todo.markdown
@@ -1,5 +0,0 @@
1
- ---
2
- :major: 0
3
- :minor: 8
4
- :patch: 2
5
- :build: