rails_exception_handler 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,14 +2,16 @@ source "http://rubygems.org"
2
2
 
3
3
  group :test, :development do
4
4
 
5
- #gem "rails", '3.0.13'
5
+ #gem "rails", '3.0.20'
6
6
  #gem "rack-test", '0.5.7'
7
- #gem "mysql2", '0.2.6'
8
7
 
9
- gem "rails", '3.2.8'
10
- gem "rack-test", '0.6.1'
11
- gem 'mysql2', '0.3.11'
8
+ #gem "rails", '3.2.13'
9
+ #gem "rack-test", '0.6.2'
12
10
 
11
+ gem "rails", '4.0.0.rc2'
12
+ gem "rack-test", '0.6.2'
13
+
14
+ gem 'sqlite3'
13
15
  gem 'pry'
14
16
  gem "rspec-rails"
15
17
  gem "jeweler"
data/Gemfile.lock CHANGED
@@ -1,124 +1,120 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_exception_handler (2.0.2)
4
+ rails_exception_handler (2.1.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- actionmailer (3.2.8)
10
- actionpack (= 3.2.8)
11
- mail (~> 2.4.4)
12
- actionpack (3.2.8)
13
- activemodel (= 3.2.8)
14
- activesupport (= 3.2.8)
15
- builder (~> 3.0.0)
9
+ actionmailer (4.0.0.rc2)
10
+ actionpack (= 4.0.0.rc2)
11
+ mail (~> 2.5.3)
12
+ actionpack (4.0.0.rc2)
13
+ activesupport (= 4.0.0.rc2)
14
+ builder (~> 3.1.0)
16
15
  erubis (~> 2.7.0)
17
- journey (~> 1.0.4)
18
- rack (~> 1.4.0)
19
- rack-cache (~> 1.2)
20
- rack-test (~> 0.6.1)
21
- sprockets (~> 2.1.3)
22
- activemodel (3.2.8)
23
- activesupport (= 3.2.8)
24
- builder (~> 3.0.0)
25
- activerecord (3.2.8)
26
- activemodel (= 3.2.8)
27
- activesupport (= 3.2.8)
28
- arel (~> 3.0.2)
29
- tzinfo (~> 0.3.29)
30
- activeresource (3.2.8)
31
- activemodel (= 3.2.8)
32
- activesupport (= 3.2.8)
33
- activesupport (3.2.8)
34
- i18n (~> 0.6)
35
- multi_json (~> 1.0)
36
- arel (3.0.2)
37
- builder (3.0.3)
38
- coderay (1.0.7)
39
- diff-lcs (1.1.3)
16
+ rack (~> 1.5.2)
17
+ rack-test (~> 0.6.2)
18
+ activemodel (4.0.0.rc2)
19
+ activesupport (= 4.0.0.rc2)
20
+ builder (~> 3.1.0)
21
+ activerecord (4.0.0.rc2)
22
+ activemodel (= 4.0.0.rc2)
23
+ activerecord-deprecated_finders (~> 1.0.2)
24
+ activesupport (= 4.0.0.rc2)
25
+ arel (~> 4.0.0)
26
+ activerecord-deprecated_finders (1.0.3)
27
+ activesupport (4.0.0.rc2)
28
+ i18n (~> 0.6, >= 0.6.4)
29
+ minitest (~> 4.2)
30
+ multi_json (~> 1.3)
31
+ thread_safe (~> 0.1)
32
+ tzinfo (~> 0.3.37)
33
+ arel (4.0.0)
34
+ atomic (1.1.9)
35
+ builder (3.1.4)
36
+ coderay (1.0.9)
37
+ diff-lcs (1.2.4)
40
38
  erubis (2.7.0)
41
39
  git (1.2.5)
42
- hike (1.2.1)
43
- i18n (0.6.1)
40
+ hike (1.2.3)
41
+ i18n (0.6.4)
44
42
  jeweler (1.8.4)
45
43
  bundler (~> 1.0)
46
44
  git (>= 1.2.5)
47
45
  rake
48
46
  rdoc
49
- journey (1.0.4)
50
- json (1.7.5)
51
- mail (2.4.4)
52
- i18n (>= 0.4.0)
47
+ json (1.8.0)
48
+ mail (2.5.4)
53
49
  mime-types (~> 1.16)
54
50
  treetop (~> 1.4.8)
55
- method_source (0.8)
56
- mime-types (1.19)
57
- multi_json (1.3.6)
58
- mysql2 (0.3.11)
51
+ method_source (0.8.1)
52
+ mime-types (1.23)
53
+ minitest (4.7.4)
54
+ multi_json (1.7.7)
59
55
  polyglot (0.3.3)
60
- pry (0.9.10)
56
+ pry (0.9.12.2)
61
57
  coderay (~> 1.0.5)
62
58
  method_source (~> 0.8)
63
- slop (~> 3.3.1)
64
- rack (1.4.1)
65
- rack-cache (1.2)
66
- rack (>= 0.4)
67
- rack-ssl (1.3.2)
68
- rack
69
- rack-test (0.6.1)
59
+ slop (~> 3.4)
60
+ rack (1.5.2)
61
+ rack-test (0.6.2)
70
62
  rack (>= 1.0)
71
- rails (3.2.8)
72
- actionmailer (= 3.2.8)
73
- actionpack (= 3.2.8)
74
- activerecord (= 3.2.8)
75
- activeresource (= 3.2.8)
76
- activesupport (= 3.2.8)
77
- bundler (~> 1.0)
78
- railties (= 3.2.8)
79
- railties (3.2.8)
80
- actionpack (= 3.2.8)
81
- activesupport (= 3.2.8)
82
- rack-ssl (~> 1.3.2)
63
+ rails (4.0.0.rc2)
64
+ actionmailer (= 4.0.0.rc2)
65
+ actionpack (= 4.0.0.rc2)
66
+ activerecord (= 4.0.0.rc2)
67
+ activesupport (= 4.0.0.rc2)
68
+ bundler (>= 1.3.0, < 2.0)
69
+ railties (= 4.0.0.rc2)
70
+ sprockets-rails (~> 2.0.0)
71
+ railties (4.0.0.rc2)
72
+ actionpack (= 4.0.0.rc2)
73
+ activesupport (= 4.0.0.rc2)
83
74
  rake (>= 0.8.7)
84
- rdoc (~> 3.4)
85
- thor (>= 0.14.6, < 2.0)
86
- rake (0.9.2.2)
87
- rdoc (3.12)
75
+ thor (>= 0.18.1, < 2.0)
76
+ rake (10.0.4)
77
+ rdoc (4.0.1)
88
78
  json (~> 1.4)
89
- rspec (2.11.0)
90
- rspec-core (~> 2.11.0)
91
- rspec-expectations (~> 2.11.0)
92
- rspec-mocks (~> 2.11.0)
93
- rspec-core (2.11.1)
94
- rspec-expectations (2.11.3)
95
- diff-lcs (~> 1.1.3)
96
- rspec-mocks (2.11.2)
97
- rspec-rails (2.11.0)
79
+ rspec-core (2.13.1)
80
+ rspec-expectations (2.13.0)
81
+ diff-lcs (>= 1.1.3, < 2.0)
82
+ rspec-mocks (2.13.1)
83
+ rspec-rails (2.13.2)
98
84
  actionpack (>= 3.0)
99
85
  activesupport (>= 3.0)
100
86
  railties (>= 3.0)
101
- rspec (~> 2.11.0)
102
- slop (3.3.3)
103
- sprockets (2.1.3)
87
+ rspec-core (~> 2.13.0)
88
+ rspec-expectations (~> 2.13.0)
89
+ rspec-mocks (~> 2.13.0)
90
+ slop (3.4.5)
91
+ sprockets (2.10.0)
104
92
  hike (~> 1.2)
93
+ multi_json (~> 1.0)
105
94
  rack (~> 1.0)
106
95
  tilt (~> 1.1, != 1.3.0)
107
- thor (0.16.0)
108
- tilt (1.3.3)
109
- treetop (1.4.10)
96
+ sprockets-rails (2.0.0)
97
+ actionpack (>= 3.0)
98
+ activesupport (>= 3.0)
99
+ sprockets (~> 2.8)
100
+ sqlite3 (1.3.7)
101
+ thor (0.18.1)
102
+ thread_safe (0.1.0)
103
+ atomic
104
+ tilt (1.4.1)
105
+ treetop (1.4.14)
110
106
  polyglot
111
107
  polyglot (>= 0.3.1)
112
- tzinfo (0.3.33)
108
+ tzinfo (0.3.37)
113
109
 
114
110
  PLATFORMS
115
111
  ruby
116
112
 
117
113
  DEPENDENCIES
118
114
  jeweler
119
- mysql2 (= 0.3.11)
120
115
  pry
121
- rack-test (= 0.6.1)
122
- rails (= 3.2.8)
116
+ rack-test (= 0.6.2)
117
+ rails (= 4.0.0.rc2)
123
118
  rails_exception_handler!
124
119
  rspec-rails
120
+ sqlite3
data/HISTORY CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGELOG
2
2
 
3
+ v2.2.0 - September 10th 2013
4
+ - Rails 4 compatibility
5
+
3
6
  v2.1.0 - September 17th 2012
4
7
  - New filtering option: referer_url
5
8
 
data/README.markdown CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Upgrading from version 1? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Version-2.0-upgrade-instructions)
4
4
 
