hoptoad_notifier 2.2.0 → 2.2.2

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/CHANGELOG CHANGED
@@ -1,3 +1,35 @@
1
+ Version 2.2.2 - 2010-03-10
2
+ ===============================================================================
3
+
4
+ Chad Pytel (1):
5
+ document proxy support
6
+
7
+ Joe Ferris (8):
8
+ Added upgrade instructions to the README
9
+ Give a clearer error message when generating a Rails app fails
10
+ Fail loudly when a gem can't be vendored
11
+ Debugging rubygems issues
12
+ Explicitly specify the gem paths
13
+ Less noisy
14
+ Restore gem path after vendoring
15
+ Fixed a typo
16
+
17
+ Jon Yurek (1):
18
+ Added notice about removing hoptoad rake tasks to upgrade gem
19
+
20
+ Mike Burns (1):
21
+ Remove stray file with notes in it
22
+
23
+
24
+ Version 2.2.1 - 2010-03-10
25
+ ===============================================================================
26
+
27
+ Jason Morrison (3):
28
+ LH-629 Ensure notifier is not considered a framework gem
29
+ Removing things-the-generator-must-do file
30
+ Add rake cucumber:wip:rails* tasks for work-in-progress features
31
+
32
+
1
33
  Version 2.2.0 - 2010-02-18
2
34
  ===============================================================================
3
35
 
@@ -39,3 +71,5 @@ Nick Quaranto (3):
39
71
 
40
72
 
41
73
 
74
+
75
+
data/README.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This is the notifier gem for integrating apps with Hoptoad.
4
4
 
5
- When an uncaught exception occurs, HoptoadNotifier will POST the relevant data
5
+ When an uncaught exception occurs, HoptoadNotifier will POST the relevant data
6
6
  to the Hoptoad server specified in your environment.
7
7
 
8
8
  == Help
@@ -48,7 +48,7 @@ every server you deploy to has the gem installed or your application won't start
48
48
 
49
49
  === Rails 1.2.6
50
50
 
51
- Install the hoptoad_notifier gem:
51
+ Install the hoptoad_notifier gem:
52
52
 
53
53
  gem install hoptoad_notifier
54
54
 
@@ -75,19 +75,70 @@ Next add something like this at the bottom of your config/environment.rb:
75
75
  You will also need to copy the hoptoad_notifier_tasks.rake file into your
76
76
  RAILS_ROOT/lib/tasks directory in order for the rake hoptoad:test task to work:
77
77
 
78
- cp vendor/gems/hoptoad_notifier-2.1.3/generators/hoptoad/templates/hoptoad_notifier_tasks.rake lib/tasks
78
+ cp vendor/gems/hoptoad_notifier-*/generators/hoptoad/templates/hoptoad_notifier_tasks.rake lib/tasks
79
79
 
80
80
  As always, if you choose not to vendor the hoptoad_notifier gem, make sure
81
81
  every server you deploy to has the gem installed or your application won't start.
82
82
 
83
+ === Upgrading From Earlier Versions of Hoptoad
84
+
85
+ If you're currently using the plugin version (if you have a
86
+ vendor/plugins/hoptoad_notifier directory, you are), you'll need to perform a
87
+ few extra steps when upgrading to the gem version.
88
+
89
+ Add the hoptoad_notifier gem to your app. In config/environment.rb:
90
+
91
+ config.gem 'hoptoad_notifier'
92
+
93
+ Remove the plugin:
94
+
95
+ rm -rf vendor/plugins/hoptoad_notifier
96
+
97
+ Before running the hoptoad generator, you need to find your project's API key.
98
+ Log in to your account at hoptoadapp.com, and click on the "Projects" button.
99
+ Then, find your project in the list, and click on its name. In the left-hand
100
+ column, you'll see an "Edit this project" button. Click on that to get your
101
+ project's API. (If you accidentally use your personal API auth_token, you won't
102
+ be able to install the gem.)
103
+
104
+ Then from your project's RAILS_ROOT, run:
105
+
106
+ rake gems:install
107
+ script/generate hoptoad --api-key your_key_here
108
+
109
+ Once installed, you should vendor the hoptoad_notifier gem.
110
+
111
+ rake gems:unpack GEM=hoptoad_notifier
112
+
113
+ As always, if you choose not to vendor the hoptoad_notifier gem, make sure
114
+ every server you deploy to has the gem installed or your application won't
115
+ start.
116
+
117
+ == Upgrading from Earlier Versions of the Hoptoad Gem (with config.gem)
118
+
119
+ If you're currently using the gem version of the hoptoad_notifier and have
120
+ a version of Rails that uses config.gem (in the 2.x series), there is
121
+ a step or two that you need to do to upgrade. First, you need to remove
122
+ the old version of the gem from vendor/gems:
123
+
124
+ rm -rf vendor/gems/hoptoad_notifier-X.X.X
125
+
126
+ Then you must remove the hoptoad_notifier_tasks.rake file from lib:
127
+
128
+ rm lib/tasks/hoptoad_notifier_tasks.rake
129
+
130
+ You can them continue to install normally. If you don't remove the rake file,
131
+ you will be unable to unpack this gem (Rails will think it's part of the
132
+ framework).
133
+
83
134
  === Testing it out
