hoptoad_notifier 2.3.8 → 2.3.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,29 @@
1
+ Version 2.3.9 - 2010-10-18
2
+ ===============================================================================
3
+
4
+ This patch release contains a handful of bugfixes, and ensures:
5
+ If hoptoadapp.com is completely unreachable by HTTP, your app is not affected.
6
+ Controller method #notify_hoptoad is available in Rails 3. Thanks contributor Kyle Crum!
7
+
8
+ Chad Pytel (1):
9
+ also handle Errno::ECONNREFUSED and other http errors
10
+
11
+ Jason Morrison (4):
12
+ Add gem versions to test suite
13
+ Revert "Revert "attempt to debug mail sending on staging""
14
+ Adding Heroku notifier readme
15
+ gracefully fall back to require 'activesupport' if require 'active_support' fails
16
+
17
+ Jon Yurek (2):
18
+ Bumping version to 2.3.8
19
+ Adds builder to the gemspec
20
+
21
+ Kyle Crum (3):
22
+ notify_hoptoad now works in rails 3 controllers
23
+ more sane way of testing for rails 3 controller methods
24
+ added a scenario for using the notify_hoptoad method within a controller
25
+
26
+
1
27
  Version 2.3.7 - 2010-09-15
2
28
  ===============================================================================
3
29
 
@@ -235,3 +261,4 @@ Nick Quaranto (3):
235
261
 
236
262
 
237
263
 
