rails_exception_handler 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ group :test, :development do
6
6
  #gem "rack-test", '0.5.7'
7
7
  #gem "mysql2", '0.2.6'
8
8
 
9
- gem "rails", '3.2.5'
9
+ gem "rails", '3.2.8'
10
10
  gem "rack-test", '0.6.1'
11
11
  gem 'mysql2', '0.3.11'
12
12
 
data/Gemfile.lock CHANGED
@@ -1,66 +1,66 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_exception_handler (2.0.1)
4
+ rails_exception_handler (2.0.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- actionmailer (3.2.5)
10
- actionpack (= 3.2.5)
9
+ actionmailer (3.2.8)
10
+ actionpack (= 3.2.8)
11
11
  mail (~> 2.4.4)
12
- actionpack (3.2.5)
13
- activemodel (= 3.2.5)
14
- activesupport (= 3.2.5)
12
+ actionpack (3.2.8)
13
+ activemodel (= 3.2.8)
14
+ activesupport (= 3.2.8)
15
15
  builder (~> 3.0.0)
16
16
  erubis (~> 2.7.0)
17
- journey (~> 1.0.1)
17
+ journey (~> 1.0.4)
18
18
  rack (~> 1.4.0)
19
19
  rack-cache (~> 1.2)
20
20
  rack-test (~> 0.6.1)
21
21
  sprockets (~> 2.1.3)
22
- activemodel (3.2.5)
23
- activesupport (= 3.2.5)
22
+ activemodel (3.2.8)
23
+ activesupport (= 3.2.8)
24
24
  builder (~> 3.0.0)
25
- activerecord (3.2.5)
26
- activemodel (= 3.2.5)
27
- activesupport (= 3.2.5)
25
+ activerecord (3.2.8)
26
+ activemodel (= 3.2.8)
27
+ activesupport (= 3.2.8)
28
28
  arel (~> 3.0.2)
29
29
  tzinfo (~> 0.3.29)
30
- activeresource (3.2.5)
31
- activemodel (= 3.2.5)
32
- activesupport (= 3.2.5)
33
- activesupport (3.2.5)
30
+ activeresource (3.2.8)
31
+ activemodel (= 3.2.8)
32
+ activesupport (= 3.2.8)
33
+ activesupport (3.2.8)
34
34
  i18n (~> 0.6)
35
35
  multi_json (~> 1.0)
36
36
  arel (3.0.2)
37
- builder (3.0.0)
38
- coderay (1.0.6)
37
+ builder (3.0.3)
38
+ coderay (1.0.7)
39
39
  diff-lcs (1.1.3)
40
40
  erubis (2.7.0)
41
41
  git (1.2.5)
42
42
  hike (1.2.1)
43
- i18n (0.6.0)
44
- jeweler (1.8.3)
43
+ i18n (0.6.1)
44
+ jeweler (1.8.4)
45
45
  bundler (~> 1.0)
46
46
  git (>= 1.2.5)
47
47
  rake
48
48
  rdoc
49
- journey (1.0.3)
50
- json (1.7.3)
49
+ journey (1.0.4)
50
+ json (1.7.5)
51
51
  mail (2.4.4)
52
52
  i18n (>= 0.4.0)
53
53
  mime-types (~> 1.16)
54
54
  treetop (~> 1.4.8)
55
- method_source (0.7.1)
56
- mime-types (1.18)
55
+ method_source (0.8)
56
+ mime-types (1.19)
57
57
  multi_json (1.3.6)
58
58
  mysql2 (0.3.11)
59
59
  polyglot (0.3.3)
60
- pry (0.9.9.6)
60
+ pry (0.9.10)
61
61
  coderay (~> 1.0.5)
62
- method_source (~> 0.7.1)
63
- slop (>= 2.4.4, < 3)
62
+ method_source (~> 0.8)
63
+ slop (~> 3.3.1)
64
64
  rack (1.4.1)
65
65
  rack-cache (1.2)
66
66
  rack (>= 0.4)
@@ -68,17 +68,17 @@ GEM
68
68
  rack
69
69
  rack-test (0.6.1)
70
70
  rack (>= 1.0)
71
- rails (3.2.5)
72
- actionmailer (= 3.2.5)
73
- actionpack (= 3.2.5)
74
- activerecord (= 3.2.5)
75
- activeresource (= 3.2.5)
76
- activesupport (= 3.2.5)
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
77
  bundler (~> 1.0)
78
- railties (= 3.2.5)
79
- railties (3.2.5)
80
- actionpack (= 3.2.5)
81
- activesupport (= 3.2.5)
78
+ railties (= 3.2.8)
79
+ railties (3.2.8)
80
+ actionpack (= 3.2.8)
81
+ activesupport (= 3.2.8)
82
82
  rack-ssl (~> 1.3.2)
83
83
  rake (>= 0.8.7)
84
84
  rdoc (~> 3.4)
@@ -86,25 +86,25 @@ GEM
86
86
  rake (0.9.2.2)
87
87
  rdoc (3.12)
88
88
  json (~> 1.4)
89
- rspec (2.10.0)
90
- rspec-core (~> 2.10.0)
91
- rspec-expectations (~> 2.10.0)
92
- rspec-mocks (~> 2.10.0)
93
- rspec-core (2.10.1)
94
- rspec-expectations (2.10.0)
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
95
  diff-lcs (~> 1.1.3)
96
- rspec-mocks (2.10.1)
97
- rspec-rails (2.10.1)
96
+ rspec-mocks (2.11.2)
97
+ rspec-rails (2.11.0)
98
98
  actionpack (>= 3.0)
99
99
  activesupport (>= 3.0)
100
100
  railties (>= 3.0)
101
- rspec (~> 2.10.0)
102
- slop (2.4.4)
101
+ rspec (~> 2.11.0)
102
+ slop (3.3.3)
103
103
  sprockets (2.1.3)
104
104
  hike (~> 1.2)
105
105
  rack (~> 1.0)
106
106
  tilt (~> 1.1, != 1.3.0)
107
- thor (0.15.2)
107
+ thor (0.16.0)
108
108
  tilt (1.3.3)
109
109
  treetop (1.4.10)
110
110
  polyglot
@@ -119,6 +119,6 @@ DEPENDENCIES
119
119
  mysql2 (= 0.3.11)
120
120
  pry
121
121
  rack-test (= 0.6.1)
122
- rails (= 3.2.5)
122
+ rails (= 3.2.8)
123
123
  rails_exception_handler!
124
124
  rspec-rails
data/HISTORY CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGELOG
2
2
 
3
+ v2.1.0 - September 17th 2012
4
+ - New filtering option: referer_url
5
+
3
6
  v2.0.2 - June 11th 2012
4
7
  - Add attribute whitelisting mechanism for the active_record storage
5
8
 
data/README.markdown CHANGED
@@ -90,7 +90,7 @@ config.response_mapping = {
90
90
  Gathering and storing exception information is optional, but still the main purpose of this exception handler.
91
91
 
92
92
  The following four methods exists for extracting the information you need. You are given direct access to the relevant objects, which means full flexibility, but also more work on your part.
93
- The initializers contains a basic suggestion, you can check out [the wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Extracting-exception-info)
93
+ The initializer contains a basic suggestion, you can check out [the wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Extracting-exception-info)
94
94
  for more options, or inspect the objects yourself with a tool like Pry to find what you need.
95
95
 
96
96
  The "storage" hash below is the object that is sent to the storage strategy. Make sure the keys in the hash matches up with the names of the database fields.
@@ -256,6 +256,14 @@ Sometimes black bots add a common user agent string and a referer to their reque
256
256
  config.filters = [:target_url_regxp => /\.php/i]
257
257
  ```
258
258
 
259
+ ### :referer_url_regxp
260
+
261
+ Works the same way as :target_url_regxp. Enables you to get rid of error messages coming from spesific sources, like external links to assets that no longer exists.
262
+
263
+ ```ruby
264
+ config.filters = [:referer_url_regxp => /\problematicreferer/i]
265
+ ```
266
+
259
267
  # Contributors
260
268
 
261
269
  David Rice and James Harrison
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.2
1
+ 2.1.0
@@ -11,8 +11,10 @@ RailsExceptionHandler.configure do |config|
11
11
  # :no_referer_404s,
12
12
  # :anon_404s,
13
13
  # {:user_agent_regxp => /\b(ApptusBot|TurnitinBot|DotBot|SiteBot)\b/i},
14
- # {:target_url_regxp => /\.php/i}
14
+ # {:target_url_regxp => /\.php/i},
15
+ # {:referer_url_regxp => /problematicreferer/i}
15
16
  # ]
17
+ #
16
18
  # !!! IMPORTANT !!!
17
19
  # You must remove public/500.html and public/404.html for these to have any effect
18
20
  config.responses = {
@@ -24,6 +26,7 @@ RailsExceptionHandler.configure do |config|
24
26
  'ActionController::RoutingError' => :not_found,
25
27
  'AbstractController::ActionNotFound' => :not_found
26
28
  }
29
+
27
30
  config.storage_strategies = [:active_record] # Available options: [:active_record, :rails_log, :remote_url => {:target => 'http://example.com'}]
28
31
  config.store_request_info do |storage,request|
29
32
  storage[:target_url] = request.url
@@ -83,4 +83,9 @@ class RailsExceptionHandler::Parser
83
83
  result = @internal_info[:target_url].match(regxp)
84
84
  result != nil
85
85
  end
86
+
87
+ def filter_referer_url_regxp(regxp)
88
+ result = @internal_info[:referer_url].match(regxp)
89
+ result != nil
90
+ end
86
91
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "2.0.2"
8
+ s.version = "2.1.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-06-11"
12
+ s.date = "2012-09-17"
13
13
  s.description = ""
14
14
  s.email = "contact@sharagoz.com"
15
15
  s.extra_rdoc_files = [
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
59
59
  s.specification_version = 3
60
60
 
61
61
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
62
- s.add_development_dependency(%q<rails>, ["= 3.2.5"])
62
+ s.add_development_dependency(%q<rails>, ["= 3.2.8"])
63
63
  s.add_development_dependency(%q<rack-test>, ["= 0.6.1"])
64
64
  s.add_development_dependency(%q<mysql2>, ["= 0.3.11"])
65
65
  s.add_development_dependency(%q<pry>, [">= 0"])
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
67
67
  s.add_development_dependency(%q<jeweler>, [">= 0"])
68
68
  s.add_development_dependency(%q<rails_exception_handler>, [">= 0"])
69
69
  else
70
- s.add_dependency(%q<rails>, ["= 3.2.5"])
70
+ s.add_dependency(%q<rails>, ["= 3.2.8"])
71
71
  s.add_dependency(%q<rack-test>, ["= 0.6.1"])
72
72
  s.add_dependency(%q<mysql2>, ["= 0.3.11"])
73
73
  s.add_dependency(%q<pry>, [">= 0"])
@@ -76,7 +76,7 @@ Gem::Specification.new do |s|
76
76
  s.add_dependency(%q<rails_exception_handler>, [">= 0"])
77
77
  end
78
78
  else
79
- s.add_dependency(%q<rails>, ["= 3.2.5"])
79
+ s.add_dependency(%q<rails>, ["= 3.2.8"])
80
80
  s.add_dependency(%q<rack-test>, ["= 0.6.1"])
81
81
  s.add_dependency(%q<mysql2>, ["= 0.3.11"])
82
82
  s.add_dependency(%q<pry>, [">= 0"])
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.0.2
4
+ version: 2.1.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-06-11 00:00:00.000000000 Z
12
+ date: 2012-09-17 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.5
21
+ version: 3.2.8
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.5
29
+ version: 3.2.8
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rack-test
32
32
  requirement: !ruby/object:Gem::Requirement