5
- This is a flexible exception handler for Rails 3 built as Rack middleware. It is aimed at experienced Rails developers who are administrating more than just a couple of rails applications. Dont be intimidated if you're new to Rails though, it's not that hard to set up.
5
+ This is a flexible exception handler for Rails 3 intended for those who wish to create their own error tracking service. It is aimed at experienced Rails developers who are administrating more than just a couple of rails applications. Dont be intimidated if you're new to Rails though, it's not that hard to set up.
6
6
 
7
7
  The exception handler enables you to save the key information from the error message in a database somewhere, via ActiveRecord or HTTP POST, and display a customized error message to the user within the applications layout file. You can hook this exception handler into all your rails apps and gather the exception reports in one place. The exception handler just contains the back end, you will have to create your own front end to view and manage the error reports.
8
8
 
@@ -27,7 +27,7 @@ gem 'rails_exception_handler', "~> 2"
27
27
  Generate an initializer:
28
28
 
29
29
  ```
30
- "rails g rails_exception_handler:install
30
+ rails g rails_exception_handler:install
31
31
  ```
32
32
 
33
33
  Open config/initializers/rails_exception_handler.rb, have a quick look and read on.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.2.0
@@ -18,7 +18,9 @@ class RailsExceptionHandler
18
18
  yield configuration