264
+
@@ -0,0 +1,77 @@
1
+ Hoptoad
2
+ ===========
3
+ Send your application errors to our hosted service and reclaim your inbox.
4
+
5
+ 1. Installing the Heroku add-on
6
+ ----------------------------
7
+ To use Hoptoad on Heroku, install the Hoptoad add-on:
8
+
9
+ $ heroku addons:add hoptoad:basic # This adds the the basic plan.
10
+ # If you'd like another plan, specify that instead.
11
+
12
+ 2. Including the Hoptoad notifier in your application
13
+ --------------------------------------------------
14
+ After adding the Hoptoad add-on, you will need to install and configure the Hoptoad notifier.
15
+
16
+ Your application connects to Hoptoad with an API key. On Heroku, this is automatically provided to your
17
+ application in `ENV['HOPTOAD_API_KEY']`, so installation should be a snap!
18
+
19
+ ### Rails 3.x
20
+
21
+ Add the hoptoad_notifier gem to your Gemfile. In Gemfile:
22
+
23
+ gem 'hoptoad_notifier'
24
+
25
+ Then from your project's RAILS_ROOT, run:
26
+
27
+ $ bundle install
28
+ $ script/rails generate hoptoad --heroku
29
+
30
+ ### Rails 2.x
31
+
32
+ Add the hoptoad_notifier gem to your app. In config/environment.rb:
33
+
34
+ config.gem 'hoptoad_notifier'
35
+
36
+ Then from your project's RAILS_ROOT, run:
37
+
38
+ $ rake gems:install
39
+ $ rake gems:unpack GEM=hoptoad_notifier
40
+ $ script/generate hoptoad --heroku
41
+
42
+ As always, if you choose not to vendor the hoptoad_notifier gem, make sure
43
+ every server you deploy to has the gem installed or your application won't start.
44
+
45
+ ### Rack applications
46
+
47
+ In order to use hoptoad_notifier in a non-Rails rack app, just load the hoptoad_notifier, configure your API key, and use the HoptoadNotifier::Rack middleware:
48
+
49
+ require 'rubygems'
50
+ require 'rack'
51
+ require 'hoptoad_notifier'
52
+
53
+ HoptoadNotifier.configure do |config|
54
+ config.api_key = `ENV['HOPTOAD_API_KEY']`
55
+ end
56
+
57
+ app = Rack::Builder.app do
58
+ use HoptoadNotifier::Rack
59
+ run lambda { |env| raise "Rack down" }
60
+ end
61
+
62
+ ### Rails 1.x
63
+
64
+ For Rails 1.x, visit the [Hoptoad notifier's README on GitHub](http://github.com/thoughtbot/hoptoad_notifier),
65
+ and be sure to use `ENV['HOPTOAD_API_KEY']` where your API key is required in configuration code.
66
+
67
+ 3. Configure your notification settings
68
+ -------------------------------------------
69
+
70
+ Once you have included and configured the notifier in your application,
71
+ you will want to configure your notification settings.
72
+
73
+ Hoptoad can deliver exception notifications to your email inbox. To configure these delivery settings:
74
+
75
+ 1. Visit your application's Hoptoad Add-on page, like [ http://api.heroku.com/myapps/my-great-app/addons/hoptoad:basic ](http://api.heroku.com/myapps/my-great-app/addons/hoptoad:basic)
76
+ 2. Click "Go to Hoptoad admin" to configure the Hoptoad Add-on on the Hoptoadapp.com website
77
+ 3. Click the "Profile" button in the header to edit your email address and notification settings.
data/Rakefile CHANGED
@@ -66,7 +66,7 @@ EOF
66
66
 
67
67
  File.open(file, "w") do |f|
68
68
  f.write <<EOF
69
- Version #{version} - #{Date.today}
69
+ Version #{version} - #{Time.now}
70
70
  ===============================================================================
71
71
 
72
72
  #{`git log $(git tag | tail -1)..HEAD | git shortlog`}
@@ -127,6 +127,7 @@ gemspec = Gem::Specification.new do |s|
127
127
  s.extra_rdoc_files = ["README.rdoc"]
128
128
  s.rdoc_options = ['--line-numbers', "--main", "README.rdoc"]
129
129
 
130
+ s.add_runtime_dependency("builder")
130
131
  s.add_runtime_dependency("activesupport")
131
132
  s.add_development_dependency("activerecord")
132
133
  s.add_development_dependency("actionpack")
@@ -1,7 +1,11 @@
1
1
  require 'net/http'
2
2
  require 'net/https'
3
3
  require 'rubygems'
4
- require 'active_support'
4
+ begin
5
+ require 'active_support'
6
+ rescue LoadError
7
+ require 'activesupport'
8
+ end
5
9
  require 'hoptoad_notifier/version'
6
10
  require 'hoptoad_notifier/configuration'
7
11
  require 'hoptoad_notifier/notice'
@@ -6,10 +6,18 @@ module HoptoadNotifier
6
6
  # This method should be used for sending manual notifications while you are still
7
7
  # inside the controller. Otherwise it works like HoptoadNotifier.notify.
8
8
  def notify_hoptoad(hash_or_exception)
9
- unless consider_all_requests_local || local_request?
9
+ unless hoptoad_local_request?
10
10
  HoptoadNotifier.notify(hash_or_exception, hoptoad_request_data)
11
11
  end
12
12
  end
13
+
14
+ def hoptoad_local_request?
15
+ if defined?(::Rails.application.config)
16
+ ::Rails.application.config.consider_all_requests_local || request.local?
17
+ else
18
+ consider_all_requests_local || local_request?
19
+ end
20
+ end
13
21
 
14
22
  def hoptoad_ignore_user_agent? #:nodoc:
15
23
  # Rails 1.2.6 doesn't have request.user_agent, so check for it here
@@ -21,7 +21,9 @@ module HoptoadNotifier
21
21
 
22
22
  if defined?(::ActionController::Base)
23
23
  require 'hoptoad_notifier/rails/javascript_notifier'
24
-
24
+ require 'hoptoad_notifier/rails/controller_methods'
25
+
26
+ ::ActionController::Base.send(:include, HoptoadNotifier::Rails::ControllerMethods)
25
27
  ::ActionController::Base.send(:include, HoptoadNotifier::Rails::JavascriptNotifier)
26
28
  end
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module HoptoadNotifier
2
- VERSION = "2.3.8".freeze
2
+ VERSION = "2.3.9".freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoptoad_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
4
  prerelease: false
6
5
  segments:
7
6
  - 2
8
7
  - 3
9
- - 8
10
- version: 2.3.8
8
+ - 9
9
+ version: 2.3.9
11
10
  platform: ruby
12
11
  authors:
13
12
  - thoughtbot, inc
@@ -15,93 +14,93 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-29 00:00:00 -04:00
17
+ date: 2010-10-18 00:00:00 -04:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: activesupport
21
+ name: builder
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 3
30
27
  segments:
31
28
  - 0
32
29
  version: "0"
33
30
  type: :runtime
34
31
  version_requirements: *id001
35
32
  - !ruby/object:Gem::Dependency
36
- name: activerecord
33
+ name: activesupport
37
34
  prerelease: false
38
35
  requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ">="
42
38
  - !ruby/object:Gem::Version
43
- hash: 3
44
39
  segments:
45
40
  - 0
46
41
  version: "0"
47
- type: :development
42
+ type: :runtime
48
43
  version_requirements: *id002
49
44
  - !ruby/object:Gem::Dependency
50
- name: actionpack
45
+ name: activerecord
51
46
  prerelease: false
52
47
  requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
48
  requirements:
55
49
  - - ">="
56
50
  - !ruby/object:Gem::Version
57
- hash: 3
58
51
  segments:
59
52
  - 0
60
53
  version: "0"
61
54
  type: :development
62
55
  version_requirements: *id003
63
56
  - !ruby/object:Gem::Dependency
64
- name: jferris-mocha
57
+ name: actionpack
65
58
  prerelease: false
66
59
  requirement: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
61
  - - ">="
70
62
  - !ruby/object:Gem::Version
71
- hash: 3
72
63
  segments:
73
64
  - 0
74
65
  version: "0"
75
66
  type: :development
76
67
  version_requirements: *id004
77
68
  - !ruby/object:Gem::Dependency
78
- name: nokogiri
69
+ name: jferris-mocha
79
70
  prerelease: false
80
71
  requirement: &id005 !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ">="
84
74
  - !ruby/object:Gem::Version
85
- hash: 3
86
75
  segments:
87
76
  - 0
88
77
  version: "0"
89
78
  type: :development
90
79
  version_requirements: *id005
91
80
  - !ruby/object:Gem::Dependency
92
- name: shoulda
81
+ name: nokogiri
93
82
  prerelease: false
94
83
  requirement: &id006 !ruby/object:Gem::Requirement
95
- none: false
96
84
  requirements:
97
85
  - - ">="
98
86
  - !ruby/object:Gem::Version
99
- hash: 3
100
87
  segments:
101
88
  - 0
102
89
  version: "0"
103
90
  type: :development
104
91
  version_requirements: *id006
92
+ - !ruby/object:Gem::Dependency
93
+ name: shoulda
94
+ prerelease: false
95
+ requirement: &id007 !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ type: :development
103
+ version_requirements: *id007
105
104
  description:
106
105
  email: support@hoptoadapp.com
107
106
  executables: []
@@ -116,6 +115,7 @@ files:
116
115
  - MIT-LICENSE
117
116
  - Rakefile
118
117
  - README.rdoc
118
+ - README_FOR_HEROKU_ADDON.md
119
119
  - SUPPORTED_RAILS_VERSIONS
120
120
  - TESTING.rdoc
121
121
  - generators/hoptoad/hoptoad_generator.rb
@@ -169,27 +169,23 @@ rdoc_options:
169
169
  require_paths:
170
170
  - lib
171
171
  required_ruby_version: !ruby/object:Gem::Requirement
172
- none: false
173
172
  requirements:
174
173
  - - ">="
175
174
  - !ruby/object:Gem::Version
176
- hash: 3
177
175
  segments:
178
176
  - 0
179
177
  version: "0"
180
178
  required_rubygems_version: !ruby/object:Gem::Requirement
181
- none: false
182
179
  requirements:
183
180
  - - ">="
184
181
  - !ruby/object:Gem::Version
185
- hash: 3
186
182
  segments:
187
183
  - 0
188
184
  version: "0"
189
185
  requirements: []
190
186
 
191
187
  rubyforge_project:
192
- rubygems_version: 1.3.7
188
+ rubygems_version: 1.3.6
193
189
  signing_key:
194
190
  specification_version: 3
195
191
  summary: Send your application errors to our hosted service and reclaim your inbox.