84
135
 
85
- You can test that Hoptoad is working in your production environment by using
136
+ You can test that Hoptoad is working in your production environment by using
86
137
  this rake task (from RAILS_ROOT):
87
138
 
88
139
  rake hoptoad:test
89
140
 
90
- If everything is configured properly, that task will send a notice to Hoptoad
141
+ If everything is configured properly, that task will send a notice to Hoptoad
91
142
  which will be visible immediately.
92
143
 
93
144
  == Rack
@@ -131,11 +182,11 @@ to disable Sinatra's error rescuing functionality:
131
182
 
132
183
  == Usage
133
184
 
134
- For the most part, Hoptoad works for itself. Once you've included the notifier
135
- in your ApplicationController (which is now done automatically by the gem),
185
+ For the most part, Hoptoad works for itself. Once you've included the notifier
186
+ in your ApplicationController (which is now done automatically by the gem),
136
187
  all errors will be rescued by the #rescue_action_in_public provided by the gem.
137
188
 
138
- If you want to log arbitrary things which you've rescued yourself from a
189
+ If you want to log arbitrary things which you've rescued yourself from a
139
190
  controller, you can do something like this:
140
191
 
141
192
  ...
@@ -175,7 +226,7 @@ controllers:
175
226
 
176
227
  begin
177
228
  params = {
178
- # params that you pass to a method that can throw an exception
229
+ # params that you pass to a method that can throw an exception
179
230
  }
180
231
  my_unpredicable_method(params)
181
232
  rescue => e
@@ -208,11 +259,11 @@ You can override any of those parameters.
208
259
 
209
260
  == Filtering
210
261
 
211
- You can specify a whitelist of errors, that Hoptoad will not report on. Use
212
- this feature when you are so apathetic to certain errors that you don't want
262
+ You can specify a whitelist of errors, that Hoptoad will not report on. Use
263
+ this feature when you are so apathetic to certain errors that you don't want
213
264
  them even logged.
214
265
 