19
19
  return unless configuration.activate?
20
20
 
21
- Rails.configuration.middleware.use(RailsExceptionHandler)
21
+ unless Rails.configuration.middleware.class == ActionDispatch::MiddlewareStack && Rails.configuration.middleware.include?(RailsExceptionHandler)
22
+ Rails.configuration.middleware.use(RailsExceptionHandler)
23
+ end
22
24
 
23
25
  Rails.configuration.action_dispatch.show_exceptions = true
24
26
  Rails.configuration.consider_all_requests_local = false
@@ -9,7 +9,6 @@ class RailsExceptionHandler::Configuration
9
9
  @fallback_layout = 'application'
10
10
  @response_mapping = {}
11
11
  @responses = {}
12
- @whitelisted = false
13
12
  end
14
13
 
15
14
  def active_record?
@@ -43,16 +42,4 @@ class RailsExceptionHandler::Configuration
43
42
  def store_request_info(&block)
44
43
  @request_info_block = block
45
44
  end
46
-
47
- def whitelist(fields)
48
- return if(whitelisted?)
49
- ErrorMessage.send(:attr_accessible, *fields)
50
- @whitelisted = true
51
- end
52
-
53
- private
54
-
55
- def whitelisted?
56
- @whitelisted
57
- end
58
45
  end
