custom_errors_handler 0.2.1 → 0.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.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,5 @@
1
+ = Version 0.2.2
2
+ * Moved errors layouts structure to 'layouts'
1
3
  = Version 0.2.1
2
4
  * Fix for middleware swapping
3
5
  * Fix for homepage url
data/README.md CHANGED
@@ -38,9 +38,9 @@ Error 404 (not found) occurred in controller ErrorMakingController.
38
38
 
39
39
  Custom Errors Handler searches for template called "404.erb" in following directories:
40
40
 
41
- /views/error_making/layouts
42
- /views/error_making/
43
- /views/layouts
41
+ /views/layouts/error_making/errors
42
+ /views/layouts/error_making/
43
+ /views/layouts/
44
44
  /views/
45
45
 
46
46
  After it find template - it just render it.
@@ -52,11 +52,11 @@ Error 500 occurred in controller MyModule::ErrorMakingController in action index
52
52
 
53
53
  Our Custom Errors Handler searches in (searches for "500.erb"):
54
54
 
55
- /views/my_module/error_making/layouts
56
- /views/my_module/error_making/
57
- /views/my_module/layouts
58
- /views/my_module/
59
- /views/layouts
55
+ /views/layouts/my_module/error_making/errors
56
+ /views/layouts/my_module/error_making/
57
+ /views/layouts/my_module/
58
+ /views/layouts/my_module/
59
+ /views/layouts/
60
60
  /views/
61
61
 
62
62
  So as you can see you can use different error templates for both controllers and modules.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('custom_errors_handler', '0.2.1') do |p|
5
+ Echoe.new('custom_errors_handler', '0.2.2') do |p|
6
6
  p.description = "Custom Errors Handler is intended as an easy alternative to manage showing/rendering exceptions templates (404, 500) in Rails3"
7
7
  p.url = "https://github.com/mensfeld/Custom-Errors-Handler"
8
8
  p.author = "Maciej Mensfeld"
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{custom_errors_handler}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Maciej Mensfeld"]
9
9
  s.cert_chain = ["/home/mencio/.cert_keys/gem-public_cert.pem"]
10
- s.date = %q{2011-04-17}
10
+ s.date = %q{2011-06-04}
11
11
  s.description = %q{Custom Errors Handler is intended as an easy alternative to manage showing/rendering exceptions templates (404, 500) in Rails3}
12
12
  s.email = %q{maciej@mensfeld.pl}
13
13
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md", "lib/custom_errors_handler.rb", "lib/custom_errors_handler_controller.rb"]
@@ -32,7 +32,9 @@ class CustomErrorsHandlerController < ActionController::Base
32
32
  path= path.split('/')
33
33
  path.size.downto(0) do |i|
34
34
  VALID_ERRORS_SUBDIRS.each { |lay_path|
35
- template_path = File.join((path[0,i]).join('/'), lay_path, e)
35
+ template_path = File.join(lay_path, (path[0,i]).join('/'), e)
36
+ return template_path if template?(template_path)
37
+ template_path = File.join(lay_path, (path[0,i]).join('/'), 'errors',e)
36
38
  return template_path if template?(template_path)
37
39
  }
38
40
  template_path = File.join(path[0,i], e)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: custom_errors_handler
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Maciej Mensfeld
@@ -31,7 +31,7 @@ cert_chain:
31
31
  BH3YFsdk
32
32
  -----END CERTIFICATE-----
33
33
 
34
- date: 2011-04-17 00:00:00 +02:00
34
+ date: 2011-06-04 00:00:00 +02:00
35
35
  default_executable:
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file