215
- This filter will only be applied to automatic notifications, not manual
266
+ This filter will only be applied to automatic notifications, not manual
216
267
  notifications (when #notify is called directly).
217
268
 
218
269
  Hoptoad ignores the following exceptions by default:
@@ -223,7 +274,7 @@ Hoptoad ignores the following exceptions by default:
223
274
  ActionController::UnknownAction
224
275
  CGI::Session::CookieStore::TamperedWithCookie
225
276
 
226
- To ignore errors in addition to those, specify their names in your Hoptoad
277
+ To ignore errors in addition to those, specify their names in your Hoptoad
227
278
  configuration block.
228
279
 
229
280
  HoptoadNotifier.configure do |config|
@@ -231,7 +282,7 @@ configuration block.
231
282
  config.ignore << ActiveRecord::IgnoreThisError
232
283
  end
233
284
 
234
- To ignore *only* certain errors (and override the defaults), use the
285
+ To ignore *only* certain errors (and override the defaults), use the
235
286
  #ignore_only attribute.
236
287
 
237
288
  HoptoadNotifier.configure do |config|
@@ -270,8 +321,8 @@ hoptoad_notifier will reuse filters specified by #filter_params_logging.
270
321
  == Testing
271
322
 
272
323
  When you run your tests, you might notice that the Hoptoad service is recording
273
- notices generated using #notify when you don't expect it to. You can
274
- use code like this in your test_helper.rb to redefine that method so those
324
+ notices generated using #notify when you don't expect it to. You can
325
+ use code like this in your test_helper.rb to redefine that method so those
275
326
  errors are not reported while running tests.
276
327
 
277
328
  module HoptoadNotifier
@@ -280,6 +331,16 @@ errors are not reported while running tests.
280
331
  end
281
332
  end
282
333
 
334
+ == Proxy Support
335
+
336
+ The notifier supports using a proxy, if your server is not able to directly reach the Hoptoad servers. To configure the proxy settings, added the following information to your Hoptoad configuration block.
337
+
338
+ HoptoadNotifier.configure do |config|
339
+ config.proxy_host = ...
340
+ config.proxy_port = ...
341
+ config.proxy_user = ...
342
+ config.proxy_pass = ...
343
+
283
344
  == Supported Rails versions
284
345
 
285
346
  See SUPPORTED_RAILS_VERSIONS for a list of official supported versions of
data/Rakefile CHANGED
@@ -162,19 +162,26 @@ LOCAL_GEMS = [['sham_rack', nil], ['capistrano', nil], ['sqlite3-ruby', nil], ['
162
162
  RAILS_VERSIONS.collect { |version| ['rails', version] }
163
163
 
164
164
  task :vendor_test_gems do
165
+ old_gem_path = ENV['GEM_PATH']
166
+ old_gem_home = ENV['GEM_HOME']
167
+ ENV['GEM_PATH'] = LOCAL_GEM_ROOT
168
+ ENV['GEM_HOME'] = LOCAL_GEM_ROOT
165
169
  LOCAL_GEMS.each do |gem_name, version|
166
170
  gem_file_pattern = [gem_name, version || '*'].compact.join('-')
167
171
  version_option = version ? "-v #{version}" : ''
168
172
  pattern = File.join(LOCAL_GEM_ROOT, 'gems', "#{gem_file_pattern}")
169
173
  existing = Dir.glob(pattern).first
170
174
  unless existing
171
- command = "gem install -i #{LOCAL_GEM_ROOT} --no-ri --no-rdoc #{version_option} #{gem_name}"
175
+ command = "gem install -i #{LOCAL_GEM_ROOT} --no-ri --no-rdoc --backtrace #{version_option} #{gem_name}"
172
176
  puts "Vendoring #{gem_file_pattern}..."
173
- unless system(command)
174
- $stderr.puts "Command failed: #{command}"
177
+ unless system("#{command} 2>&1")
178
+ puts "Command failed: #{command}"
179
+ exit(1)
175
180
  end
176
181
  end
177
182
  end
183
+ ENV['GEM_PATH'] = old_gem_path
184
+ ENV['GEM_HOME'] = old_gem_home
178
185
  end
179
186
 
180
187
  Cucumber::Rake::Task.new(:cucumber) do |t|
@@ -184,14 +191,14 @@ end
184
191
 
185
192
  task :cucumber => [:gemspec, :vendor_test_gems]
186
193
 
187
- namespace :cucumber do
194
+ def define_rails_cucumber_tasks(additional_cucumber_args = '')
188
195
  namespace :rails do
189
196
  RAILS_VERSIONS.each do |version|
190
197
  desc "Test integration of the gem with Rails #{version}"
191
198
  task version do
192
199
  puts "Testing Rails #{version}"
193
200
  ENV['RAILS_VERSION'] = version
194
- system("cucumber --format progress features/rails.feature")
201
+ system("cucumber --format progress #{additional_cucumber_args} features/rails.feature")
195
202
  end
196
203
  end
197
204
 
@@ -199,3 +206,12 @@ namespace :cucumber do
199
206
  task :all => RAILS_VERSIONS
200
207
  end
201
208
  end
209
+
210
+ namespace :cucumber do
211
+ namespace :wip do
212
+ define_rails_cucumber_tasks('--tags @wip')
213
+ end
214
+
215
+ define_rails_cucumber_tasks
216
+ end
217
+
@@ -1,5 +1,12 @@
1
- Dir[File.join(RAILS_ROOT, 'vendor', 'gems', 'hoptoad_notifier-*')].each do |vendored_notifier|
2
- $: << File.join(vendored_notifier, 'lib')
3
- end
1
+ # Don't load anything when running the gems:* tasks.
2
+ # Otherwise, hoptoad_notifier will be considered a framework gem.
3
+ # https://thoughtbot.lighthouseapp.com/projects/14221/tickets/629
4
+ unless ARGV.any? {|a| a =~ /^gems/}
5
+
6
+ Dir[File.join(RAILS_ROOT, 'vendor', 'gems', 'hoptoad_notifier-*')].each do |vendored_notifier|
7
+ $: << File.join(vendored_notifier, 'lib')
8
+ end
4
9
 
5
- require 'hoptoad_notifier/tasks'
10
+ require 'hoptoad_notifier/tasks'
11
+
12
+ end
@@ -1,3 +1,3 @@
1
1
  module HoptoadNotifier
2
- VERSION = "2.2.0".freeze
2
+ VERSION = "2.2.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoptoad_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 2
8
+ - 2
9
+ version: 2.2.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - thoughtbot, inc
@@ -9,69 +14,81 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-18 00:00:00 -05:00
17
+ date: 2010-03-10 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: activesupport
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
30
+ type: :runtime
31
+ version_requirements: *id001
25
32
  - !ruby/object:Gem::Dependency
26
33
  name: activerecord
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
33
41
  version: "0"
34
- version:
42
+ type: :development
43
+ version_requirements: *id002
35
44
  - !ruby/object:Gem::Dependency
36
45
  name: actionpack
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
46
+ prerelease: false
47
+ requirement: &id003 !ruby/object:Gem::Requirement
40
48
  requirements:
41
49
  - - ">="
42
50
  - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
43
53
  version: "0"
44
- version:
54
+ type: :development
55
+ version_requirements: *id003
45
56
  - !ruby/object:Gem::Dependency
46
57
  name: jferris-mocha
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
58
+ prerelease: false
59
+ requirement: &id004 !ruby/object:Gem::Requirement
50
60
  requirements:
51
61
  - - ">="
52
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
53
65
  version: "0"
54
- version:
66
+ type: :development
67
+ version_requirements: *id004
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: nokogiri
57
- type: :development
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
70
+ prerelease: false
71
+ requirement: &id005 !ruby/object:Gem::Requirement
60
72
  requirements:
61
73
  - - ">="
62
74
  - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
63
77
  version: "0"
64
- version:
78
+ type: :development
79
+ version_requirements: *id005
65
80
  - !ruby/object:Gem::Dependency
66
81
  name: shoulda
67
- type: :development
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
82
+ prerelease: false
83
+ requirement: &id006 !ruby/object:Gem::Requirement
70
84
  requirements:
71
85
  - - ">="
72
86
  - !ruby/object:Gem::Version
87
+ segments:
88
+ - 0
73
89
  version: "0"
74
- version:
90
+ type: :development
91
+ version_requirements: *id006
75
92
  description:
76
93
  email: support@hoptoadapp.com
77
94
  executables: []
@@ -137,18 +154,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
154
  requirements:
138
155
  - - ">="
139
156
  - !ruby/object:Gem::Version
157
+ segments:
158
+ - 0
140
159
  version: "0"
141
- version:
142
160
  required_rubygems_version: !ruby/object:Gem::Requirement
143
161
  requirements:
144
162
  - - ">="
145
163
  - !ruby/object:Gem::Version
164
+ segments:
165
+ - 0
146
166
  version: "0"
147
- version:
148
167
  requirements: []
149
168
 
150
169
  rubyforge_project:
151
- rubygems_version: 1.3.5
170
+ rubygems_version: 1.3.6
152
171
  signing_key:
153
172
  specification_version: 3
154
173
  summary: Send your application errors to our hosted service and reclaim your inbox.