@@ -1,7 +1,10 @@
1
1
  class RailsExceptionHandler::Storage
2
2
  def self.active_record(info)
3
- RailsExceptionHandler.configuration.whitelist(info.keys)
4
- ErrorMessage.create(info)
3
+ if Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR > 0
4
+ ErrorMessage.create(info, :without_protection => true)
5
+ else
6
+ ErrorMessage.create(info)
7
+ end
5
8
  end
6
9
 
7
10
  def self.rails_log(info)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "2.1.0"
8
+ s.version = "2.2.0"
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-09-17"
12
+ s.date = "2013-09-10"
13
13
  s.description = ""
14
14
  s.email = "contact@sharagoz.com"
15
15
  s.extra_rdoc_files = [
@@ -38,47 +38,50 @@ Gem::Specification.new do |s|
38
38
  "rails_exception_handler.gemspec",
39
39
  "spec/dummy_30/.gitignore",
40
40
  "spec/dummy_30/lib/tasks/.gitkeep",
41
- "spec/dummy_30/vendor/plugins/.gitkeep",
42
41
  "spec/dummy_32/.gitignore",
43
42
  "spec/dummy_32/app/mailers/.gitkeep",
44
43
  "spec/dummy_32/app/models/.gitkeep",
45
- "spec/dummy_32/lib/assets/.gitkeep",
46
- "spec/dummy_32/lib/tasks/.gitkeep",
47
44
  "spec/dummy_32/log/.gitkeep",
48
- "spec/dummy_32/vendor/assets/javascripts/.gitkeep",
49
- "spec/dummy_32/vendor/assets/stylesheets/.gitkeep",
50
- "spec/dummy_32/vendor/plugins/.gitkeep"
45
+ "spec/dummy_40/.gitignore",
46
+ "spec/dummy_40/app/assets/images/.keep",
47
+ "spec/dummy_40/app/controllers/concerns/.keep",
48
+ "spec/dummy_40/app/mailers/.keep",
49
+ "spec/dummy_40/app/models/.keep",
50
+ "spec/dummy_40/app/models/concerns/.keep",
51
+ "spec/dummy_40/lib/assets/.keep",
52
+ "spec/dummy_40/lib/tasks/.keep",
53
+ "spec/dummy_40/log/.keep"
51
54
  ]
52
55
  s.homepage = "http://github.com/Sharagoz/rails_exception_handler"
53
56
  s.licenses = ["MIT"]
54
57
  s.require_paths = ["lib"]
55
- s.rubygems_version = "1.8.21"
58
+ s.rubygems_version = "1.8.25"
56
59
  s.summary = "Exception Handling for Rails 3"
57
60
 
58
61
  if s.respond_to? :specification_version then
59
62
  s.specification_version = 3
60
63
 
61
64
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
62
- s.add_development_dependency(%q<rails>, ["= 3.2.8"])
63
- s.add_development_dependency(%q<rack-test>, ["= 0.6.1"])
64
- s.add_development_dependency(%q<mysql2>, ["= 0.3.11"])
65
+ s.add_development_dependency(%q<rails>, ["= 4.0.0.rc2"])
66
+ s.add_development_dependency(%q<rack-test>, ["= 0.6.2"])
67
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
65
68
  s.add_development_dependency(%q<pry>, [">= 0"])
66
69
  s.add_development_dependency(%q<rspec-rails>, [">= 0"])
67
70
  s.add_development_dependency(%q<jeweler>, [">= 0"])
68
71
  s.add_development_dependency(%q<rails_exception_handler>, [">= 0"])
69
72
  else
70
- s.add_dependency(%q<rails>, ["= 3.2.8"])
71
- s.add_dependency(%q<rack-test>, ["= 0.6.1"])
72
- s.add_dependency(%q<mysql2>, ["= 0.3.11"])
73
+ s.add_dependency(%q<rails>, ["= 4.0.0.rc2"])
74
+ s.add_dependency(%q<rack-test>, ["= 0.6.2"])
75
+ s.add_dependency(%q<sqlite3>, [">= 0"])
73
76
  s.add_dependency(%q<pry>, [">= 0"])
