rails_exception_handler 1.3.0 → 1.3.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.
Files changed (51) hide show
  1. data/Gemfile +11 -3
  2. data/Gemfile.lock +32 -30
  3. data/README.markdown +2 -2
  4. data/Rakefile +1 -0
  5. data/VERSION +1 -1
  6. data/lib/rails_exception_handler.rb +1 -0
  7. data/lib/rails_exception_handler/handler.rb +7 -1
  8. data/rails_exception_handler.gemspec +18 -42
  9. data/spec/testapp_32/.gitignore +15 -0
  10. data/spec/testapp_32/app/mailers/.gitkeep +0 -0
  11. data/spec/testapp_32/app/models/.gitkeep +0 -0
  12. data/spec/testapp_32/lib/assets/.gitkeep +0 -0
  13. data/spec/testapp_32/lib/tasks/.gitkeep +0 -0
  14. data/spec/testapp_32/log/.gitkeep +0 -0
  15. data/spec/testapp_32/vendor/assets/javascripts/.gitkeep +0 -0
  16. data/spec/testapp_32/vendor/assets/stylesheets/.gitkeep +0 -0
  17. data/spec/testapp_32/vendor/plugins/.gitkeep +0 -0
  18. metadata +21 -45
  19. data/spec/integration/configuration_spec.rb +0 -220
  20. data/spec/integration/rails_exception_handler_spec.rb +0 -67
  21. data/spec/spec_helper.rb +0 -24
  22. data/spec/test_macros.rb +0 -63
  23. data/spec/testapp_30/Gemfile +0 -31
  24. data/spec/testapp_30/Gemfile.lock +0 -75
  25. data/spec/testapp_30/Rakefile +0 -7
  26. data/spec/testapp_30/app/controllers/application_controller.rb +0 -16
  27. data/spec/testapp_30/app/controllers/home_controller.rb +0 -22
  28. data/spec/testapp_30/app/helpers/application_helper.rb +0 -2
  29. data/spec/testapp_30/app/models/stored_exception.rb +0 -9
  30. data/spec/testapp_30/app/views/home/view_error.html.erb +0 -2
  31. data/spec/testapp_30/app/views/layouts/fallback.html.erb +0 -15
  32. data/spec/testapp_30/app/views/layouts/home.html.erb +0 -15
  33. data/spec/testapp_30/config.ru +0 -4
  34. data/spec/testapp_30/config/application.rb +0 -44
  35. data/spec/testapp_30/config/boot.rb +0 -6
  36. data/spec/testapp_30/config/environment.rb +0 -5
  37. data/spec/testapp_30/config/environments/development.rb +0 -26
  38. data/spec/testapp_30/config/environments/production.rb +0 -49
  39. data/spec/testapp_30/config/environments/test.rb +0 -35
  40. data/spec/testapp_30/config/examples/database.yml +0 -13
  41. data/spec/testapp_30/config/locales/en.yml +0 -5
  42. data/spec/testapp_30/config/routes.rb +0 -6
  43. data/spec/testapp_30/db/migrate/20110630174538_create_error_messages.rb +0 -22
  44. data/spec/testapp_30/db/migrate/20110702131654_add_sessions_table.rb +0 -16
  45. data/spec/testapp_30/db/schema.rb +0 -39
  46. data/spec/testapp_30/db/seeds.rb +0 -7
  47. data/spec/testapp_30/script/rails +0 -6
  48. data/spec/testapp_30/script/setup +0 -19
  49. data/spec/unit/configuration_spec.rb +0 -37
  50. data/spec/unit/handler_spec.rb +0 -200
  51. data/spec/unit/parser_spec.rb +0 -136
data/Gemfile CHANGED
@@ -2,9 +2,17 @@
2
2
  source "http://rubygems.org"
3
3
 
4
4
  group :test, :development do
5
- gem "rails", '3.0.9'
5
+
6
+ # Set TEST_APP in spec_helper depending on which version you are testing
7
+
8
+ gem "rails", '3.0.11'
9
+ gem "rack-test", '0.5.7'
10
+ gem "mysql2", '0.2.6'
11
+
12
+ #gem "rails", '3.2.0'
13
+ #gem "rack-test", '0.6.1'
14
+ #gem 'mysql2', '0.3.11'
15
+
6
16
  gem "rspec-rails"
