rails_exception_handler 2.3.3 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_exception_handler (2.3.3)
4
+ rails_exception_handler (2.3.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -30,18 +30,18 @@ GEM
30
30
  multi_json (~> 1.3)
31
31
  thread_safe (~> 0.1)
32
32
  tzinfo (~> 0.3.37)
33
- addressable (2.3.5)
34
- arel (4.0.1)
35
- atomic (1.1.14)
33
+ addressable (2.3.6)
34
+ arel (4.0.2)
36
35
  builder (3.1.4)
37
36
  coderay (1.1.0)
38
- descendants_tracker (0.0.3)
37
+ descendants_tracker (0.0.4)
38
+ thread_safe (~> 0.3, >= 0.3.1)
39
39
  diff-lcs (1.2.5)
40
40
  erubis (2.7.0)
41
- faraday (0.8.8)
42
- multipart-post (~> 1.2.0)
41
+ faraday (0.9.0)
42
+ multipart-post (>= 1.2, < 3)
43
43
  git (1.2.6)
44
- github_api (0.11.1)
44
+ github_api (0.11.3)
45
45
  addressable (~> 2.3)
46
46
  descendants_tracker (~> 0.0.1)
47
47
  faraday (~> 0.8, < 0.10)
@@ -49,12 +49,11 @@ GEM
49
49
  multi_json (>= 1.7.5, < 2.0)
50
50
  nokogiri (~> 1.6.0)
51
51
  oauth2
52
- hashie (2.0.5)
53
- highline (1.6.20)
52
+ hashie (2.1.1)
53
+ highline (1.6.21)
54
54
  hike (1.2.3)
55
- httpauth (0.2.0)
56
55
  i18n (0.6.9)
57
- jeweler (2.0.0)
56
+ jeweler (2.0.1)
58
57
  builder
59
58
  bundler (>= 1.0)
60
59
  git (>= 1.2.5)
@@ -64,29 +63,28 @@ GEM
64
63
  rake
65
64
  rdoc
66
65
  json (1.8.1)
67
- jwt (0.1.8)
66
+ jwt (0.1.11)
68
67
  multi_json (>= 1.5)
69
68
  mail (2.5.4)
70
69
  mime-types (~> 1.16)
71
70
  treetop (~> 1.4.8)
72
71
  method_source (0.8.2)
73
72
  mime-types (1.25.1)
74
- mini_portile (0.5.2)
73
+ mini_portile (0.5.3)
75
74
  minitest (4.7.5)
76
- multi_json (1.8.2)
75
+ multi_json (1.9.2)
77
76
  multi_xml (0.5.5)
78
- multipart-post (1.2.0)
77
+ multipart-post (2.0.0)
79
78
  nokogiri (1.6.1)
80
79
  mini_portile (~> 0.5.0)
81
- oauth2 (0.9.2)
82
- faraday (~> 0.8)
83
- httpauth (~> 0.2)
84
- jwt (~> 0.1.4)
85
- multi_json (~> 1.0)
80
+ oauth2 (0.9.3)
81
+ faraday (>= 0.8, < 0.10)
82
+ jwt (~> 0.1.8)
83
+ multi_json (~> 1.3)
86
84
  multi_xml (~> 0.5)
87
85
  rack (~> 1.2)
88
- polyglot (0.3.3)
89
- pry (0.9.12.4)
86
+ polyglot (0.3.4)
87
+ pry (0.9.12.6)
90
88
  coderay (~> 1.0)
91
89
  method_source (~> 0.8)
92
90
  slop (~> 3.4)
@@ -106,14 +104,14 @@ GEM
106
104
  activesupport (= 4.0.2)
107
105
  rake (>= 0.8.7)
108
106
  thor (>= 0.18.1, < 2.0)
109
- rake (10.1.1)
110
- rdoc (4.1.0)
107
+ rake (10.3.1)
108
+ rdoc (4.1.1)
111
109
  json (~> 1.4)
112
- rspec-core (2.14.7)
113
- rspec-expectations (2.14.4)
110
+ rspec-core (2.14.8)
111
+ rspec-expectations (2.14.5)
114
112
  diff-lcs (>= 1.1.3, < 2.0)
115
- rspec-mocks (2.14.4)
116
- rspec-rails (2.14.1)
113
+ rspec-mocks (2.14.6)
114
+ rspec-rails (2.14.2)
117
115
  actionpack (>= 3.0)
118
116
  activemodel (>= 3.0)
119
117
  activesupport (>= 3.0)
@@ -121,8 +119,8 @@ GEM
121
119
  rspec-core (~> 2.14.0)
122
120
  rspec-expectations (~> 2.14.0)
123
121
  rspec-mocks (~> 2.14.0)
124
- slop (3.4.7)
125
- sprockets (2.10.1)
122
+ slop (3.5.0)
123
+ sprockets (2.12.1)
126
124
  hike (~> 1.2)
127
125
  multi_json (~> 1.0)
128
126
  rack (~> 1.0)
@@ -131,15 +129,14 @@ GEM
131
129
  actionpack (>= 3.0)
132
130
  activesupport (>= 3.0)
133
131
  sprockets (~> 2.8)
134
- sqlite3 (1.3.8)
135
- thor (0.18.1)
136
- thread_safe (0.1.3)
137
- atomic
132
+ sqlite3 (1.3.9)
133
+ thor (0.19.1)
134
+ thread_safe (0.3.3)
138
135
  tilt (1.4.1)
139
136
  treetop (1.4.15)
140
137
  polyglot
141
138
  polyglot (>= 0.3.1)
142
- tzinfo (0.3.38)
139
+ tzinfo (0.3.39)
143
140
 
144
141
  PLATFORMS
145
142
  ruby
data/HISTORY CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGELOG
2
2
 
3
+ v2.3.3 - April 24th 2014
4
+ - Make database name/table configurable for the Active Record storage strategy
5
+
3
6
  v2.3.2 - January 7th 2014
4
7
  - Add helper method for catching exceptions outside of Rack
5
8
 
data/README.markdown CHANGED
@@ -8,7 +8,12 @@ The exception handler enables you to save the key information from the error mes
8
8
 
9
9
  Does your app have an authorization mechanism? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Interaction-with-authorization-mechanisms)