74
77
  s.add_dependency(%q<rspec-rails>, [">= 0"])
75
78
  s.add_dependency(%q<jeweler>, [">= 0"])
76
79
  s.add_dependency(%q<rails_exception_handler>, [">= 0"])
77
80
  end
78
81
  else
79
- s.add_dependency(%q<rails>, ["= 3.2.8"])
80
- s.add_dependency(%q<rack-test>, ["= 0.6.1"])
81
- s.add_dependency(%q<mysql2>, ["= 0.3.11"])
82
+ s.add_dependency(%q<rails>, ["= 4.0.0.rc2"])
83
+ s.add_dependency(%q<rack-test>, ["= 0.6.2"])
84
+ s.add_dependency(%q<sqlite3>, [">= 0"])
82
85
  s.add_dependency(%q<pry>, [">= 0"])
83
86
  s.add_dependency(%q<rspec-rails>, [">= 0"])
84
87
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -1,4 +1,3 @@
1
1
  .bundle
2
- db/*.sqlite3
3
2
  log/*.log
4
3
  tmp/
@@ -1,15 +1,3 @@
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
1
  /.bundle
9
-
10
- # Ignore the default SQLite database.
11
- /db/*.sqlite3
12
-
13
- # Ignore all logfiles and tempfiles.
14
2
  /log/*.log
15
3
  /tmp
@@ -0,0 +1,16 @@
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
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_exception_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-17 00:00:00.000000000 Z
12
+ date: 2013-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.8
21
+ version: 4.0.0.rc2
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.8
29
+ version: 4.0.0.rc2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rack-test
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 0.6.1
37
+ version: 0.6.2
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,23 +42,23 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 0.6.1
45
+ version: 0.6.2
46
46
  - !ruby/object:Gem::Dependency
47
- name: mysql2
47
+ name: sqlite3
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - '='
51
+ - - ! '>='
52
52
  - !ruby/object:Gem::Version
53
- version: 0.3.11
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - '='
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.11
61
+ version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: pry
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -152,16 +152,19 @@ files:
152
152
  - rails_exception_handler.gemspec
153
153
  - spec/dummy_30/.gitignore
154
154
  - spec/dummy_30/lib/tasks/.gitkeep
155
- - spec/dummy_30/vendor/plugins/.gitkeep
156
155
  - spec/dummy_32/.gitignore
157
156
  - spec/dummy_32/app/mailers/.gitkeep
158
157
  - spec/dummy_32/app/models/.gitkeep
159
- - spec/dummy_32/lib/assets/.gitkeep
160
- - spec/dummy_32/lib/tasks/.gitkeep
161
158
  - spec/dummy_32/log/.gitkeep
162
- - spec/dummy_32/vendor/assets/javascripts/.gitkeep
163
- - spec/dummy_32/vendor/assets/stylesheets/.gitkeep
164
- - spec/dummy_32/vendor/plugins/.gitkeep
159
+ - spec/dummy_40/.gitignore
160
+ - spec/dummy_40/app/assets/images/.keep
161
+ - spec/dummy_40/app/controllers/concerns/.keep
162
+ - spec/dummy_40/app/mailers/.keep
163
+ - spec/dummy_40/app/models/.keep
164
+ - spec/dummy_40/app/models/concerns/.keep
165
+ - spec/dummy_40/lib/assets/.keep
166
+ - spec/dummy_40/lib/tasks/.keep
167
+ - spec/dummy_40/log/.keep
165
168
  homepage: http://github.com/Sharagoz/rails_exception_handler
166
169
  licenses:
167
170
  - MIT
@@ -183,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
186
  version: '0'
184
187
  requirements: []
185
188
  rubyforge_project:
186
- rubygems_version: 1.8.21
189
+ rubygems_version: 1.8.25
187
190
  signing_key:
188
191
  specification_version: 3
189
192
  summary: Exception Handling for Rails 3