7
- gem "rack-test", '0.5.7'
8
- gem "mysql2", '0.2.6'
9
17
  gem "jeweler"
10
18
  end
data/Gemfile.lock CHANGED
@@ -2,12 +2,12 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  abstract (1.0.0)
5
- actionmailer (3.0.9)
6
- actionpack (= 3.0.9)
5
+ actionmailer (3.0.11)
6
+ actionpack (= 3.0.11)
7
7
  mail (~> 2.2.19)
8
- actionpack (3.0.9)
9
- activemodel (= 3.0.9)
10
- activesupport (= 3.0.9)
8
+ actionpack (3.0.11)
9
+ activemodel (= 3.0.11)
10
+ activesupport (= 3.0.11)
11
11
  builder (~> 2.1.2)
12
12
  erubis (~> 2.6.6)
13
13
  i18n (~> 0.5.0)
@@ -15,19 +15,19 @@ GEM
15
15
  rack-mount (~> 0.6.14)
16
16
  rack-test (~> 0.5.7)
17
17
  tzinfo (~> 0.3.23)
18
- activemodel (3.0.9)
19
- activesupport (= 3.0.9)
18
+ activemodel (3.0.11)
19
+ activesupport (= 3.0.11)
20
20
  builder (~> 2.1.2)
21
21
  i18n (~> 0.5.0)
22
- activerecord (3.0.9)
23
- activemodel (= 3.0.9)
24
- activesupport (= 3.0.9)
22
+ activerecord (3.0.11)
23
+ activemodel (= 3.0.11)
24
+ activesupport (= 3.0.11)
25
25
  arel (~> 2.0.10)
26
26
  tzinfo (~> 0.3.23)
27
- activeresource (3.0.9)
28
- activemodel (= 3.0.9)
29
- activesupport (= 3.0.9)
30
- activesupport (3.0.9)
27
+ activeresource (3.0.11)
28
+ activemodel (= 3.0.11)
29
+ activesupport (= 3.0.11)
30
+ activesupport (3.0.11)
31
31
  arel (2.0.10)
32
32
  builder (2.1.2)
33
33
  diff-lcs (1.1.3)
@@ -35,35 +35,36 @@ GEM
35
35
  abstract (>= 1.0.0)
36
36
  git (1.2.5)
37
37
  i18n (0.5.0)
38
- jeweler (1.6.3)
38
+ jeweler (1.8.3)
39
39
  bundler (~> 1.0)
40
40
  git (>= 1.2.5)
41
41
  rake
42
- json (1.6.4)
42
+ rdoc
43
+ json (1.6.5)
43
44
  mail (2.2.19)
44
45
  activesupport (>= 2.3.6)
45
46
  i18n (>= 0.4.0)
46
47
  mime-types (~> 1.16)
47
48
  treetop (~> 1.4.8)
48
- mime-types (1.16)
49
+ mime-types (1.17.2)
49
50
  mysql2 (0.2.6)
50
- polyglot (0.3.1)
51
+ polyglot (0.3.3)
51
52
  rack (1.2.5)
52
53
  rack-mount (0.6.14)
53
54
  rack (>= 1.0.0)
54
55
  rack-test (0.5.7)
55
56
  rack (>= 1.0)
56
- rails (3.0.9)
57
- actionmailer (= 3.0.9)
58
- actionpack (= 3.0.9)
59
- activerecord (= 3.0.9)
60
- activeresource (= 3.0.9)
61
- activesupport (= 3.0.9)
57
+ rails (3.0.11)
58
+ actionmailer (= 3.0.11)
59
+ actionpack (= 3.0.11)
60
+ activerecord (= 3.0.11)
61
+ activeresource (= 3.0.11)
62
+ activesupport (= 3.0.11)
62
63
  bundler (~> 1.0)
63
- railties (= 3.0.9)
64
- railties (3.0.9)
65
- actionpack (= 3.0.9)
66
- activesupport (= 3.0.9)
64
+ railties (= 3.0.11)
65
+ railties (3.0.11)
66
+ actionpack (= 3.0.11)
67
+ activesupport (= 3.0.11)
67
68
  rake (>= 0.8.7)
68
69
  rdoc (~> 3.4)
69
70
  thor (~> 0.14.4)
@@ -84,7 +85,8 @@ GEM
84
85
  railties (>= 3.0)
85
86
  rspec (~> 2.8.0)
86
87
  thor (0.14.6)
87
- treetop (1.4.9)
88
+ treetop (1.4.10)
89
+ polyglot
88
90
  polyglot (>= 0.3.1)
89
91
  tzinfo (0.3.31)
90
92
 
@@ -95,5 +97,5 @@ DEPENDENCIES
95
97
  jeweler
96
98
  mysql2 (= 0.2.6)
97
99
  rack-test (= 0.5.7)
98
- rails (= 3.0.9)
100
+ rails (= 3.0.11)
99
101
  rspec-rails
data/README.markdown CHANGED
@@ -12,7 +12,7 @@ http://travis-ci.org/#!/Sharagoz/rails_exception_handler
12
12
  Add this line to your Gemfile:
13
13
 
14
14
  ```
15
- gem 'rails_exception_handler', '~> 1.2'
15
+ gem 'rails_exception_handler'
16
16
  ```
17
17
 
18
18
  Create an initializer in **config/initializers** called **rails_exception_handler.rb** and uncomment the options where you want something other than the default:
@@ -122,7 +122,7 @@ config.filters = [:all_404s]
122
122
  When turned on the following exceptions will no longer be stored: ActionController::RoutingError, AbstractController::ActionNotFound, ActiveRecord::RecordNotFound
123
123
  Consider this a last resort. You will miss all "real" 404s when this is turned on, like broken redirections.
124
124
 
125
- **:all_404s**
125
+ **:anon_404s**
126
126
 
