wrangler 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
data/TODO ADDED
@@ -0,0 +1,38 @@
1
+ This is a collection of things that could/should be worked on:
2
+
3
+ == Right away:
4
+ * rename the gem (see a juggler on gemcutter already!)
5
+ ** remove repository on github
6
+ ** create new repository and upload
7
+ ** push to gemcutter
8
+
9
+ == Robustness:
10
+ * in juggler.rb : render_error_template(), if we fail to find a template for the
11
+ exception/status code, we just log that fact right now. this is probably worth
12
+ a notification in itself (that a template is missing or config is not set up
13
+ properly)...so send an email if an appropriate template cannot be found.
14
+ * come up with an automated testing strategy
15
+
16
+ == Cleanup:
17
+ * (Potentially security?) copy what exception_notification does and sanitize
18
+ the backtrace before stuffing it into email...from what i could tell from a
19
+ quick look, it seemed like it was just cleaning up the stack trace, substituting
20
+ [RAILS ROOT] for the path to the rails app (which should make it shorter, but
21
+ maybe also to hide the location of the app?)
22
+
23
+ == Configuration/flexibility:
24
+ * allow for a hash to map status_codes to arbitrary templates explicitly instead
25
+ of relying on finding files named after the status code. currently have
26
+ implemented the ability to map exceptions to arbitrary templates, so the
27
+ pattern/approach has been established.
28
+ * allowing for separate exception handler (and notifier?) configuration for
29
+ different controllers/classes. probably involves converting the ExceptionHandler
30
+ class to being instantiated and have each class that includes the Juggler
31
+ module hold onto that instance (maybe have to move the notifier config back to
32
+ the ExceptionHandler class where it used to be... ;) )
33
+ * allow configuring which sections of the email are included (e.g. can leave
34
+ out the stacktrace or the request sections...)
35
+ * allow custom email views to override the Juggler email view (e.g. allowing
36
+ html, additional data, formatting differences...)
37
+ * add xml responses to the :error_class_xxx_templates pattern to allow
38
+ configuring xml error response templates
@@ -40,6 +40,10 @@ module Wrangler
40
40
  def initialize(msg = nil); super(401, msg); end
41
41
  end
42
42
 
43
+ class HttpForbidden < HttpStatusError
44
+ def initialize(msg = nil); super(403, msg); end
45
+ end
46
+
43
47
  class HttpNotFound < HttpStatusError
44
48
  def initialize(msg = nil); super(404, msg); end
45
49
  end
data/lib/wrangler.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'wrangler/wrangler_helper.rb'
2
2
  require 'wrangler/exception_handler.rb'
3
3
  require 'wrangler/exception_notifier.rb'
4
- require 'wrangler/wrangler_exceptions.rb'
5
4
 
6
5
  module Wrangler
7
6
 
@@ -1,6 +1,6 @@
1
1
  <!-- This file lives in gems/wrangler/rails/app/views/wrangler. See README for instructions on customizing. -->
2
2
  <div class="dialog">
3
- <h1>Access Restricted</h1>
3
+ <h1>Forbidden</h1>
4
4
 
5
- <p>If you need access to this resource please contact support or an administrator.</p>
5
+ <p>Your request cannot be fulfilled.</p>
6
6
  </div>
data/wrangler.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wrangler}
8
- s.version = "0.1.11"
8
+ s.version = "0.1.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Percival"]
12
- s.date = %q{2009-12-06}
12
+ s.date = %q{2010-01-04}
13
13
  s.description = %q{A gem for handling exceptions thrown inside your Rails app. If you include the
14
14
  gem in your application controller, wrangler will render the error pages you
15
15
  configure for each exception or HTTP error code. It will also handle notifying
@@ -24,7 +24,8 @@ get started and what configuration options are available.
24
24
  s.email = %q{percivalatumamibuddotcom}
25
25
  s.extra_rdoc_files = [
26
26
  "LICENSE",
27
- "README"
27
+ "README",
28
+ "TODO"
28
29
  ]
29
30
  s.files = [
30
31
  "lib/wrangler.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wrangler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Percival
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-06 00:00:00 -08:00
12
+ date: 2010-01-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,6 +42,7 @@ extensions: []
42
42
  extra_rdoc_files:
43
43
  - LICENSE
44
44
  - README
45
+ - TODO
45
46
  files:
46
47
  - lib/wrangler.rb
47
48
  - lib/wrangler/exception_handler.rb
@@ -63,6 +64,7 @@ files:
63
64
  - wrangler.gemspec
64
65
  - LICENSE
65
66
  - README
67
+ - TODO
66
68
  has_rdoc: true
67
69
  homepage: http://github.com/bmpercy/wrangler
68
70
  licenses: []