square-hoptoad_notifier 2.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +427 -0
- data/INSTALL +25 -0
- data/MIT-LICENSE +22 -0
- data/README.md +435 -0
- data/README_FOR_HEROKU_ADDON.md +93 -0
- data/Rakefile +227 -0
- data/SUPPORTED_RAILS_VERSIONS +10 -0
- data/TESTING.rdoc +8 -0
- data/generators/hoptoad/hoptoad_generator.rb +88 -0
- data/generators/hoptoad/lib/insert_commands.rb +34 -0
- data/generators/hoptoad/lib/rake_commands.rb +24 -0
- data/generators/hoptoad/templates/capistrano_hook.rb +6 -0
- data/generators/hoptoad/templates/hoptoad_notifier_tasks.rake +25 -0
- data/generators/hoptoad/templates/initializer.rb +6 -0
- data/lib/hoptoad_notifier.rb +153 -0
- data/lib/hoptoad_notifier/backtrace.rb +99 -0
- data/lib/hoptoad_notifier/capistrano.rb +20 -0
- data/lib/hoptoad_notifier/configuration.rb +242 -0
- data/lib/hoptoad_notifier/notice.rb +337 -0
- data/lib/hoptoad_notifier/rack.rb +42 -0
- data/lib/hoptoad_notifier/rails.rb +41 -0
- data/lib/hoptoad_notifier/rails/action_controller_catcher.rb +30 -0
- data/lib/hoptoad_notifier/rails/controller_methods.rb +68 -0
- data/lib/hoptoad_notifier/rails/error_lookup.rb +33 -0
- data/lib/hoptoad_notifier/rails/javascript_notifier.rb +42 -0
- data/lib/hoptoad_notifier/rails3_tasks.rb +82 -0
- data/lib/hoptoad_notifier/railtie.rb +32 -0
- data/lib/hoptoad_notifier/sender.rb +83 -0
- data/lib/hoptoad_notifier/shared_tasks.rb +29 -0
- data/lib/hoptoad_notifier/tasks.rb +83 -0
- data/lib/hoptoad_notifier/user_informer.rb +23 -0
- data/lib/hoptoad_notifier/version.rb +3 -0
- data/lib/hoptoad_tasks.rb +44 -0
- data/lib/rails/generators/hoptoad/hoptoad_generator.rb +94 -0
- data/lib/templates/javascript_notifier.erb +13 -0
- data/lib/templates/rescue.erb +91 -0
- data/rails/init.rb +1 -0
- data/script/integration_test.rb +38 -0
- data/test/backtrace_test.rb +118 -0
- data/test/catcher_test.rb +331 -0
- data/test/configuration_test.rb +216 -0
- data/test/helper.rb +248 -0
- data/test/hoptoad_tasks_test.rb +152 -0
- data/test/javascript_notifier_test.rb +52 -0
- data/test/logger_test.rb +85 -0
- data/test/notice_test.rb +448 -0
- data/test/notifier_test.rb +222 -0
- data/test/rack_test.rb +58 -0
- data/test/rails_initializer_test.rb +36 -0
- data/test/sender_test.rb +161 -0
- data/test/user_informer_test.rb +29 -0
- metadata +225 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/helper'
|
2
|
+
|
3
|
+
class UserInformerTest < Test::Unit::TestCase
|
4
|
+
should "modify output if there is a hoptoad id" do
|
5
|
+
main_app = lambda do |env|
|
6
|
+
env['hoptoad.error_id'] = 1
|
7
|
+
[200, {}, ["<!-- HOPTOAD ERROR -->"]]
|
8
|
+
end
|
9
|
+
informer_app = HoptoadNotifier::UserInformer.new(main_app)
|
10
|
+
|
11
|
+
ShamRack.mount(informer_app, "example.com")
|
12
|
+
|
13
|
+
response = Net::HTTP.get_response(URI.parse("http://example.com/"))
|
14
|
+
assert_equal "Hoptoad Error 1", response.body
|
15
|
+
assert_equal 15, response["Content-Length"].to_i
|
16
|
+
end
|
17
|
+
|
18
|
+
should "not modify output if there is no hoptoad id" do
|
19
|
+
main_app = lambda do |env|
|
20
|
+
[200, {}, ["<!-- HOPTOAD ERROR -->"]]
|
21
|
+
end
|
22
|
+
informer_app = HoptoadNotifier::UserInformer.new(main_app)
|
23
|
+
|
24
|
+
ShamRack.mount(informer_app, "example.com")
|
25
|
+
|
26
|
+
response = Net::HTTP.get_response(URI.parse("http://example.com/"))
|
27
|
+
assert_equal "<!-- HOPTOAD ERROR -->", response.body
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: square-hoptoad_notifier
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 4
|
9
|
+
- 8
|
10
|
+
version: 2.4.8
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- thoughtbot, inc
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-11 00:00:00 -08:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: builder
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: activesupport
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: activerecord
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: actionpack
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
type: :development
|
76
|
+
version_requirements: *id004
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: bourne
|
79
|
+
prerelease: false
|
80
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
89
|
+
type: :development
|
90
|
+
version_requirements: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: nokogiri
|
93
|
+
prerelease: false
|
94
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
hash: 3
|
100
|
+
segments:
|
101
|
+
- 0
|
102
|
+
version: "0"
|
103
|
+
type: :development
|
104
|
+
version_requirements: *id006
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: shoulda
|
107
|
+
prerelease: false
|
108
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
type: :development
|
118
|
+
version_requirements: *id007
|
119
|
+
description:
|
120
|
+
email: support@hoptoadapp.com
|
121
|
+
executables: []
|
122
|
+
|
123
|
+
extensions: []
|
124
|
+
|
125
|
+
extra_rdoc_files: []
|
126
|
+
|
127
|
+
files:
|
128
|
+
- CHANGELOG
|
129
|
+
- INSTALL
|
130
|
+
- MIT-LICENSE
|
131
|
+
- Rakefile
|
132
|
+
- README.md
|
133
|
+
- README_FOR_HEROKU_ADDON.md
|
134
|
+
- SUPPORTED_RAILS_VERSIONS
|
135
|
+
- TESTING.rdoc
|
136
|
+
- generators/hoptoad/hoptoad_generator.rb
|
137
|
+
- generators/hoptoad/lib/insert_commands.rb
|
138
|
+
- generators/hoptoad/lib/rake_commands.rb
|
139
|
+
- generators/hoptoad/templates/capistrano_hook.rb
|
140
|
+
- generators/hoptoad/templates/hoptoad_notifier_tasks.rake
|
141
|
+
- generators/hoptoad/templates/initializer.rb
|
142
|
+
- lib/hoptoad_notifier/backtrace.rb
|
143
|
+
- lib/hoptoad_notifier/capistrano.rb
|
144
|
+
- lib/hoptoad_notifier/configuration.rb
|
145
|
+
- lib/hoptoad_notifier/notice.rb
|
146
|
+
- lib/hoptoad_notifier/rack.rb
|
147
|
+
- lib/hoptoad_notifier/rails/action_controller_catcher.rb
|
148
|
+
- lib/hoptoad_notifier/rails/controller_methods.rb
|
149
|
+
- lib/hoptoad_notifier/rails/error_lookup.rb
|
150
|
+
- lib/hoptoad_notifier/rails/javascript_notifier.rb
|
151
|
+
- lib/hoptoad_notifier/rails.rb
|
152
|
+
- lib/hoptoad_notifier/rails3_tasks.rb
|
153
|
+
- lib/hoptoad_notifier/railtie.rb
|
154
|
+
- lib/hoptoad_notifier/sender.rb
|
155
|
+
- lib/hoptoad_notifier/shared_tasks.rb
|
156
|
+
- lib/hoptoad_notifier/tasks.rb
|
157
|
+
- lib/hoptoad_notifier/user_informer.rb
|
158
|
+
- lib/hoptoad_notifier/version.rb
|
159
|
+
- lib/hoptoad_notifier.rb
|
160
|
+
- lib/hoptoad_tasks.rb
|
161
|
+
- lib/rails/generators/hoptoad/hoptoad_generator.rb
|
162
|
+
- test/backtrace_test.rb
|
163
|
+
- test/catcher_test.rb
|
164
|
+
- test/configuration_test.rb
|
165
|
+
- test/helper.rb
|
166
|
+
- test/hoptoad_tasks_test.rb
|
167
|
+
- test/javascript_notifier_test.rb
|
168
|
+
- test/logger_test.rb
|
169
|
+
- test/notice_test.rb
|
170
|
+
- test/notifier_test.rb
|
171
|
+
- test/rack_test.rb
|
172
|
+
- test/rails_initializer_test.rb
|
173
|
+
- test/sender_test.rb
|
174
|
+
- test/user_informer_test.rb
|
175
|
+
- rails/init.rb
|
176
|
+
- script/integration_test.rb
|
177
|
+
- lib/templates/javascript_notifier.erb
|
178
|
+
- lib/templates/rescue.erb
|
179
|
+
has_rdoc: true
|
180
|
+
homepage: http://www.hoptoadapp.com
|
181
|
+
licenses: []
|
182
|
+
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
|
186
|
+
require_paths:
|
187
|
+
- lib
|
188
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
189
|
+
none: false
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
hash: 3
|
194
|
+
segments:
|
195
|
+
- 0
|
196
|
+
version: "0"
|
197
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
hash: 3
|
203
|
+
segments:
|
204
|
+
- 0
|
205
|
+
version: "0"
|
206
|
+
requirements: []
|
207
|
+
|
208
|
+
rubyforge_project:
|
209
|
+
rubygems_version: 1.5.3
|
210
|
+
signing_key:
|
211
|
+
specification_version: 3
|
212
|
+
summary: Send your application errors to our hosted service and reclaim your inbox.
|
213
|
+
test_files:
|
214
|
+
- test/backtrace_test.rb
|
215
|
+
- test/catcher_test.rb
|
216
|
+
- test/configuration_test.rb
|
217
|
+
- test/hoptoad_tasks_test.rb
|
218
|
+
- test/javascript_notifier_test.rb
|
219
|
+
- test/logger_test.rb
|
220
|
+
- test/notice_test.rb
|
221
|
+
- test/notifier_test.rb
|
222
|
+
- test/rack_test.rb
|
223
|
+
- test/rails_initializer_test.rb
|
224
|
+
- test/sender_test.rb
|
225
|
+
- test/user_informer_test.rb
|