127
127
  ```ruby
128
128
  config.filters = [:anon_404s]
data/Rakefile CHANGED
@@ -27,6 +27,7 @@ Jeweler::Tasks.new do |gem|
27
27
  gem.authors = ["Sharagoz"]
28
28
  gem.extra_rdoc_files = ['README.markdown']
29
29
  gem.require_paths = ["lib"]
30
+ gem.files.exclude 'spec/**/*'
30
31
 
31
32
  # dependencies defined in Gemfile
32
33
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.2
@@ -21,6 +21,7 @@ class RailsExceptionHandler
21
21
  Rails.configuration.middleware.use(RailsExceptionHandler)
22
22
 
23
23
  Rails.configuration.action_dispatch.show_exceptions = true
24
+ Rails.configuration.consider_all_requests_local = false
24
25
  require File.expand_path(File.dirname(__FILE__)) + '/patch/show_exceptions.rb'
25
26
  end
26
27
  end
@@ -83,7 +83,13 @@ class RailsExceptionHandler::Handler
83
83
  if(@request.xhr?)
84
84
  false
85
85
  else
86
- @controller.send(:_default_layout) || RailsExceptionHandler.configuration.fallback_layout
86
+ default_layout = @controller.send(:_default_layout)
87
+ if(default_layout.class.to_s == "ActionView::Template")
88
+ layout = default_layout.virtual_path
89
+ else
90
+ layout = default_layout
91
+ end
92
+ layout || RailsExceptionHandler.configuration.fallback_layout
87
93
  end
88
94
  end
89
95
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "1.3.0"
8
+ s.version = "1.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sharagoz"]
12
- s.date = "2012-01-13"
12
+ s.date = "2012-01-27"
13
13
  s.description = ""
14
14
  s.email = "contact@sharagoz.com"
15
15
  s.extra_rdoc_files = [
@@ -33,70 +33,46 @@ Gem::Specification.new do |s|
33
33
  "lib/rails_exception_handler/handler.rb",
34
34
  "lib/rails_exception_handler/parser.rb",
35
35
  "rails_exception_handler.gemspec",
36
- "spec/integration/configuration_spec.rb",
37
- "spec/integration/rails_exception_handler_spec.rb",
38
- "spec/spec_helper.rb",
39
- "spec/test_macros.rb",
40
36
  "spec/testapp_30/.gitignore",
41
- "spec/testapp_30/Gemfile",
42
- "spec/testapp_30/Gemfile.lock",
43
- "spec/testapp_30/Rakefile",
44
- "spec/testapp_30/app/controllers/application_controller.rb",
45
- "spec/testapp_30/app/controllers/home_controller.rb",
46
- "spec/testapp_30/app/helpers/application_helper.rb",
47
- "spec/testapp_30/app/models/stored_exception.rb",
48
- "spec/testapp_30/app/views/home/view_error.html.erb",
49
- "spec/testapp_30/app/views/layouts/fallback.html.erb",
50
- "spec/testapp_30/app/views/layouts/home.html.erb",
51
- "spec/testapp_30/config.ru",
52
- "spec/testapp_30/config/application.rb",
53
- "spec/testapp_30/config/boot.rb",
54
- "spec/testapp_30/config/environment.rb",
55
- "spec/testapp_30/config/environments/development.rb",
56
- "spec/testapp_30/config/environments/production.rb",
57
- "spec/testapp_30/config/environments/test.rb",
58
- "spec/testapp_30/config/examples/database.yml",
59
- "spec/testapp_30/config/locales/en.yml",
60
- "spec/testapp_30/config/routes.rb",
61
- "spec/testapp_30/db/migrate/20110630174538_create_error_messages.rb",
62
- "spec/testapp_30/db/migrate/20110702131654_add_sessions_table.rb",
63
- "spec/testapp_30/db/schema.rb",
64
- "spec/testapp_30/db/seeds.rb",
65
37
  "spec/testapp_30/lib/tasks/.gitkeep",
66
- "spec/testapp_30/script/rails",
67
- "spec/testapp_30/script/setup",
68
38
  "spec/testapp_30/vendor/plugins/.gitkeep",
69
- "spec/unit/configuration_spec.rb",
70
- "spec/unit/handler_spec.rb",
71
- "spec/unit/parser_spec.rb"
39
+ "spec/testapp_32/.gitignore",
40
+ "spec/testapp_32/app/mailers/.gitkeep",
41
+ "spec/testapp_32/app/models/.gitkeep",
42
+ "spec/testapp_32/lib/assets/.gitkeep",
43
+ "spec/testapp_32/lib/tasks/.gitkeep",
44
+ "spec/testapp_32/log/.gitkeep",
45
+ "spec/testapp_32/vendor/assets/javascripts/.gitkeep",
46
+ "spec/testapp_32/vendor/assets/stylesheets/.gitkeep",
47
+ "spec/testapp_32/vendor/plugins/.gitkeep"
72
48
  ]
73
49
  s.homepage = "http://github.com/Sharagoz/rails_exception_handler"
74
50
  s.licenses = ["MIT"]
75
51
  s.require_paths = ["lib"]
76
- s.rubygems_version = "1.8.11"
52
+ s.rubygems_version = "1.8.15"
77
53
  s.summary = "Exception Handling for Rails 3"
78
54
 
79
55
  if s.respond_to? :specification_version then
80
56
  s.specification_version = 3
81
57
 
82
58
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
83
- s.add_development_dependency(%q<rails>, ["= 3.0.9"])
84
- s.add_development_dependency(%q<rspec-rails>, [">= 0"])
59
+ s.add_development_dependency(%q<rails>, ["= 3.0.11"])
85
60
  s.add_development_dependency(%q<rack-test>, ["= 0.5.7"])
86
61
  s.add_development_dependency(%q<mysql2>, ["= 0.2.6"])
62
+ s.add_development_dependency(%q<rspec-rails>, [">= 0"])
87
63
  s.add_development_dependency(%q<jeweler>, [">= 0"])
88
64
  else
89
- s.add_dependency(%q<rails>, ["= 3.0.9"])
90
- s.add_dependency(%q<rspec-rails>, [">= 0"])
65
+ s.add_dependency(%q<rails>, ["= 3.0.11"])
91
66
  s.add_dependency(%q<rack-test>, ["= 0.5.7"])
92
67
  s.add_dependency(%q<mysql2>, ["= 0.2.6"])
68
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
93
69
  s.add_dependency(%q<jeweler>, [">= 0"])
94
70
  end
95
71
  else
96
- s.add_dependency(%q<rails>, ["= 3.0.9"])
97
- s.add_dependency(%q<rspec-rails>, [">= 0"])
72
+ s.add_dependency(%q<rails>, ["= 3.0.11"])
98
73
  s.add_dependency(%q<rack-test>, ["= 0.5.7"])
99
74
  s.add_dependency(%q<mysql2>, ["= 0.2.6"])
75
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
100
76
  s.add_dependency(%q<jeweler>, [">= 0"])
101
77
  end
102
78
  end
@@ -0,0 +1,15 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails_exception_handler
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.0
5
+ version: 1.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sharagoz
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-13 00:00:00 Z
13
+ date: 2012-01-27 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -19,40 +19,40 @@ dependencies:
19
19
  requirements:
20
20
  - - "="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.0.9
22
+ version: 3.0.11
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
27
- name: rspec-rails
27
+ name: rack-test
28
28
  requirement: &id002 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
- - - ">="
31
+ - - "="
32
32
  - !ruby/object:Gem::Version
33
- version: "0"
33
+ version: 0.5.7
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
38
- name: rack-test
38
+ name: mysql2
39
39
  requirement: &id003 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - "="
43
43
  - !ruby/object:Gem::Version
44
- version: 0.5.7
44
+ version: 0.2.6
45
45
  type: :development
46
46
  prerelease: false
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
49
- name: mysql2
49
+ name: rspec-rails
50
50
  requirement: &id004 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
- - - "="
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.2.6
55
+ version: "0"
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: *id004
@@ -93,42 +93,18 @@ files:
93
93
  - lib/rails_exception_handler/handler.rb
94
94
  - lib/rails_exception_handler/parser.rb
95
95
  - rails_exception_handler.gemspec
96
- - spec/integration/configuration_spec.rb
97
- - spec/integration/rails_exception_handler_spec.rb
98
- - spec/spec_helper.rb
99
- - spec/test_macros.rb
100
96
  - spec/testapp_30/.gitignore
101
- - spec/testapp_30/Gemfile
102
- - spec/testapp_30/Gemfile.lock
103
- - spec/testapp_30/Rakefile
104
- - spec/testapp_30/app/controllers/application_controller.rb
105
- - spec/testapp_30/app/controllers/home_controller.rb
106
- - spec/testapp_30/app/helpers/application_helper.rb
107
- - spec/testapp_30/app/models/stored_exception.rb
108
- - spec/testapp_30/app/views/home/view_error.html.erb
109
- - spec/testapp_30/app/views/layouts/fallback.html.erb
110
- - spec/testapp_30/app/views/layouts/home.html.erb
111
- - spec/testapp_30/config.ru
112
- - spec/testapp_30/config/application.rb
113
- - spec/testapp_30/config/boot.rb
114
- - spec/testapp_30/config/environment.rb
115
- - spec/testapp_30/config/environments/development.rb
116
- - spec/testapp_30/config/environments/production.rb
117
- - spec/testapp_30/config/environments/test.rb
118
- - spec/testapp_30/config/examples/database.yml
119
- - spec/testapp_30/config/locales/en.yml
120
- - spec/testapp_30/config/routes.rb
121
- - spec/testapp_30/db/migrate/20110630174538_create_error_messages.rb
122
- - spec/testapp_30/db/migrate/20110702131654_add_sessions_table.rb
123
- - spec/testapp_30/db/schema.rb
124
- - spec/testapp_30/db/seeds.rb
125
97
  - spec/testapp_30/lib/tasks/.gitkeep
126
- - spec/testapp_30/script/rails
127
- - spec/testapp_30/script/setup
128
98
  - spec/testapp_30/vendor/plugins/.gitkeep
129
- - spec/unit/configuration_spec.rb
130
- - spec/unit/handler_spec.rb
131
- - spec/unit/parser_spec.rb
99
+ - spec/testapp_32/.gitignore
100
+ - spec/testapp_32/app/mailers/.gitkeep
101
+ - spec/testapp_32/app/models/.gitkeep
102
+ - spec/testapp_32/lib/assets/.gitkeep
103
+ - spec/testapp_32/lib/tasks/.gitkeep
104
+ - spec/testapp_32/log/.gitkeep
105
+ - spec/testapp_32/vendor/assets/javascripts/.gitkeep
106
+ - spec/testapp_32/vendor/assets/stylesheets/.gitkeep
107
+ - spec/testapp_32/vendor/plugins/.gitkeep
132
108
  homepage: http://github.com/Sharagoz/rails_exception_handler
133
109
  licenses:
134
110
  - MIT
@@ -152,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
128
  requirements: []
153
129
 
154
130
  rubyforge_project:
155
- rubygems_version: 1.8.11
131
+ rubygems_version: 1.8.15
156
132
  signing_key:
157
133
  specification_version: 3
158
134
  summary: Exception Handling for Rails 3