10
10
 
11
- Do you need to catch ruby errors outside of Rack? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Manual-exception-handling-outside-of-rack)
11
+ Do you need to catch ruby errors [outside of Rack](https://github.com/Sharagoz/rails_exception_handler/wiki/Manual-exception-handling-outside-of-rack)?
12
+ ```ruby
13
+ RailsExceptionHandler.catch do
14
+ # ...
15
+ end
16
+ ```
12
17
 
13
18
  ## Compatiblity
14
19
 
@@ -129,6 +134,11 @@ No storage strategies are enabled by default. You can enable more than one stora
129
134
 
130
135
  ```ruby
131
136
  config.storage_strategies = [:active_record]
137
+ # Change database/table for the active_record storage strategy
138
+ # config.active_record_store_in = {
139
+ # :database => 'exception_database',
140
+ # :record_table => 'error_messages'
141
+ # }
132
142
  ```
133
143
  This means that the error reports will be stored through active record directly to a database. A new entry called **exception_database** is needed in **database.yml**:
134
144
  For mysql the entry would look something like this:
@@ -284,7 +294,7 @@ config.filters = [:referer_url_regxp => /\problematicreferer/i]
284
294
 
285
295
  # Contributors
286
296
 
287
- mgwidmann, David Rice and James Harrison
297
+ https://github.com/Sharagoz/rails_exception_handler/graphs/contributors
288
298
 
289
299
  Would you like to contribute? Here are some things on the todo list:
290
300
 
@@ -292,4 +302,4 @@ Would you like to contribute? Here are some things on the todo list:
292
302
 
293
303
  # Licence
294
304
 
295
- Copyright © 2012 Bjørn Trondsen, released under the MIT license
305
+ Copyright © 2014 Bjørn Trondsen, released under the MIT license
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.3.4
@@ -1,10 +1,9 @@
1
-
2
1
  class RailsExceptionHandler::ActiveRecord
3
2
 
4
3
  class ErrorMessage < defined?(ActiveRecord) ? ActiveRecord::Base : Object
5
- if(defined?(ActiveRecord) && RailsExceptionHandler.configuration.activate? && RailsExceptionHandler.configuration.active_record?)
6
- establish_connection(:exception_database)
7
- self.table_name = :error_messages
4
+ if (defined?(ActiveRecord) && RailsExceptionHandler.configuration.activate? && RailsExceptionHandler.configuration.active_record?)
5
+ establish_connection(RailsExceptionHandler.configuration.active_record_store_in[:database])
6
+ self.table_name = RailsExceptionHandler.configuration.active_record_store_in[:record_table]
8
7
  end
9
8
  end
10
9
 
@@ -21,13 +21,23 @@ RailsExceptionHandler.configure do |config|
21
21
  :default => "<h1>500</h1><p>Internal server error</p>",
22
22
  :not_found => "<h1>404</h1><p>Page not found</p>"
23
23
  }
24
- config.response_mapping = { # All errors are mapped to the :default response unless overridden here
24
+
25
+ # All errors are mapped to the :default response unless overridden here
26
+ config.response_mapping = {
25
27
  'ActiveRecord::RecordNotFound' => :not_found,
26
28
  'ActionController::RoutingError' => :not_found,
27
29
  'AbstractController::ActionNotFound' => :not_found
28
30
  }
29
31
 
30
32
  config.storage_strategies = [:active_record] # Available options: [:active_record, :rails_log, :remote_url => {:target => 'http://example.com'}]
33
+
34
+ # Change database/table for the active_record storage strategy
35
+ # config.active_record_store_in = {
36
+ # :database => 'exception_database',
37
+ # :record_table => 'error_messages'
38
+ # }
39
+
40
+
31
41
  config.store_request_info do |storage,request|
32
42
  storage[:target_url] = request.url
33
43
  storage[:referer_url] = request.referer
@@ -1,7 +1,11 @@
1
1
  class RailsExceptionHandler::Configuration
2
- attr_accessor :storage_strategies, :environments, :filters, :responses, :response_mapping, :fallback_layout, :store_user_info, :env_info_block, :global_info_block, :exception_info_block, :request_info_block, :mongoid_store_in
2
+ attr_accessor :storage_strategies, :environments, :filters, :responses, :response_mapping, :fallback_layout, :store_user_info, :env_info_block, :global_info_block, :exception_info_block, :request_info_block, :mongoid_store_in, :active_record_store_in
3
3
 
4
4
  def initialize
5
+ @active_record_store_in = {
6
+ database: 'exception_database',
7
+ record_table: 'error_messages'
8
+ }
5
9
  @environments = [:production]
6
10
  @storage_strategies = []
7
11
  @filters = []
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "2.3.3"
8
+ s.version = "2.3.4"
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 = "2014-01-07"
12
+ s.date = "2014-04-24"
13
13
  s.description = ""
14
14
  s.email = "contact@sharagoz.com"
15
15
  s.extra_rdoc_files = [
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.3.3
4
+ version: 2.3.4
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: 2014-01-07 00:00:00.000000000 Z
12
+ date: 2014-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  segments:
204
204
  - 0
205
- hash: -3813765544978408589
205
+ hash: 1060098615532412064
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  none: false
208
208
  requirements: